Files
notifications-admin/app/templates/views/broadcast/preview-message.html
Chris Hill-Scott effe24893e Make the broadcast flow talk to the API
This commit removes the code the puts areas into the session and instead
creates and then updates a draft broadcast in the database.

This is so we can avoid session-related bugs, and potentially having a
large session when we start adding personalisation etc.

Once a broadcast is ready to go it is set to `broadcasting` straight
away with no approval. We’ll revisit this as we learn more about how
users might want to manage who can create and approve broadcasts.

The tests are a bit light in terms of checking what’s on the page, but
clicking through the pages is probably good enough for now.
2020-07-09 14:31:12 +01:00

35 lines
967 B
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 sticky_page_footer %}
{% 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() %}
{{ sticky_page_footer('Start broadcast') }}
{% endcall %}
{% endblock %}