Add some views for selecting broadcast areas

These are just so we have some pages to click through for now. They
don’t use real templates, or any of the broadcast stuff from the
database.

But I think it’s useful to get some skeleton pages in first so that we
can see the map etc working in production, then build on that, without
having to do it all in one mega PR.

For that reason there are two short term things I’ve done in this commit
which should be revisited soon:
- no tests for the endpoints
- data about which areas are selected is stored in the session
This commit is contained in:
Chris Hill-Scott
2020-07-06 10:53:14 +01:00
parent b833d83205
commit 18d464d4f0
12 changed files with 402 additions and 5 deletions

View File

@@ -0,0 +1,41 @@
{% 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 message", back_link=url_for('.preview_broadcast_areas', service_id=current_service.id)) }}
{% for region in selected %}
{% if loop.first %}
<ul class="region-list">
{% endif %}
<li class="region-list-item">
{{ region.name }}
</li>
{% if loop.last %}
</ul>
{% endif %}
{% endfor %}
{% if selected %}
<p class="govuk-body">
{{ "<message here>" }}
</p>
{% call form_wrapper() %}
{{ sticky_page_footer('Start broadcast') }}
{% endcall %}
{% endif %}
{% endblock %}