Add button to approve broadcast

Since new broadcasts will go into `pending-approval`, we now need a way
of approving them.

This commit adds a button to this page to start (or approve) the
broadcast. This button is wrapped in a bordered box, to emphasise that
it’s something consequential.
This commit is contained in:
Chris Hill-Scott
2020-07-17 08:07:44 +01:00
parent 5b83db9768
commit a99b40304b
6 changed files with 152 additions and 5 deletions

View File

@@ -138,6 +138,12 @@ class BroadcastMessage(JSONModel):
)
self._set_status_to('pending-approval')
def approve_broadcast(self):
self._update(
starts_at=datetime.utcnow().isoformat(),
)
self._set_status_to('broadcasting')
def cancel_broadcast(self):
self._set_status_to('cancelled')