mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-26 01:04:00 -04:00
remove broadcast-related code
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if messages %}
|
||||
{% for category, message in messages %}
|
||||
{% if category in ['cancel', 'delete', 'suspend', 'resume', 'remove', 'revoke this API key', 'stop broadcasting'] %}
|
||||
{% if category in ['cancel', 'delete', 'suspend', 'resume', 'remove', 'revoke this API key'] %}
|
||||
{% set delete_button_text = "Yes, {}".format(category) %}
|
||||
{% elif category == 'try again' %}
|
||||
{% set delete_button_text = category|capitalize %}
|
||||
|
||||
@@ -4,33 +4,23 @@
|
||||
<nav class="navigation">
|
||||
<ul>
|
||||
{% if current_user.has_permissions() %}
|
||||
{% if current_service.has_permission('broadcast') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('current-broadcasts') }}" href="{{ url_for('.broadcast_dashboard', service_id=current_service.id) }}">Current alerts</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('previous-broadcasts') }}" href="{{ url_for('.broadcast_dashboard_previous', service_id=current_service.id) }}">Past alerts</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('rejected-broadcasts') }}" href="{{ url_for('.broadcast_dashboard_rejected', service_id=current_service.id) }}">Rejected alerts</a></li>
|
||||
{% elif current_user.has_permissions('view_activity') %}
|
||||
{% if current_user.has_permissions('view_activity') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('dashboard') }}" href="{{ url_for('.service_dashboard', service_id=current_service.id) }}">Dashboard</a></li>
|
||||
{% endif %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('templates') }}" href="{{ url_for('.choose_template', service_id=current_service.id) }}">Send messages</a></li>
|
||||
{% if not current_user.has_permissions('view_activity') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ casework_navigation.is_selected('sent-messages') }}" href="{{ url_for('.view_notifications', service_id=current_service.id, status='sending,delivered,failed') }}">Sent messages</a></li>
|
||||
{% endif %}
|
||||
{% if not current_service.has_permission('broadcast') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('uploads') }} demo-tooltip" data-demo-tooltip="⚠️ This feature is not available in demo mode" href="{{ url_for('main.uploads', service_id=current_service.id) }}">Letters</a></li>
|
||||
{% endif %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('uploads') }} demo-tooltip" data-demo-tooltip="⚠️ This feature is not available in demo mode" href="{{ url_for('main.uploads', service_id=current_service.id) }}">Letters</a></li>
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('team-members') }}" href="{{ url_for('.manage_users', service_id=current_service.id) }}">Team members</a></li>
|
||||
{% if current_user.has_permissions('manage_service', allow_org_user=True) and not current_service.has_permission('broadcast') %}
|
||||
{% if current_user.has_permissions('manage_service', allow_org_user=True) %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
|
||||
{% endif %}
|
||||
{% if current_user.has_permissions('manage_api_keys', 'manage_service') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('settings') }}" href="{{ url_for('.service_settings', service_id=current_service.id) }}">Settings</a></li>
|
||||
{% endif %}
|
||||
{% if current_user.has_permissions('manage_api_keys') %}
|
||||
{% if current_service.has_permission('broadcast') %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('api-integration') }}" href="{{ url_for('.api_keys', service_id=current_service.id) }}">API integration</a></li>
|
||||
{% else %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('api-integration') }}" href="{{ url_for('.api_integration', service_id=current_service.id) }}">API integration</a></li>
|
||||
{% endif %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('api-integration') }}" href="{{ url_for('.api_integration', service_id=current_service.id) }}">API integration</a></li>
|
||||
{% endif %}
|
||||
{% elif current_user.has_permissions(allow_org_user=True) %}
|
||||
<li><a class="govuk-link govuk-link--no-visited-state{{ main_navigation.is_selected('usage') }}" href="{{ url_for('.usage', service_id=current_service.id) }}">Usage</a></li>
|
||||
|
||||
@@ -3,33 +3,10 @@
|
||||
{{ service.name }}
|
||||
{% if not service.active %}
|
||||
<span class="navigation-service-type navigation-service-type--suspended">Suspended</span>
|
||||
{% elif service.has_permission('broadcast') %}
|
||||
{{ broadcast_service_name_tag(
|
||||
service.trial_mode,
|
||||
service.broadcast_channel,
|
||||
service.allowed_broadcast_provider,
|
||||
) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro broadcast_service_name_tag(trial_mode, broadcast_channel, allowed_broadcast_provider, left_margin=True) %}
|
||||
{% set margin_class = "" if left_margin else "govuk-!-margin-left-0" %}
|
||||
{% if trial_mode %}
|
||||
<span class="navigation-service-type navigation-service-type--training {{margin_class}}">Training
|
||||
{% else %}
|
||||
{% if broadcast_channel == "severe" %}
|
||||
<span class="navigation-service-type navigation-service-type--live {{margin_class}}">Live
|
||||
{% else %}
|
||||
<span class="navigation-service-type navigation-service-type--{{broadcast_channel}} {{margin_class}}">{{ broadcast_channel|title }}
|
||||
{% endif %}
|
||||
{% if allowed_broadcast_provider != "all" %}
|
||||
({{ allowed_broadcast_provider|format_mobile_network }})
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</span>
|
||||
{% endmacro %}
|
||||
|
||||
<div class="navigation-service">
|
||||
{% if current_service.organisation_id %}
|
||||
{% if current_user.platform_admin or
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(page_title)}}
|
||||
|
||||
{{ live_search(
|
||||
target_selector='.file-list-item',
|
||||
show=show_search_form,
|
||||
form=search_form,
|
||||
label='Search by name',
|
||||
autofocus=True)
|
||||
}}
|
||||
|
||||
{% for area in library|sort %}
|
||||
<div class="file-list-item">
|
||||
<a class="file-list-filename-large file-list-filename-large-no-hint govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_broadcast_sub_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, library_slug=library.id, area_slug=area.id) }}">{{ area.name }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import sticky_page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(page_title)}}
|
||||
|
||||
{{ live_search(
|
||||
target_selector='.govuk-checkboxes__item',
|
||||
show=show_search_form,
|
||||
form=search_form,
|
||||
label='Search by name',
|
||||
autofocus=True)
|
||||
}}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ form.areas }}
|
||||
{{ sticky_page_footer('Continue') }}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,44 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/page-footer.html" import sticky_page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": back_link }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(page_title)}}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
|
||||
<div class="form-group govuk-!-margin-bottom-4">
|
||||
{{ form.select_all }}
|
||||
</div>
|
||||
{{ live_search(target_selector='.file-list-item', show=show_search_form, form=search_form, label='Or by district') }}
|
||||
|
||||
<div class="govuk-!-margin-bottom-6">
|
||||
{% for area in county.sub_areas|sort %}
|
||||
<div class="file-list-item">
|
||||
{# these are districts within a county#}
|
||||
<a
|
||||
class="file-list-filename-large file-list-filename-large-no-hint govuk-link govuk-link--no-visited-state"
|
||||
href="{{ url_for('.choose_broadcast_sub_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, library_slug=library_slug, area_slug=area.id, prev_area_slug=county.id) }}"
|
||||
>{{ area.name }}</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{{ sticky_page_footer('Continue') }}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,31 +0,0 @@
|
||||
{% from 'components/ajax-block.html' import ajax_block %}
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Current alerts
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-medium">Current alerts</h1>
|
||||
|
||||
{{ ajax_block(
|
||||
partials,
|
||||
url_for('.broadcast_dashboard_updates', service_id=current_service.id),
|
||||
'current_broadcasts'
|
||||
) }}
|
||||
|
||||
{% if current_user.has_permissions('create_broadcasts', restrict_admin_usage=True) %}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "New alert",
|
||||
"href": url_for('.new_broadcast', service_id=current_service.id),
|
||||
"classes": "govuk-button--secondary"
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,29 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Choose where to send this alert
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for(".preview_broadcast_areas", service_id=current_service.id, broadcast_message_id=broadcast_message.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header("Choose where to send this alert") }}
|
||||
|
||||
{% for area in broadcast_message.ancestor_areas %}
|
||||
<a class="govuk-heading-m govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_broadcast_sub_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, library_slug=area.library_id, area_slug=area.id) }}">{{ area.name }}</a>
|
||||
{% if loop.last %}
|
||||
<div class="keyline-block"></div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for library in libraries|sort %}
|
||||
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.choose_broadcast_area', service_id=current_service.id, broadcast_message_id=broadcast_message.id, library_slug=library.id) }}">{{ library.name }}</a>
|
||||
<p class="file-list-hint-large">{{ library.get_examples() }}</p>
|
||||
{% endfor %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,40 +0,0 @@
|
||||
{% macro map(broadcast_message) %}
|
||||
<div id="area-list-map"></div>
|
||||
<p class="area-list-key area-list-key--certain">
|
||||
<svg class="area-list-key__icon" width="50" height="50" viewbox="0 0 50 50" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#FFFFFF" />
|
||||
<polygon points="25 5, 45 25, 25 45, 5 25" stroke="#0B0B0C" stroke-width="2" fill="#96C6E2" />
|
||||
</svg>
|
||||
<span class="govuk-visually-hidden">
|
||||
An area of {{ (broadcast_message.simple_polygons.estimated_area)|square_metres_to_square_miles|round_to_significant_figures(1)|format_thousands }} square miles
|
||||
</span>
|
||||
Will get
|
||||
<span class="govuk-visually-hidden">
|
||||
the
|
||||
</span>
|
||||
alert
|
||||
</p>
|
||||
<p class="area-list-key area-list-key--likely">
|
||||
<svg class="area-list-key__icon" width="50" height="50" viewbox="0 0 50 50" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#FFFFFF" />
|
||||
<polygon points="25 5, 45 25, 25 45, 5 25" stroke="#005ea5" stroke-opacity="1" stroke-width="2" stroke-linecap="square" stroke-linejoin="round" stroke-dasharray="4,7.5,5,7.5,8,8,5,8,7.5,8,5,8,7,8,5,8,4" fill="#2B8CC4" fill-opacity="0.15" />
|
||||
</svg>
|
||||
<span class="govuk-visually-hidden">
|
||||
An extra area of {{ (broadcast_message.simple_polygons_with_bleed.estimated_area - broadcast_message.simple_polygons.estimated_area)|square_metres_to_square_miles|round_to_significant_figures(1)|format_thousands }} square miles is
|
||||
</span>
|
||||
Likely to get
|
||||
<span class="govuk-visually-hidden">
|
||||
the
|
||||
</span>
|
||||
alert
|
||||
</p>
|
||||
<p class="area-list-key area-list-key--phone-estimate">
|
||||
{% if broadcast_message.count_of_phones == 0 %}
|
||||
Unknown number of phones
|
||||
{% elif broadcast_message.count_of_phones == broadcast_message.count_of_phones_likely %}
|
||||
{{ broadcast_message.count_of_phones|format_thousands }} phones estimated
|
||||
{% else %}
|
||||
{{ broadcast_message.count_of_phones|format_thousands }} to {{ broadcast_message.count_of_phones_likely|format_thousands }} phones
|
||||
{% endif %}
|
||||
</p>
|
||||
{% endmacro %}
|
||||
@@ -1,31 +0,0 @@
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
New alert
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.broadcast_dashboard', service_id=current_service.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{% call form_wrapper(class="govuk-!-margin-top-3") %}
|
||||
{{ form.content(
|
||||
param_extensions={
|
||||
'fieldset': {
|
||||
'legend': {
|
||||
'isPageHeading': True,
|
||||
'classes': 'govuk-fieldset__legend--l'
|
||||
}
|
||||
}
|
||||
}
|
||||
) }}
|
||||
{{ page_footer('Continue') }}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,131 +0,0 @@
|
||||
<script src="{{ asset_url('javascripts/leaflet.js') }}"></script>
|
||||
<script>
|
||||
var polygons = []
|
||||
|
||||
{% for polygon in broadcast_message.simple_polygons_with_bleed.as_coordinate_pairs_lat_long %}
|
||||
polygons.push(
|
||||
L.polygon({{polygon}}, {
|
||||
opacity: 1,
|
||||
color: '#005ea5',
|
||||
fillColor: '#2B8CC4',
|
||||
fillOpacity: 0.15,
|
||||
weight: 2,
|
||||
dashArray: [6, 7],
|
||||
lineCap: 'butt'
|
||||
})
|
||||
);
|
||||
{% endfor %}
|
||||
|
||||
{% for polygon in broadcast_message.polygons.as_coordinate_pairs_lat_long %}
|
||||
polygons.push(
|
||||
L.polygon({{polygon}}, {
|
||||
color: '#0b0b0c',
|
||||
fillColor: '#2B8CC4',
|
||||
fillOpacity: 0.3,
|
||||
weight: 2
|
||||
})
|
||||
);
|
||||
{% endfor %}
|
||||
|
||||
|
||||
var mapElement = document.getElementById('area-list-map');
|
||||
var grandparent = mapElement.parentNode.parentNode;
|
||||
var isInDetails = grandparent.className.indexOf('govuk-details') !== -1;
|
||||
var areas = document.querySelectorAll('.area-list > .area-list-item');
|
||||
var trimRegExp = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
|
||||
var details;
|
||||
var label;
|
||||
|
||||
// if element is inside a details element then to make the map render correctly we open the details element
|
||||
// and set up the map before closing the details map after
|
||||
if (isInDetails) {
|
||||
details = grandparent;
|
||||
details.open = true;
|
||||
}
|
||||
|
||||
function addAriaLabel (mapElement) {
|
||||
|
||||
function getLabelPrefix (areas) {
|
||||
return [
|
||||
'Map of the United Kingdom, showing the ',
|
||||
(areas.length === 1) ? 'area' : 'areas',
|
||||
' for'
|
||||
].join('');
|
||||
};
|
||||
|
||||
function getStringOfAreas (areas) {
|
||||
var areasLen = areas.length;
|
||||
var areaStrings = [];
|
||||
var idx;
|
||||
|
||||
function getAreaName (area) {
|
||||
var areaString = '';
|
||||
var childNodesLen = area.childNodes.length;
|
||||
var idx;
|
||||
var childNode;
|
||||
|
||||
for (idx = 0; idx < childNodesLen; idx++) {
|
||||
childNode = area.childNodes[idx];
|
||||
if (childNode.nodeType === 3) { areaString += childNode.nodeValue; } // only use text nodes
|
||||
}
|
||||
|
||||
return areaString.replace(trimRegExp, '')
|
||||
};
|
||||
|
||||
if (areasLen === 1) { return getAreaName(areas[0]); }
|
||||
|
||||
for (idx = 0; idx < areasLen; idx++) {
|
||||
areaStrings.push(getAreaName(areas[idx]));
|
||||
}
|
||||
|
||||
// always join last 2 areas with 'and', the rest with commas
|
||||
return areaStrings.slice(0, areasLen - 1).join(', ') + ' and ' + areaStrings[areasLen - 1];
|
||||
};
|
||||
|
||||
label = getLabelPrefix(areas) + " " + getStringOfAreas(areas);
|
||||
mapElement.setAttribute('aria-label', label);
|
||||
};
|
||||
|
||||
function addAriaDescription (mapElement) {
|
||||
|
||||
var mapContainer = mapElement.parentNode;
|
||||
var description = document.createElement('p');
|
||||
var descriptionText = 'Use the arrow keys to move the map. Use the buttons to zoom the map in or out';
|
||||
|
||||
description.appendChild(
|
||||
document.createTextNode(descriptionText)
|
||||
);
|
||||
description.setAttribute('id', 'area-list-map__description');
|
||||
description.className = 'govuk-visually-hidden';
|
||||
mapContainer.insertBefore(description, mapElement.nextSibling);
|
||||
mapElement.setAttribute('aria-describedby', 'area-list-map__description');
|
||||
};
|
||||
|
||||
mapElement.style.height = Math.max(320, window.innerHeight - mapElement.offsetTop - 100) + 'px';
|
||||
mapElement.setAttribute('role', 'region');
|
||||
addAriaLabel(mapElement);
|
||||
addAriaDescription(mapElement);
|
||||
|
||||
var mymap = L.map(
|
||||
'area-list-map',
|
||||
{
|
||||
scrollWheelZoom: false
|
||||
}
|
||||
)
|
||||
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(mymap);
|
||||
|
||||
var polygonGroup = L.featureGroup(polygons).addTo(mymap);
|
||||
mymap.fitBounds(
|
||||
polygonGroup.getBounds(),
|
||||
{padding: [1, 1]}
|
||||
);
|
||||
|
||||
// if element is inside a details element then close the details element
|
||||
if (isInDetails) {
|
||||
details.open = false;
|
||||
}
|
||||
|
||||
</script>
|
||||
@@ -1 +0,0 @@
|
||||
<link rel="stylesheet" href="{{ asset_url('stylesheets/map.css') }}" />
|
||||
@@ -1,46 +0,0 @@
|
||||
{% from "components/table.html" import list_table, field, right_aligned_field_heading, row_heading %}
|
||||
|
||||
<div class="ajax-block-container js-mark-focus-on-parent" data-classes-to-persist="js-child-has-focus">
|
||||
{% for item in broadcasts|sort|reverse|list %}
|
||||
<div class="keyline-block">
|
||||
<div class="file-list file-list--sectioned govuk-!-margin-bottom-2">
|
||||
<h2>
|
||||
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for(view_broadcast_endpoint, service_id=current_service.id, broadcast_message_id=item.id) }}">{{ item.template.name }}</a>
|
||||
</h2>
|
||||
<span class="file-list-hint-large govuk-!-margin-bottom-2">
|
||||
{{ item.content }}
|
||||
</span>
|
||||
{% if item.status == 'pending-approval' %}
|
||||
<p class="govuk-body govuk-hint file-list-status">
|
||||
Waiting for approval
|
||||
</p>
|
||||
{% elif item.status == 'rejected' %}
|
||||
<p class="govuk-body govuk-hint file-list-status">
|
||||
{{ item.updated_at|format_date_human|title }} at {{ item.updated_at|format_time }}
|
||||
</p>
|
||||
{% elif item.status == 'broadcasting' %}
|
||||
<p class="govuk-body live-broadcast file-list-status">
|
||||
Live since {{ item.starts_at|format_datetime_relative }}
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body govuk-hint file-list-status">
|
||||
{{ item.starts_at|format_date_human|title }} at {{ item.starts_at|format_time }}
|
||||
</p>
|
||||
{% endif %}
|
||||
<ul class="area-list">
|
||||
{% for area in item.areas %}
|
||||
<li class="area-list-item area-list-item--unremoveable area-list-item--smaller">{{ area.name }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
{% if loop.last %}
|
||||
<div class="keyline-block">
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="table-empty-message keyline-block govuk-!-padding-top-4">
|
||||
{{ empty_message }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
@@ -1,74 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "views/broadcast/macros/area-map.html" import map %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Choose where to send this alert
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_stylesheets %}
|
||||
{% include "views/broadcast/partials/area-map-stylesheets.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascripts %}
|
||||
{% include "views/broadcast/partials/area-map-javascripts.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": back_link }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header("Choose where to send this alert") }}
|
||||
|
||||
{% for area in broadcast_message.areas %}
|
||||
{% if loop.first %}
|
||||
<ul class="area-list">
|
||||
{% endif %}
|
||||
<li class="area-list-item">
|
||||
{{ area.name }}
|
||||
<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) }}">
|
||||
<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">
|
||||
<title id="area__{{ loop.index }}">Remove {{ area.name }}</title>
|
||||
<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"/>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</li>
|
||||
{% if loop.last %}
|
||||
</ul>
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "Add another area",
|
||||
"href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
"classes": "govuk-button--secondary govuk-!-margin-bottom-5"
|
||||
}) }}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="govuk-body">
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "Add broadcast areas",
|
||||
"href": url_for('.choose_broadcast_library', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
"classes": "govuk-button--secondary"
|
||||
}) }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
|
||||
{% if broadcast_message.areas %}
|
||||
{{ map(broadcast_message) }}
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "Preview this alert",
|
||||
"href": url_for('.preview_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
"classes": "govuk-button"
|
||||
}) }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,37 +0,0 @@
|
||||
{% extends "withnav_template.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 %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Preview message
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.preview_broadcast_areas', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header("Preview") }}
|
||||
|
||||
{{ broadcast_message.template|string }}
|
||||
|
||||
<div class="govuk-!-margin-bottom-3">
|
||||
<ul class="area-list">
|
||||
{% for area in broadcast_message.areas %}
|
||||
<li class="area-list-item area-list-item--unremoveable">
|
||||
{{ area.name }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ page_footer('Submit for approval') }}
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,27 +0,0 @@
|
||||
{% from 'components/ajax-block.html' import ajax_block %}
|
||||
{% from "components/button/macro.njk" import govukButton %}
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<h1 class="heading-medium">{{ page_title }}</h1>
|
||||
|
||||
{% include('views/broadcast/partials/dashboard-table.html') %}
|
||||
|
||||
{% if current_user.has_permissions('create_broadcasts', restrict_admin_usage=True) %}
|
||||
<div class="js-stick-at-bottom-when-scrolling">
|
||||
{{ govukButton({
|
||||
"element": "a",
|
||||
"text": "New alert",
|
||||
"href": url_for('.new_broadcast', service_id=current_service.id),
|
||||
"classes": "govuk-button--secondary"
|
||||
}) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,37 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import sticky_page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/live-search.html" import live_search %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ page_title }}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": back_link }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header(page_title)}}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
|
||||
<div class="form-group govuk-!-margin-bottom-4">
|
||||
{{ form.select_all }}
|
||||
</div>
|
||||
|
||||
{{ live_search(target_selector='#sub-areas .govuk-checkboxes__item', show=show_search_form, form=search_form, label='Or by electoral ward') }}
|
||||
|
||||
<div id="sub-areas">
|
||||
{{ form.areas }}
|
||||
</div>
|
||||
|
||||
{{ sticky_page_footer('Continue') }}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,36 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
You’ve been invited to use US Notify for emergency alerts.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="banner-tour banner-tour-no-fixed-height govuk-!-margin-top-0">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
You’ve been invited to use US Notify for emergency alerts.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
Emergency alerts let you warn the public about an
|
||||
imminent risk to life.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".broadcast_tour", service_id=current_service.id, step_index=2) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/1.png') }}" alt="">
|
||||
<link rel="preload" href="{{ asset_url('images/broadcast-tour/2.png') }}" as="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,34 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
In an emergency, you can send an alert to every mobile phone in
|
||||
the affected area at exactly the same time.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="banner-tour banner-tour-no-fixed-height govuk-!-margin-top-0">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
In an emergency, you can send an alert to every mobile phone in
|
||||
the affected area at exactly the same time.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium govuk-!-margin-bottom-6">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".broadcast_tour", service_id=current_service.id, step_index=3) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/2.png') }}" alt="">
|
||||
<link rel="preload" href="{{ asset_url('images/broadcast-tour/3.png') }}" as="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,32 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
The phone will make a loud alarm noise, even if it’s set on silent.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="banner-tour banner-tour-no-fixed-height govuk-!-margin-top-0">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
The phone will make a loud alarm noise, even if it’s set on silent.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".broadcast_tour", service_id=current_service.id, step_index=4) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/3.png') }}" alt="">
|
||||
<link rel="preload" href="{{ asset_url('images/broadcast-tour/4.png') }}" as="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,35 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
An alert is not a normal text message.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="banner-tour banner-tour-no-fixed-height govuk-!-margin-top-0">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
An alert is not a normal text message.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
It’s broadcast directly from a mobile phone mast, so you don’t
|
||||
need to know anyone’s phone number.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".broadcast_tour", service_id=current_service.id, step_index=5) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/4.png') }}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,42 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
{% from "service_navigation.html" import navigation_service_name %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
You’re in training mode.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="navigation-service">
|
||||
{{ navigation_service_name(current_service) }}
|
||||
</div>
|
||||
|
||||
<div class="banner-tour banner-tour-no-fixed-height banner-tour-with-service-name">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
<h1 class="heading-medium">
|
||||
You’re in training mode.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
There’s no risk of sending a real alert.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
Get used to the system now, so you know what to do in an emergency.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
When you’re ready, you can ask for access to the live system.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,38 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
Notify has not sent your alert because you’re in training mode.
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="govuk-width-container">
|
||||
{% include "service_navigation.html" %}
|
||||
<main class="govuk-main-wrapper column-main govuk-!-padding-top-0 govuk-!-padding-bottom-0" id="main-content" role="main">
|
||||
<div class="banner-tour banner-tour-no-fixed-height banner-tour-with-service-name">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
Notify has not sent your alert because you’re in training mode.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
In a real emergency, every mobile phone in the area
|
||||
you chose would make a loud alarm noise.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/3.png') }}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,39 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
You’ve been invited to send live emergency alerts.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="govuk-width-container">
|
||||
{% include "service_navigation.html" %}
|
||||
<main class="govuk-main-wrapper column-main {{ mainClasses }}" id="main-content" role="main">
|
||||
<div class="banner-tour banner-tour-no-fixed-height banner-tour-with-service-name">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
You’ve been invited to send live emergency alerts.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
Members of the public will receive alerts you send from this service.
|
||||
</p>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".broadcast_tour_live", service_id=current_service.id, step_index=2) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/live/1.png') }}" alt="">
|
||||
<link rel="preload" href="{{ asset_url('images/broadcast-tour/live/2.png') }}" as="image">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -1,36 +0,0 @@
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
|
||||
{% extends "admin_template.html" %}
|
||||
|
||||
{% block per_page_title %}
|
||||
You can always go back to training mode by clicking ‘Switch service’ in the top right.
|
||||
{% endblock %}
|
||||
|
||||
{% set mainClasses = "govuk-!-padding-top-0 govuk-!-padding-bottom-0" %}
|
||||
|
||||
{% block main %}
|
||||
|
||||
<div class="govuk-width-container">
|
||||
{% include "service_navigation.html" %}
|
||||
<main class="govuk-main-wrapper column-main {{ mainClasses }}" id="main-content" role="main">
|
||||
<div class="banner-tour banner-tour-no-fixed-height banner-tour-with-service-name">
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<h1 class="heading-medium">
|
||||
You can always go back to training mode by clicking ‘Switch service’ in the top right.
|
||||
</h1>
|
||||
<p class="govuk-body heading-medium">
|
||||
<a class="govuk-link govuk-link--no-visited-state" href='{{ url_for(".service_dashboard", service_id=current_service.id) }}'>
|
||||
Continue
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<img src="{{ asset_url('images/broadcast-tour/live/2.png') }}" alt="">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,224 +0,0 @@
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
{% from "components/details/macro.njk" import govukDetails %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/banner.html" import banner %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "views/broadcast/macros/area-map.html" import map %}
|
||||
|
||||
{% extends "withnav_template.html" %}
|
||||
|
||||
{% block extra_stylesheets %}
|
||||
{% include "views/broadcast/partials/area-map-stylesheets.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_javascripts %}
|
||||
{% include "views/broadcast/partials/area-map-javascripts.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{% if broadcast_message.status == 'pending-approval' %}
|
||||
{% if broadcast_message.created_by and broadcast_message.created_by == current_user
|
||||
and current_user.has_permissions('create_broadcasts', 'approve_broadcasts', restrict_admin_usage=True) %}
|
||||
{{ broadcast_message.template.name }} is waiting for approval
|
||||
{% elif current_user.has_permissions('approve_broadcasts', restrict_admin_usage=True) %}
|
||||
{% if broadcast_message.created_by %}
|
||||
{{ broadcast_message.created_by.name }}
|
||||
{% else %}
|
||||
An API call
|
||||
{% endif %}
|
||||
wants to broadcast
|
||||
{{ broadcast_message.template.name }}
|
||||
{% else %}
|
||||
This alert is waiting for approval
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ broadcast_message.template.name }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": back_link }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{% if broadcast_message.status == 'pending-approval' %}
|
||||
{% if broadcast_message.created_by and broadcast_message.created_by == current_user
|
||||
and current_user.has_permissions('create_broadcasts', 'approve_broadcasts', restrict_admin_usage=True) %}
|
||||
<div class="banner govuk-!-margin-bottom-6">
|
||||
<h1 class="govuk-heading-m govuk-!-margin-bottom-3">
|
||||
{{ broadcast_message.template.name }} is waiting for approval
|
||||
</h1>
|
||||
{% if current_service.live %}
|
||||
<p class="govuk-body">
|
||||
You need another member of your team to approve your alert.
|
||||
</p>
|
||||
{{ page_footer(
|
||||
delete_link=url_for('main.reject_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
delete_link_text='Discard this alert'
|
||||
) }}
|
||||
{% elif current_user.has_permissions('approve_broadcasts', restrict_admin_usage=True) %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
When you use a live account you’ll need another member of
|
||||
your team to approve your alert.
|
||||
</p>
|
||||
<details class="govuk-details govuk-!-margin-bottom-0" data-module="govuk-details">
|
||||
<summary class="govuk-details__summary govuk-clearfix">
|
||||
Approve your own alert
|
||||
</summary>
|
||||
{% call form_wrapper() %}
|
||||
<p class="govuk-body govuk-!-margin-top-2 govuk-!-margin-bottom-3">
|
||||
Because you’re in training mode you can approve
|
||||
your own alerts, to see how it works.
|
||||
</p>
|
||||
<p class="govuk-body govuk-!-margin-top-0 govuk-!-margin-bottom-3">
|
||||
No real alerts will be broadcast to anyone’s phone.
|
||||
</p>
|
||||
{{ page_footer(
|
||||
"Start broadcasting now",
|
||||
delete_link=url_for('main.reject_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
delete_link_text='Reject this alert'
|
||||
) }}
|
||||
{% endcall %}
|
||||
</details>
|
||||
{% elif current_user.has_permissions('create_broadcasts', restrict_admin_usage=True) %}
|
||||
<p class="govuk-body">
|
||||
You need another member of your team to approve this alert.
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
This service is in training mode. No real alerts will be sent.
|
||||
</p>
|
||||
{{ page_footer(
|
||||
delete_link=url_for('main.reject_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
delete_link_text='Discard this alert'
|
||||
) }}
|
||||
{% endif %}
|
||||
</div>
|
||||
{% elif current_user.has_permissions('approve_broadcasts', restrict_admin_usage=True) %}
|
||||
{% call form_wrapper(class="banner govuk-!-margin-bottom-6") %}
|
||||
<h1 class="govuk-heading-m govuk-!-margin-top-0 govuk-!-margin-bottom-3">
|
||||
{% if broadcast_message.created_by %}
|
||||
{{ broadcast_message.created_by.name }}
|
||||
{% else %}
|
||||
An API call
|
||||
{% endif %}
|
||||
wants to broadcast
|
||||
{{ broadcast_message.template.name }}
|
||||
</h1>
|
||||
{% if current_service.live %}
|
||||
{{ form.confirm(param_extensions={
|
||||
'formGroup': {
|
||||
'classes': 'govuk-!-margin-bottom-4'
|
||||
}
|
||||
}) }}
|
||||
{% else %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
No phones will get this alert.
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
"Start broadcasting now",
|
||||
delete_link=url_for('main.reject_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
delete_link_text='Reject this alert'
|
||||
) }}
|
||||
{% endcall %}
|
||||
{% elif current_user.has_permissions('create_broadcasts', restrict_admin_usage=True) %}
|
||||
<div class="banner govuk-!-margin-bottom-6">
|
||||
<h1 class="govuk-heading-m govuk-!-margin-bottom-3">This alert is waiting for approval</h1>
|
||||
<p class="govuk-body">
|
||||
Another member of your team needs to approve this alert.
|
||||
</p>
|
||||
{% if not current_service.live %}
|
||||
<p class="govuk-body">
|
||||
This service is in training mode. No real alerts will be sent.
|
||||
</p>
|
||||
{% endif %}
|
||||
{{ page_footer(
|
||||
delete_link=url_for('main.reject_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id),
|
||||
delete_link_text='Reject this alert'
|
||||
) }}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="banner govuk-!-margin-bottom-6">
|
||||
<h1 class="govuk-heading-m govuk-!-margin-bottom-3">This alert is waiting for approval</h1>
|
||||
<p class="govuk-body">
|
||||
You don’t have permission to approve alerts.
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{{ page_header(broadcast_message.template.name) }}
|
||||
|
||||
{% if broadcast_message.status == 'broadcasting' %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-2 live-broadcast live-broadcast--left">
|
||||
Live since {{ broadcast_message.starts_at|format_datetime_relative }} 
|
||||
{%- if not hide_stop_link %}
|
||||
<a href="{{ url_for('.cancel_broadcast_message', service_id=current_service.id, broadcast_message_id=broadcast_message.id) }}" class="destructive-link destructive-link--no-visited-state">Stop sending</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% elif broadcast_message.status == 'rejected' %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-4">
|
||||
Rejected
|
||||
{{ broadcast_message.updated_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-4">
|
||||
Sent
|
||||
{{ broadcast_message.starts_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{{ broadcast_message.template|string }}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<div class="area-list-map-details">
|
||||
{{ govukDetails({
|
||||
"summaryText": "Show map of areas",
|
||||
"html": map(broadcast_message)
|
||||
}) }}
|
||||
</div>
|
||||
|
||||
{% if broadcast_message.status != 'pending-approval' %}
|
||||
<p class="govuk-body govuk-!-margin-bottom-3">
|
||||
{% if broadcast_message.created_by %}
|
||||
Created by {{ broadcast_message.created_by.name }}
|
||||
{%- else %}
|
||||
Created from an API call
|
||||
{%- endif %}
|
||||
{%- if broadcast_message.approved_by %}
|
||||
and approved by {{ broadcast_message.approved_by.name }}
|
||||
{%- endif %}
|
||||
{{- '.' }}
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% if broadcast_message.status == 'broadcasting' %}
|
||||
<p class="govuk-body">
|
||||
Broadcasting stops {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% elif broadcast_message.status == 'cancelled' %}
|
||||
<p class="govuk-body">
|
||||
Stopped by {{ broadcast_message.cancelled_by }}
|
||||
{{ broadcast_message.cancelled_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% elif broadcast_message.status == 'completed' %}
|
||||
<p class="govuk-body">
|
||||
Finished broadcasting {{ broadcast_message.finishes_at|format_datetime_human }}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,49 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% 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/textbox.html" import textbox %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
New alert
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.new_broadcast', service_id=current_service.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header('New alert')}}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
{{ form.name(param_extensions={
|
||||
"classes": "govuk-!-width-full",
|
||||
"hint": {"text": "Your recipients will not see this"},
|
||||
"label": {"text": "Reference"}
|
||||
}) }}
|
||||
{{ textbox(
|
||||
form.template_content,
|
||||
highlight_placeholders=False,
|
||||
autosize=True,
|
||||
width='1-1',
|
||||
rows=5,
|
||||
extra_form_group_classes='govuk-!-margin-bottom-2'
|
||||
) }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-full">
|
||||
<div class="template-content-count">
|
||||
<div data-module="update-status" data-target="template_content" data-updates-url="{{ url_for('.count_content_length', service_id=current_service.id, template_type='broadcast') }}" aria-live="polite">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ page_footer('Continue') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,50 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/textbox.html" import textbox %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
{{ heading_action }} template
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({
|
||||
"href": url_for('main.view_template', service_id=current_service.id, template_id=template.id) if template else url_for('main.choose_template', service_id=current_service.id, template_folder_id=template_folder_id)
|
||||
}) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
{{ page_header('{} template'.format(heading_action)) }}
|
||||
|
||||
{% call form_wrapper() %}
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-two-thirds">
|
||||
{{ form.name(param_extensions={
|
||||
"classes": "govuk-!-width-full",
|
||||
"hint": {"text": "Your recipients will not see this"},
|
||||
}) }}
|
||||
{{ textbox(
|
||||
form.template_content,
|
||||
highlight_placeholders=False,
|
||||
autosize=True,
|
||||
width='1-1',
|
||||
rows=5,
|
||||
extra_form_group_classes='govuk-!-margin-bottom-2'
|
||||
) }}
|
||||
</div>
|
||||
<div class="govuk-grid-column-full">
|
||||
<div class="template-content-count">
|
||||
<div data-module="update-status" data-target="template_content" data-updates-url="{{ url_for('.count_content_length', service_id=current_service.id, template_type='broadcast') }}" aria-live="polite">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{ page_footer('Save') }}
|
||||
</div>
|
||||
</div>
|
||||
{% endcall %}
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,7 +1,6 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/banner.html" import banner_wrapper %}
|
||||
{% from "components/table.html" import mapping_table, row, settings_row, text_field, optional_text_field, edit_field, field, boolean_field with context %}
|
||||
{% from "service_navigation.html" import broadcast_service_name_tag %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Settings
|
||||
@@ -49,265 +48,260 @@
|
||||
{% endcall %}
|
||||
{% endcall %}
|
||||
|
||||
{% if not current_service.has_permission('broadcast') %}
|
||||
{% call mapping_table(
|
||||
caption='Email settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Email settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
{% call row() %}
|
||||
{{ text_field('Send emails') }}
|
||||
{{ boolean_field('email' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
channel='email',
|
||||
service_id=current_service.id
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending emails',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Send emails') }}
|
||||
{{ boolean_field('email' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
channel='email',
|
||||
service_id=current_service.id
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending emails',
|
||||
)}}
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Reply-to email addresses') }}
|
||||
{% call field(status='default' if current_service.count_email_reply_to_addresses == 0 else '') %}
|
||||
{{ current_service.default_email_reply_to_address or 'Not set' }}
|
||||
{% if current_service.count_email_reply_to_addresses > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_email_reply_to_addresses - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Reply-to email addresses') }}
|
||||
{% call field(status='default' if current_service.count_email_reply_to_addresses == 0 else '') %}
|
||||
{{ current_service.default_email_reply_to_address or 'Not set' }}
|
||||
{% if current_service.count_email_reply_to_addresses > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_email_reply_to_addresses - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.service_email_reply_to', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='reply-to email addresses',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% if email_branding_options.something_else_is_only_option %}
|
||||
{% set email_request_url = url_for('.email_branding_something_else', service_id=current_service.id) %}
|
||||
{% else %}
|
||||
{% set email_request_url = url_for('.email_branding_request', service_id=current_service.id) %}
|
||||
{% endif %}
|
||||
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Email branding') }}
|
||||
{{ text_field(current_service.email_branding_name) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
email_request_url,
|
||||
permissions=['manage_service'],
|
||||
suffix='email branding',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Send files by email') }}
|
||||
{{ optional_text_field(current_service.contact_link, default="Not set up", truncate=true) }}
|
||||
{{ edit_field(
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.send_files_by_email_contact_details', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='sending files by email',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
url_for('.service_email_reply_to', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='reply-to email addresses',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Text message settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Send text messages') }}
|
||||
{{ boolean_field('sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
service_id=current_service.id,
|
||||
channel='sms'
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending text messages',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Text message senders') }}
|
||||
{% call field(status='default' if current_service.default_sms_sender == "None" else '') %}
|
||||
{{ current_service.default_sms_sender | nl2br if current_service.default_sms_sender else 'None'}}
|
||||
{% if current_service.count_sms_senders > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_sms_senders - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.service_sms_senders', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='text message senders',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Start text messages with service name') }}
|
||||
{{ boolean_field(current_service.prefix_sms) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_sms_prefix', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for starting text messages with service name',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Send international text messages') }}
|
||||
{{ boolean_field('international_sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_international_sms', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending international text messages',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Receive text messages') }}
|
||||
{{ boolean_field('inbound_sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_inbound_sms', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for receiving text messages',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
{% if email_branding_options.something_else_is_only_option %}
|
||||
{% set email_request_url = url_for('.email_branding_something_else', service_id=current_service.id) %}
|
||||
{% else %}
|
||||
{% set email_request_url = url_for('.email_branding_request', service_id=current_service.id) %}
|
||||
{% endif %}
|
||||
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Email branding') }}
|
||||
{{ text_field(current_service.email_branding_name) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
email_request_url,
|
||||
permissions=['manage_service'],
|
||||
suffix='email branding',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Letter settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Send letters') }}
|
||||
{{ boolean_field('letter' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
channel='letter',
|
||||
service_id=current_service.id
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending letters',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Send international letters') }}
|
||||
{{ boolean_field(current_service.has_permission('international_letters')) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_international_letters', service_id=current_service.id),
|
||||
permissions=['manage_service']
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Sender addresses') }}
|
||||
{% call field(status='' if current_service.count_letter_contact_details else 'default') %}
|
||||
{% if current_service.default_letter_contact_block %}
|
||||
{{ current_service.default_letter_contact_block_html }}
|
||||
{% elif current_service.count_letter_contact_details %}
|
||||
Blank
|
||||
{% else %}
|
||||
Not set
|
||||
{% endif %}
|
||||
{% if current_service.count_letter_contact_details > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_letter_contact_details - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.service_letter_contact_details', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='sender addresses',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Letter branding') }}
|
||||
{{ optional_text_field(current_service.letter_branding.name) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.letter_branding_request', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='letter branding',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='email') %}
|
||||
{{ text_field('Send files by email') }}
|
||||
{{ optional_text_field(current_service.contact_link, default="Not set up", truncate=true) }}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.send_files_by_email_contact_details', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='sending files by email',
|
||||
)}}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Text message settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Send text messages') }}
|
||||
{{ boolean_field('sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
service_id=current_service.id,
|
||||
channel='sms'
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending text messages',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Text message senders') }}
|
||||
{% call field(status='default' if current_service.default_sms_sender == "None" else '') %}
|
||||
{{ current_service.default_sms_sender | nl2br if current_service.default_sms_sender else 'None'}}
|
||||
{% if current_service.count_sms_senders > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_sms_senders - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.service_sms_senders', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='text message senders',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Start text messages with service name') }}
|
||||
{{ boolean_field(current_service.prefix_sms) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_sms_prefix', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for starting text messages with service name',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Send international text messages') }}
|
||||
{{ boolean_field('international_sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_international_sms', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending international text messages',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='sms') %}
|
||||
{{ text_field('Receive text messages') }}
|
||||
{{ boolean_field('inbound_sms' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_inbound_sms', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for receiving text messages',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
{% call mapping_table(
|
||||
caption='Letter settings',
|
||||
field_headings=['Label', 'Value', 'Action'],
|
||||
field_headings_visible=False,
|
||||
caption_visible=True
|
||||
) %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Send letters') }}
|
||||
{{ boolean_field('letter' in current_service.permissions) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for(
|
||||
'.service_set_channel',
|
||||
channel='letter',
|
||||
service_id=current_service.id
|
||||
),
|
||||
permissions=['manage_service'],
|
||||
suffix='your settings for sending letters',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Send international letters') }}
|
||||
{{ boolean_field(current_service.has_permission('international_letters')) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_international_letters', service_id=current_service.id),
|
||||
permissions=['manage_service']
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Sender addresses') }}
|
||||
{% call field(status='' if current_service.count_letter_contact_details else 'default') %}
|
||||
{% if current_service.default_letter_contact_block %}
|
||||
{{ current_service.default_letter_contact_block_html }}
|
||||
{% elif current_service.count_letter_contact_details %}
|
||||
Blank
|
||||
{% else %}
|
||||
Not set
|
||||
{% endif %}
|
||||
{% if current_service.count_letter_contact_details > 1 %}
|
||||
<div class="hint">
|
||||
{{ '…and %d more' | format(current_service.count_letter_contact_details - 1) }}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Manage',
|
||||
url_for('.service_letter_contact_details', service_id=current_service.id),
|
||||
permissions=['manage_service','manage_api_keys'],
|
||||
suffix='sender addresses',
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% call settings_row(if_has_permission='letter') %}
|
||||
{{ text_field('Letter branding') }}
|
||||
{{ optional_text_field(current_service.letter_branding.name) }}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.letter_branding_request', service_id=current_service.id),
|
||||
permissions=['manage_service'],
|
||||
suffix='letter branding',
|
||||
)}}
|
||||
{% endcall %}
|
||||
|
||||
{% endcall %}
|
||||
</div>
|
||||
|
||||
{% if not current_service.has_permission('broadcast')%}
|
||||
{% if current_service.trial_mode %}
|
||||
<h2 class="heading-medium top-gutter-0">Your service is in trial mode</h2>
|
||||
{% if current_service.trial_mode %}
|
||||
<h2 class="heading-medium top-gutter-0">Your service is in trial mode</h2>
|
||||
|
||||
<p class="govuk-body">You can only:</p>
|
||||
<p class="govuk-body">You can only:</p>
|
||||
|
||||
<ul class='list list-bullet'>
|
||||
<li>send {{ current_service.message_limit }} text messages and emails per day</li>
|
||||
<li>send messages to yourself and other people in your team</li>
|
||||
<li>create letter templates, but not send them</li>
|
||||
</ul>
|
||||
<ul class='list list-bullet'>
|
||||
<li>send {{ current_service.message_limit }} text messages and emails per day</li>
|
||||
<li>send messages to yourself and other people in your team</li>
|
||||
<li>create letter templates, but not send them</li>
|
||||
</ul>
|
||||
|
||||
<p class="govuk-body">
|
||||
{% if current_user.has_permissions('manage_service') %}
|
||||
To remove these restrictions, you can send us a
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a>.
|
||||
{% else %}
|
||||
Your service manager can ask to have these restrictions removed.
|
||||
{% endif %}
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
{% if current_user.has_permissions('manage_service') %}
|
||||
To remove these restrictions, you can send us a
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.request_to_go_live', service_id=current_service.id) }}">request to go live</a>.
|
||||
{% else %}
|
||||
Your service manager can ask to have these restrictions removed.
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
{% else %}
|
||||
<h2 class="heading-medium top-gutter-0">Your service is live</h2>
|
||||
{% else %}
|
||||
<h2 class="heading-medium top-gutter-0">Your service is live</h2>
|
||||
|
||||
<p class="govuk-body">
|
||||
You can send up to
|
||||
{{ "{:,}".format(current_service.message_limit) }} messages
|
||||
per day.
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
Problems or comments?
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">Give feedback</a>.
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
You can send up to
|
||||
{{ "{:,}".format(current_service.message_limit) }} messages
|
||||
per day.
|
||||
</p>
|
||||
<p class="govuk-body">
|
||||
Problems or comments?
|
||||
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">Give feedback</a>.
|
||||
</p>
|
||||
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.platform_admin %}
|
||||
@@ -323,7 +317,6 @@
|
||||
caption_visible=False
|
||||
) %}
|
||||
|
||||
{% if not current_service.has_permission('broadcast') %}
|
||||
{% call row() %}
|
||||
{{ text_field('Live')}}
|
||||
{% if current_service.trial_mode and not current_service.organisation_id %}
|
||||
@@ -345,7 +338,6 @@
|
||||
{{ optional_text_field(current_service.billing_details, default="None", wrap=True) }}
|
||||
{{ edit_field('Change', url_for('.edit_service_billing_details', service_id=current_service.id), suffix='billing details for service') }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Notes')}}
|
||||
@@ -353,7 +345,6 @@
|
||||
{{ edit_field('Change', url_for('.edit_service_notes', service_id=current_service.id), suffix='the notes for the service') }}
|
||||
{% endcall %}
|
||||
|
||||
{% if not current_service.has_permission('broadcast') %}
|
||||
{% call row() %}
|
||||
{{ text_field('Organisation')}}
|
||||
{% call field() %}
|
||||
@@ -415,7 +406,6 @@
|
||||
{% endcall %}
|
||||
{{ edit_field('Change', url_for('.data_retention', service_id=current_service.id), suffix='data retention') }}
|
||||
{% endcall %}
|
||||
{% endif %}
|
||||
|
||||
{% for permission in service_permissions %}
|
||||
{% if not service_permissions[permission].requires or current_service.has_permission(service_permissions[permission].requires) %}
|
||||
@@ -435,23 +425,6 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% call row() %}
|
||||
{{ text_field('Emergency alerts')}}
|
||||
{% call field(wrap=True) %}
|
||||
{% if not current_service.broadcast_channel %}
|
||||
Off
|
||||
{% else %}
|
||||
{{ broadcast_service_name_tag(current_service.trial_mode, current_service.broadcast_channel, current_service.allowed_broadcast_provider, left_margin=False) }}
|
||||
{% endif %}
|
||||
{% endcall %}
|
||||
{{ edit_field(
|
||||
'Change',
|
||||
url_for('.service_set_broadcast_channel', service_id=current_service.id),
|
||||
suffix='your settings for emergency alerts'
|
||||
)
|
||||
}}
|
||||
{% endcall %}
|
||||
|
||||
{% endcall %}
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "service_navigation.html" import broadcast_service_name_tag %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Confirm emergency alert settings
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.service_set_broadcast_channel', service_id=current_service.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-five-sixths">
|
||||
{{ page_header('Confirm emergency alert settings') }}
|
||||
<p class="govuk-body">
|
||||
{{ broadcast_service_name_tag(
|
||||
form.account_type.service_mode == 'training',
|
||||
form.account_type.broadcast_channel,
|
||||
form.account_type.provider_restriction,
|
||||
left_margin=False,
|
||||
) }}
|
||||
</p>
|
||||
{% if form.account_type.service_mode == 'training' %}
|
||||
<p class="govuk-body">
|
||||
No phones will receive alerts sent from this service.
|
||||
</p>
|
||||
{% else %}
|
||||
<p class="govuk-body">
|
||||
Members of the public
|
||||
{% if form.account_type.broadcast_channel in ['test', 'operator'] %}
|
||||
who have switched on the {{ form.account_type.broadcast_channel }} channel on their phones
|
||||
{% endif %}
|
||||
will receive alerts sent from this service
|
||||
{%- if form.account_type.broadcast_channel == 'government' -%}
|
||||
, even if they’ve opted out
|
||||
{%- endif %}.
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
<p class="govuk-body">
|
||||
All team member permissions will be removed.
|
||||
</p>
|
||||
|
||||
{% call form_wrapper() %}
|
||||
{{ page_footer('Confirm') }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,33 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Emergency alerts settings
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.service_settings', service_id=current_service.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-five-sixths">
|
||||
{% call form_wrapper() %}
|
||||
{{ form.channel(param_extensions={
|
||||
'fieldset': {
|
||||
'classes': 'govuk-!-margin-top-3',
|
||||
'legend': {
|
||||
'isPageHeading': True,
|
||||
'classes': 'govuk-fieldset__legend--l'
|
||||
}
|
||||
}
|
||||
}) }}
|
||||
{{ page_footer('Continue') }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -1,38 +0,0 @@
|
||||
{% extends "withnav_template.html" %}
|
||||
{% from "components/page-header.html" import page_header %}
|
||||
{% from "components/page-footer.html" import page_footer %}
|
||||
{% from "components/form.html" import form_wrapper %}
|
||||
{% from "components/radios.html" import radio, conditional_radio_panel %}
|
||||
{% from "components/select-input.html" import select_wrapper %}
|
||||
{% from "components/back-link/macro.njk" import govukBackLink %}
|
||||
|
||||
{% block service_page_title %}
|
||||
Choose a mobile network
|
||||
{% endblock %}
|
||||
|
||||
{% block backLink %}
|
||||
{{ govukBackLink({ "href": url_for('.service_set_broadcast_channel', service_id=current_service.id) }) }}
|
||||
{% endblock %}
|
||||
|
||||
{% block maincolumn_content %}
|
||||
|
||||
<div class="govuk-grid-row">
|
||||
<div class="govuk-grid-column-five-sixths">
|
||||
{{ page_header('Choose a mobile network') }}
|
||||
{% call form_wrapper() %}
|
||||
{% call select_wrapper(form.all_networks, hide_legend=True) %}
|
||||
{% for option in form.all_networks %}
|
||||
{{ radio(option, data_target='single-network' if option.data == False else None) }}
|
||||
{% endfor %}
|
||||
{% endcall %}
|
||||
{% call conditional_radio_panel('single-network') %}
|
||||
{{ form.network(
|
||||
param_extensions={'fieldset': {'legend': {'classes': 'govuk-visually-hidden'}}}
|
||||
) }}
|
||||
{% endcall %}
|
||||
{{ page_footer('Continue') }}
|
||||
{% endcall %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@@ -43,21 +43,6 @@
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% elif template.template_type == 'broadcast' %}
|
||||
{% if current_user.has_permissions('create_broadcasts') %}
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<a href="{{ url_for(".broadcast", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
||||
Prepare to send
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
<div class="govuk-grid-column-one-half">
|
||||
<a href="{{ url_for(".edit_service_template", service_id=current_service.id, template_id=template.id) }}" class="govuk-link govuk-link--no-visited-state pill-separate-item">
|
||||
Edit<span class="govuk-visually-hidden"> this template</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% if current_user.has_permissions('send_messages', restrict_admin_usage=True) %}
|
||||
<div class="govuk-grid-column-one-half">
|
||||
|
||||
@@ -21,16 +21,13 @@
|
||||
|
||||
<p class="govuk-body">
|
||||
Every message starts with a template. You can change it later.
|
||||
{% if current_service.has_permission('broadcast') %}
|
||||
You haven’t added any templates yet.
|
||||
{% else %}
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
You need a template before you can
|
||||
{% else %}
|
||||
You need to ask your service manager to add templates before you can
|
||||
{% endif %}
|
||||
send emails, text messages or letters.
|
||||
{% endif %}
|
||||
|
||||
{% if current_user.has_permissions('manage_templates') %}
|
||||
You need a template before you can
|
||||
{% else %}
|
||||
You need to ask your service manager to add templates before you can
|
||||
{% endif %}
|
||||
send emails, text messages or letters.
|
||||
</p>
|
||||
|
||||
{% else %}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
</span>
|
||||
 
|
||||
{% endif %}
|
||||
{% if template.template_type not in ('letter', 'broadcast') %}
|
||||
{% if template.template_type not in ('letter') %}
|
||||
{% if not template._template.redact_personalisation %}
|
||||
<span class="page-footer-link page-footer-delete-link-without-button">
|
||||
<a class="govuk-link govuk-link--destructive" href="{{ url_for('.confirm_redact_template', service_id=current_service.id, template_id=template.id) }}">Hide personalisation after sending</a>
|
||||
@@ -82,10 +82,8 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if template.template_type != 'broadcast' %}
|
||||
<div class="bottom-gutter-1-2" style="display:none">
|
||||
{{ copy_to_clipboard(template.id, name="Template ID", thing='template ID') }}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="bottom-gutter-1-2" style="display:none">
|
||||
{{ copy_to_clipboard(template.id, name="Template ID", thing='template ID') }}
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user