Files
notifications-admin/app/templates/views/broadcast/preview-message.html
Chris Hill-Scott 83156bd16e Let users choose when to end a broadcast
Different emergencies will need broadcasts to last for a variable amount
of time. We give users some control over this by letting them stop a
broadcast early. But we should also let them set a maximum broadcast
time, for:
- when the duration of the danger is known
- when the broadcast has been live long enough to alert everyone who
  needs to know about it

This code re-uses the pattern for scheduling jobs, which has some
constraints that are probably OK for now:
- end time is limited to an hour
- longest duration is 3 whole days (eg if you start broadcasting Friday
  you have the choice of Saturday, Sunday and all of Monday, up to
  midnight)
2020-07-17 08:23:10 +01:00

40 lines
1.1 KiB
HTML

{% 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 page_footer %}
{% from "components/radios.html" import radio_select %}
{% extends "withnav_template.html" %}
{% block service_page_title %}
Preview message
{% endblock %}
{% block maincolumn_content %}
{{ page_header("Preview", back_link=url_for('.preview_broadcast_areas', service_id=current_service.id, broadcast_message_id=broadcast_message.id)) }}
{% for area in broadcast_message.areas %}
{% if loop.first %}
<ul class="area-list">
{% endif %}
<li class="area-list-item area-list-item--unremoveable">
{{ area.name }}
</li>
{% if loop.last %}
</ul>
{% endif %}
{% endfor %}
{{ broadcast_message.template|string }}
{% call form_wrapper() %}
{{ radio_select(
form.finishes_at,
show_now_as_default=False
) }}
{{ page_footer('Submit for approval') }}
{% endcall %}
{% endblock %}