2021-07-30 18:23:12 +01:00
|
|
|
{% extends "withnav_template.html" %}
|
2020-07-06 10:53:14 +01:00
|
|
|
{% from "components/button/macro.njk" import govukButton %}
|
|
|
|
|
{% from "components/page-header.html" import page_header %}
|
2020-08-26 10:43:55 +01:00
|
|
|
{% from "components/page-footer.html" import page_footer %}
|
2020-09-08 16:35:03 +01:00
|
|
|
{% from "views/broadcast/macros/area-map.html" import map %}
|
2021-07-30 18:23:12 +01:00
|
|
|
{% from "components/back-link/macro.njk" import govukBackLink %}
|
2020-07-06 10:53:14 +01:00
|
|
|
|
|
|
|
|
{% block service_page_title %}
|
2021-07-05 15:57:37 +01:00
|
|
|
Choose where to send this alert
|
2020-07-06 10:53:14 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
2020-07-06 10:53:14 +01:00
|
|
|
{% block extra_stylesheets %}
|
2020-09-03 10:18:28 +01:00
|
|
|
{% include "views/broadcast/partials/area-map-stylesheets.html" %}
|
2020-07-06 10:53:14 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
|
|
{% block extra_javascripts %}
|
2020-09-03 10:18:28 +01:00
|
|
|
{% include "views/broadcast/partials/area-map-javascripts.html" %}
|
2020-07-06 10:53:14 +01:00
|
|
|
{% endblock %}
|
|
|
|
|
|
2021-07-30 18:23:12 +01:00
|
|
|
{% block backLink %}
|
|
|
|
|
{{ govukBackLink({ "href": back_link }) }}
|
|
|
|
|
{% endblock %}
|
|
|
|
|
|
2020-07-06 10:53:14 +01:00
|
|
|
{% block maincolumn_content %}
|
|
|
|
|
|
2021-07-30 18:23:12 +01:00
|
|
|
{{ page_header("Choose where to send this alert") }}
|
2020-07-06 10:53:14 +01:00
|
|
|
|
2020-07-09 10:33:50 +01:00
|
|
|
{% for area in broadcast_message.areas %}
|
2020-07-06 10:53:15 +01:00
|
|
|
{% if loop.first %}
|
|
|
|
|
<ul class="area-list">
|
|
|
|
|
{% endif %}
|
|
|
|
|
<li class="area-list-item">
|
2021-10-21 13:26:40 +01:00
|
|
|
{{ area.name }}
|
2021-10-22 11:54:41 +01:00
|
|
|
<a class="area-list-item-remove govuk-button" data-module="govuk-button" role="button" href="{{ url_for('.remove_broadcast_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, area_slug=area.id) }}">
|
2021-11-03 10:33:10 +00:00
|
|
|
<svg id="area-list-item-remove__icon" width="11" height="11" viewbox="0 0 10 10" aria-labelledby="area__{{ loop.index }}" role="img" xmlns="http://www.w3.org/2000/svg">
|
2021-10-21 13:26:40 +01:00
|
|
|
<title id="area__{{ loop.index }}">Remove {{ area.name }}</title>
|
2021-10-25 15:50:07 +01:00
|
|
|
<g transform="rotate(45),translate(1, -6)">
|
|
|
|
|
<line stroke-width="1.75" id="svg_1" y2="0" x2="6" y1="12" x1="6" stroke="currentColor" fill="none"/>
|
|
|
|
|
<line stroke-width="1.75" id="svg_3" y2="6" x2="0" y1="6" x1="12" stroke="currentColor" fill="none"/>
|
2021-10-21 13:26:40 +01:00
|
|
|
</g>
|
|
|
|
|
</svg>
|
|
|
|
|
</a>
|
2020-07-06 10:53:15 +01:00
|
|
|
</li>
|
2020-07-06 10:53:14 +01:00
|
|
|
{% if loop.last %}
|
2020-08-18 09:51:52 +01:00
|
|
|
</ul>
|
2020-07-06 10:53:15 +01:00
|
|
|
{{ govukButton({
|
|
|
|
|
"element": "a",
|
|
|
|
|
"text": "Add another area",
|
2020-07-09 10:33:50 +01:00
|
|
|
"href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
2020-07-06 10:53:15 +01:00
|
|
|
"classes": "govuk-button--secondary govuk-!-margin-bottom-5"
|
|
|
|
|
}) }}
|
2020-07-06 10:53:14 +01:00
|
|
|
{% endif %}
|
|
|
|
|
{% else %}
|
|
|
|
|
<p class="govuk-body">
|
|
|
|
|
{{ govukButton({
|
|
|
|
|
"element": "a",
|
|
|
|
|
"text": "Add broadcast areas",
|
2020-07-09 10:33:50 +01:00
|
|
|
"href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
2020-07-06 10:53:14 +01:00
|
|
|
"classes": "govuk-button--secondary"
|
|
|
|
|
}) }}
|
|
|
|
|
</p>
|
|
|
|
|
{% endfor %}
|
|
|
|
|
|
2020-07-09 10:33:50 +01:00
|
|
|
{% if broadcast_message.areas %}
|
2020-09-08 16:35:03 +01:00
|
|
|
{{ map(broadcast_message) }}
|
2020-10-02 14:51:57 +01:00
|
|
|
<form action="{{ url_for('.preview_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }}" method="get" class="govuk-!-margin-top-1">
|
2021-07-05 16:50:49 +01:00
|
|
|
{{ page_footer('Preview this alert') }}
|
2020-07-06 10:53:14 +01:00
|
|
|
</form>
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|