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

@@ -1,7 +1,7 @@
{% from "components/button/macro.njk" import govukButton %}
{% from "components/form.html" import form_wrapper %}
{% from "components/page-header.html" import page_header %}
{% from "components/page-footer.html" import sticky_page_footer %}
{% from "components/page-footer.html" import page_footer %}
{% extends "withnav_template.html" %}
@@ -17,10 +17,15 @@
) }}
{% if broadcast_message.status == 'pending-approval' %}
<p class="govuk-body govuk-!-margin-bottom-3">
{{ broadcast_message.created_by.name }} wants to broadcast this
message until {{ broadcast_message.finishes_at|format_datetime_relative }}.
</p>
{% call form_wrapper(class="banner govuk-!-margin-bottom-6") %}
<p class="govuk-body govuk-!-margin-top-0 govuk-!-margin-bottom-3">
{{ broadcast_message.created_by.name }} wants to broadcast this
message until {{ broadcast_message.finishes_at|format_datetime_relative }}.
</p>
{{ page_footer(
"Start broadcasting now"
) }}
{% endcall %}
{% else %}
<p class="govuk-body govuk-!-margin-bottom-3">
Created by {{ broadcast_message.created_by.name }} and approved by