Merge branch 'main' into uk-copy-fixing

* main: (28 commits)
  Enable network policy in demo env
  Demo deploy should use demo variables
  Enable network policy in staging env
  Update cryptography library
  Add demo application environment
  Setup github workflows for new spaces
  Switch terraform over to cloud.gov org
  trim non-existant pages further
  some test tweaks for page reductions
  Update features.html
  Update roadmap.html
  streamline navs & menus
  update 500 error page
  comment out another letters thing
  update roadmap
  Address PR feedback
  Use stable OWASP image because weekly is hanging
  Run js-lint as part of the full test target
  Compile js changes into bundles
  Update tests to use most recent jest and supporting libraries
  ...
This commit is contained in:
Ryan Ahearn
2022-11-04 13:16:37 -04:00
175 changed files with 11202 additions and 49169 deletions

View File

@@ -138,20 +138,7 @@
{% endblock %}
{% block footer %}
{% set meta_items = [
{
"href": url_for("main.privacy"),
"text": "Privacy"
},
{
"href": url_for("main.cookies"),
"text": "Cookies"
},
{
"href": url_for("main.accessibility_statement"),
"text": "Accessibility statement"
}
] %}
{% if current_service and current_service.research_mode %}
{% set meta_suffix = 'Built by the <a href="https://www.gsa.gov/about-us/organization/federal-acquisition-service/technology-transformation-services/tts-solutions" class="govuk-footer__link">Technology Transformation Service</a><span id="research-mode" class="research-mode">research mode</span>' %}
@@ -162,28 +149,6 @@
{{ govukFooter({
"classes": "js-footer",
"navigation": [
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact support"
},
{
"href": "https://status.notifications.service.gov.uk",
"text": "System status"
},
{
"href": url_for('main.performance'),
"text": "Performance data"
},
{
"href": "https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC",
"text": "Chat to us on Slack"
}
]
},
{
"title": "About Notify",
"columns": 1,
@@ -196,10 +161,6 @@
"href": url_for("main.roadmap"),
"text": "Roadmap"
},
{
"href": url_for("main.who_can_use_notify"),
"text": "Who can use Notify",
},
{
"href": url_for("main.security"),
"text": "Security"
@@ -208,28 +169,6 @@
"href": url_for("main.terms"),
"text": "Terms of use"
},
{
"href": "https://gds.blog.gov.uk/category/gov-uk-notify/",
"text": "Blog"
}
]
},
{
"title": "Pricing and payment",
"columns": 1,
"items": [
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.how_to_pay"),
"text": "How to pay"
},
{
"href": url_for("main.billing_details"),
"text": "Billing details"
}
]
},
{
@@ -240,6 +179,10 @@
"href": url_for("main.get_started"),
"text": "Get started"
},
{
"href": url_for("main.pricing"),
"text": "Pricing"
},
{
"href": url_for("main.trial_mode_new"),
"text": "Trial mode"
@@ -257,7 +200,17 @@
"text": "API documentation"
}
]
}
},
{
"title": "Support",
"columns": 1,
"items": [
{
"href": url_for('main.support'),
"text": "Contact us"
},
]
},
],
"meta": {
"items": meta_items,

View File

@@ -9,11 +9,11 @@
<p class="govuk-body">
Try again later.
</p>
<p class="govuk-body">
<!-- <p class="govuk-body">
You can check our <a class="govuk-link govuk-link--no-visited-state" href="https://status.notifications.service.gov.uk">system status</a> page to see if there are any known issues.
</p>
</p> -->
<p class="govuk-body">
To report a problem, email <a class="govuk-link govuk-link--no-visited-state" href="mailto:gov-uk-notify-support@digital.cabinet-office.gov.uk">gov-uk-notify-support@digital.cabinet-office.gov.uk</a>
To report a problem, please email <a class="govuk-link govuk-link--no-visited-state" href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a>.
</p>
</div>
</div>

View File

@@ -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 %}

View File

@@ -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>

View File

@@ -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

View File

@@ -50,37 +50,6 @@
</div>
{% endif %}
{% endif %}
{#- The SVG needs `focusable="false"` so that Internet Explorer does not
treat it as an interactive element - without this it will be
'focusable' when using the keyboard to navigate. #}
<svg
role="presentation"
focusable="false"
class="govuk-footer__licence-logo"
xmlns="http://www.w3.org/2000/svg"
viewbox="0 0 483.2 195.7"
height="17"
width="41"
>
<path
fill="currentColor"
d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"
/>
</svg>
<span class="govuk-footer__licence-description">
All content is available under the
<a
class="govuk-footer__link"
href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/"
rel="license"
>Open Government Licence v3.0</a>, except where otherwise stated
</span>
</div>
<div class="govuk-footer__meta-item">
<a
class="govuk-footer__link govuk-footer__copyright-logo"
href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/"
>© Crown copyright</a>
</div>
</div>
</div>

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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&nbsp;
</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&nbsp;
</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 %}

View File

@@ -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 %}

View File

@@ -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: '&copy; <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>

View File

@@ -1 +0,0 @@
<link rel="stylesheet" href="{{ asset_url('stylesheets/map.css') }}" />

View File

@@ -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>

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -1,36 +0,0 @@
{% from "components/banner.html" import banner_wrapper %}
{% extends "admin_template.html" %}
{% block per_page_title %}
Youve 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">
Youve been invited to use US&nbsp;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 %}

View File

@@ -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 %}

View File

@@ -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 its 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 its 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 %}

View File

@@ -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">
Its broadcast directly from a mobile phone mast, so you dont
need to know anyones 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 %}

View File

@@ -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 %}
Youre 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">
Youre in training mode.
</h1>
<p class="govuk-body heading-medium">
Theres 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&nbsp;emergency.
</p>
<p class="govuk-body heading-medium">
When youre 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 %}

View File

@@ -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 youre 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 youre 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 %}

View File

@@ -1,39 +0,0 @@
{% from "components/banner.html" import banner_wrapper %}
{% extends "admin_template.html" %}
{% block per_page_title %}
Youve 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">
Youve 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 %}

View File

@@ -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 %}

View File

@@ -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 youll 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 youre 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 anyones 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 dont 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 }}&ensp;
{%- 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 %}

View File

@@ -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">
&nbsp;
</div>
</div>
{{ page_footer('Continue') }}
</div>
</div>
{% endcall %}
{% endblock %}

View File

@@ -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">
&nbsp;
</div>
</div>
{{ page_footer('Save') }}
</div>
</div>
{% endcall %}
{% endblock %}

View File

@@ -9,8 +9,8 @@
{% block content_column_content %}
<h1 class="heading-large">Features</h1>
<p class="govuk-body">If you work for central government, a local authority or the NHS, you can use US Notify to keep your users updated.</p>
<p class="govuk-body">Notify makes it easy to create, customise and send:</p>
<p class="govuk-body">If you work for the federal government, you can use US Notify to keep your users updated.</p>
<p class="govuk-body">Notify makes it easy to create, customize and send:</p>
<ul class="list list-bullet">
<li><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features_email') }}">emails</a></li>
<li><a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features_sms') }}">text messages</a></li>
@@ -70,8 +70,8 @@
<p class="govuk-body">Notify uses two-factor authentication (2FA) to keep your account secure. When you sign in, well send a unique one-time code to your phone and ask you to enter it before we let you use your account.</p>
<p class="govuk-body">Read more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.security') }}">security</a>.
<h2 class="heading-medium" id="support">Support</h2>
<!-- <h2 class="heading-medium" id="support">Support</h2>
<p class="govuk-body">Notify provides 24-hour online support. If you have an emergency outside office hours, well reply within 30 minutes.</p>
<p class="govuk-body">Find out more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">support</a>.</p>
<p class="govuk-body">Find out more about <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.support') }}">support</a>.</p> -->
{% endblock %}

View File

@@ -15,9 +15,6 @@
<li class="get-started-list__item">
<h2 class="get-started-list__heading">Check if US Notify is right for you</h2>
<p class="govuk-body">Read about our <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.features') }}">features</a>, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.pricing') }}">pricing</a> and <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.roadmap') }}">roadmap</a>.</p>
<p class="govuk-body">
Check <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('.who_can_use_notify') }}">whether your organisation can use Notify</a>.
</p>
</li>
<li class="get-started-list__item">

View File

@@ -23,7 +23,7 @@
<h2 class="heading-medium">More information</h2>
<p class="govuk-body">The US Notify Service Manual has advice on:</p>
<p class="govuk-body">The UK Notify Service Manual has additional advice on:</p>
<ul class="list list-bullet">
<li><a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/service-manual/design/sending-emails-and-text-messages">planning and writing text messages and emails</a></li>

View File

@@ -1,51 +0,0 @@
{% extends "content_template.html" %}
{% from "components/page-header.html" import page_header %}
{% block per_page_title %}
Who can use Notify
{% endblock %}
{% block content_column_content %}
{{ page_header(
'Who can use Notify'
) }}
<p class="govuk-body">
US Notify is available to:
</p>
<ul class="list list-bullet">
<li>central government departments</li>
<li>emergency services</li>
<li>local authorities</li>
<li>the armed forces</li>
<li>the NHS and GP practices</li>
<li>state-funded schools</li>
</ul>
<p class="govuk-body">
If you work for one of these organisations but get an error when you try to create an account, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">contact support</a>.
</p>
<h2 class="govuk-heading-m" id="suppliers">Suppliers</h2>
<p class="govuk-body">
If youre doing work for a public sector organisation you can use US&nbsp;Notify.
</p>
<p class="govuk-body">
Someone from the public sector organisation youre working with needs to set up the account. Then they can invite you as a team member.
</p>
<h2 class="govuk-heading-m" id="charities">Charities</h2>
<p class="govuk-body">
Notify is not currently available to charities.
</p>
<h2 class="govuk-heading-m" id="public">Members of the public</h2>
<p class="govuk-body">
The US Notify service is only for people who work in the government
or other public sector organisations.
</p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk">Find government services and information on usa.gov</a>.
</p>
{% endblock %}

View File

@@ -67,7 +67,7 @@
{% endcall %}
</div>
<h2 id="letter-statuses" class="heading-medium">Letters</h2>
<!-- <h2 id="letter-statuses" class="heading-medium">Letters</h2>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Message statuses letters',
@@ -94,6 +94,6 @@
<p class="govuk-body">Every letter we send includes our printers address on the back of the envelope. Its not possible to customise the return address.</p>
<p class="govuk-body">Returned mail is destroyed by our printer.</p>
<p class="govuk-body">Each letter has a unique ID. Our printer sends us the ID of every letter they destroy. Well contact you if the IDs match any of your letters. This is a partly manual process, so it can take a few weeks.</p>
<p class="govuk-body">Each letter has a unique ID. Our printer sends us the ID of every letter they destroy. Well contact you if the IDs match any of your letters. This is a partly manual process, so it can take a few weeks.</p> -->
{% endblock %}

View File

@@ -9,7 +9,7 @@
{{ page_header('How to pay') }}
<p class="govuk-body">
<!-- <p class="govuk-body">
If you use US Notify to send text messages or letters, you may need to send us a <a class="govuk-link govuk-link--no-visited-state" href="#purchase-orders">purchase order</a>.
</p>
@@ -60,6 +60,6 @@
<p class="govuk-body">
Your organisation may need to <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.billing_details') }}">add the Cabinet Office as a supplier</a> before you can raise a <abbr title="purchase order">PO</abbr>.
</p>
</p> -->
{% endblock %}

View File

@@ -12,61 +12,87 @@
{{ content_metadata(
data={
"Last updated": "27 April 2022",
"Next review due": "12 July 2022"
"Last updated": "1 November 2022",
"Next review due on": "15 December 2022"
}
) }}
<p class="govuk-body">The US Notify roadmap shows what were working on and some of the <a class="govuk-link govuk-link--no-visited-state" href="#things-we-have-done">things weve done</a>.</p>
<p class="govuk-body">The roadmap is only a guide. It does not cover everything we do, and some things may change.</p>
<p class="govuk-body">The Notify roadmap shows what were working on and what we're planning to do next.</p>
<p class="govuk-body">This roadmap is only a guide. It does not cover everything we do, and some things may change.</p>
<p class="govuk-body">You can <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('.support')}}">contact us</a> if you have any questions about the roadmap or suggestions for new features.</p>
<h2 class="heading-medium" id="things-we-are-working-on">Things were working on</h2>
<h2 class="heading-medium" id="things-we-are-working-on">What were working on</h2>
<h3 class="heading-small" id="now">Now</h3>
<p class="govuk-body">We are investigating the Notify concept, building on the notifications tool pioneered by the UK.</p>
<p class="govuk-body">To do this, we are convening a pilot with a small set of partners.</p>
<p class="govuk-body">Goals during this stage:</p>
<ul class="list list-bullet">
<li>Make it easier for services to pick their own <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('main.branding_and_customisation')}}">email branding</a></li>
<li>Help services to get better value for money</li>
<li>Improve the time it takes some of our webpages to load</li>
<li>Achieve compliance to begin piloting, such as ATO and privacy standards</li>
<li>Demonstrate that a government-run notifications tool provides a unique value</li>
<li>Gather data from the pilot to improve the product</li>
</ul>
<p class="govuk-body">Features prioritized during this stage:</p>
<ul class="list list-bullet">
<li>Bulk, individually customizable one-way SMS sending via web UI</li>
<li>Organization permissions settings for various team members to edit/send</li>
<li>Reusable message templates</li>
<li>7-day records deletion</li>
<li>Message send/failure analytics</li>
</ul>
<h3 class="heading-small" id="next">Next</h3>
<p class="govuk-body">If the pilot is successful, we hope to recruit additional high-impact partners to improve outcomes for low-income individuals and families.</p>
<p class="govuk-body">Goals during this stage:</p>
<ul class="list list-bullet">
<li>Explore ways to share common content patterns</li>
<li>Make it easier for organisations to find the usage data they need</li>
<li>Complement Notify with practical guidance and support services</li>
<li>Iterate on existing features and implement new features based on what we've learned so far</li>
<li>Hone our measurement approaches to better quantify impact</li>
</ul>
<p class="govuk-body">Features prioritized during this stage:</p>
<ul class="list list-bullet">
<li>SMS sending via API integration</li>
<li>Single-level decision two-way messaging (e.g. reply “YES” if, or “NO” if…)</li>
<li>Self-service account creation</li>
<li>Application status page</li>
<li>Scheduled send option</li>
</ul>
<h3 class="heading-small" id="later">Later</h3>
<p class="govuk-body">In the future, we may decide to expand beyond SMS, or to offer the service government-wide</p>
<p class="govuk-body">Features to be considered during this stage:</p>
<ul class="list list-bullet">
<li>Let services preview their email branding</li>
<li>Let services upload their own logo for emails and letters</li>
<li>Meet our targets for <a class="govuk-link govuk-link--no-visited-state" href="{{url_for('main.accessibility_statement')}}">accessibility</a></li>
<li>Email sending via UI and API</li>
<li>Multiple-level decision two-way messaging (greater than one layer decision-tree)</li>
<li>Open-text reply two-way messaging (rather than reply yes or no, 1 or 2, etc.)</li>
<li>Multilingual interface and content library options</li>
<li>Recurring scheduled send (e.g. “Send each Monday for 3 weeks”)</li>
</ul>
<h2 class="heading-medium" id="things-we-have-done">Things weve done</h2>
<!-- <h2 class="heading-medium" id="things-we-have-done">Things weve done</h2>
<p class="govuk-body">Recently we have:</p>
<ul class="list list-bullet">
<li>upgraded some of our software dependencies</li>
<li>completed our annual IT health check</li>
<li>tested new ways for services to upload their own brand logo</li>
<li>improved our performance by <a class="govuk-link govuk-link--no-visited-state" href="https://technology.blog.gov.uk/2022/02/01/upgrading-celery-on-gov-uk-notify/">upgrading the software we use</a></li>
<li>made our website work better in Windows high contrast mode</li>
<li>increased our capacity at short notice during a busy period</li>
<li>added quarterly billing reports that organisations can download</li>
<li></li>
<li></li>
</ul>
<p class="govuk-body">Between April 2021 and March 2022 we sent a total of 2.7 billion notifications. Half of those were for services set up in response to the coronavirus (COVID-19) pandemic.</p>
</ul> -->
{% endblock %}

View File

@@ -23,22 +23,22 @@
</ul>
<p class="govuk-body">Any recipient data you upload is only held for 7 days.</p>
<p class="govuk-body">If you <a class="govuk-link govuk-link--no-visited-state" href="/features/email#send-files">send a file by email</a>, the file will be available for the recipient to download for 18 months.</p>
<p class="govuk-body">The Cabinet Office acts as data processor for Notify. Your organisation is the data controller.</p>
<h3 class="heading-small">Data Protection Act</h3>
<!-- <p class="govuk-body">The Cabinet Office acts as data processor for Notify. Your organisation is the data controller.</p> -->
<!-- <h3 class="heading-small">Data Protection Act</h3>
<p class="govuk-body">Notify complies with data protection law. To make sure it stays compliant, there are regular legal reviews of the services:</p>
<ul class="list list-bullet">
<li>privacy policy</li>
<li>terms of use</li>
<li>approach to data sharing</li>
</ul>
</ul> -->
<h2 class="heading-medium" id="technical-security">Technical security</h2>
<p class="govuk-body">Other technical security controls on Notify include:</p>
<!-- <p class="govuk-body">Other technical security controls on Notify include:</p>
<ul class="list list-bullet">
<li>compliance with National Cyber Security Centre (NCSC) Cloud Security Principles</li>
<li>protective monitoring to record activity, and raise alerts about any suspicious activity</li>
<li>using JSON Web Tokens, to avoid sending API keys when your service talks to Notify</li>
</ul>
</ul> -->
<h3 class="heading-small">Protect sensitive information</h3>
<p class="govuk-body">Some messages include sensitive information like security codes or password reset links.</p>
@@ -54,16 +54,16 @@
</ul>
<p class="govuk-body">If signing in with a text message is a problem for your team, <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.support') }}">contact us</a> to find out about using an email link instead.</p>
<h2 class="heading-medium" id="information-risk-management">Information risk management</h2>
<!-- <h2 class="heading-medium" id="information-risk-management">Information risk management</h2>
<p class="govuk-body">Our approach to information risk management follows NCSC guidance. It assesses:</p>
<ul class="list list-bullet">
<li>how Notify is built</li>
<li>the infrastructure Notify is built upon</li>
<li>support for the Notify service</li>
</ul>
<p class="govuk-body">This approach also applies to the service providers Notify uses to send messages.</p>
<p class="govuk-body">This approach also applies to the service providers Notify uses to send messages.</p> -->
<h2 class="heading-medium" id="how-we-manage-risk">How we manage risks on Notify</h2>
<!-- <h2 class="heading-medium" id="how-we-manage-risk">How we manage risks on Notify</h2>
<p class="govuk-body">Things we do to manage risks on Notify include:</p>
<ul class="list list-bullet">
<li>formal risk assessments based on <a class="govuk-link govuk-link--no-visited-state" href="http://www.iso.org/iso/catalogue_detail?csnumber=56742">ISO 27005:2011</a> and National Cyber Security Centre guidance</li>
@@ -71,15 +71,15 @@
<li>residual risk statement preparation and active management of the risk treatment plan</li>
<li>regular updates to the Privacy Impact Assessment</li>
<li>security impact assessments</li>
</ul>
</ul> -->
<h2 class="heading-medium" id="cabinet-office-approval">Cabinet Office approval</h2>
<!-- <h2 class="heading-medium" id="cabinet-office-approval">Cabinet Office approval</h2>
<p class="govuk-body">Notify has been assessed and approved by the Cabinet Office Senior Information Risk Officer (SIRO). The SIRO checks this approval once a year.</p>
<p class="govuk-body">Notify also has approval from the Office of the Governments SIRO to host data within the EEA.</p>
<h2 class="heading-medium" id="classifications-and-security-vetting">Classifications and security vetting</h2>
<p class="govuk-body">You can use Notify to send messages classified as OFFICIAL or OFFICIAL-SENSITIVE under the <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/publications/government-security-classifications">Government Security Classifications</a> policy.</p>
<p class="govuk-body">Notify does not process data classified as SECRET or TOP SECRET.</p>
<p class="govuk-body">The Notify team has Security Check (SC) level clearance from <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/organisations/united-kingdom-security-vetting">United Kingdom Security Vetting</a> (UKSV).</p>
<p class="govuk-body">The Notify team has Security Check (SC) level clearance from <a class="govuk-link govuk-link--no-visited-state" href="https://www.gov.uk/government/organisations/united-kingdom-security-vetting">United Kingdom Security Vetting</a> (UKSV).</p> -->
{% endblock %}

View File

@@ -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,158 +48,156 @@
{% 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
) %}
{% 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 row() %}
{{ text_field('Send text messages') }}
{{ boolean_field('sms' in current_service.permissions) }}
{{ edit_field(
{% 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(
'Manage',
url_for('.send_files_by_email_contact_details', service_id=current_service.id),
permissions=['manage_service'],
suffix='sending files by email',
)}}
{% endcall %}
{% 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_channel',
service_id=current_service.id,
channel='sms'
),
url_for('.service_set_sms_prefix', service_id=current_service.id),
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 %}
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'],
@@ -270,44 +267,42 @@
{% endcall %}
{% endcall %} -->
{% endif %}
</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 +318,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 +339,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 +346,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 +407,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 +426,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>

View File

@@ -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 theyve 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 %}

View File

@@ -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 %}

View File

@@ -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 %}

View File

@@ -3,15 +3,20 @@
{% from "components/form.html" import form_wrapper %}
{% block per_page_title %}
Support
Contact us
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Support</h1>
<p class="govuk-body">US Notify provides 24-hour online support.</p>
<h1 class="heading-large">Contact us</h1>
<p class="govuk-body">We are available at <a class="govuk-link govuk-link--no-visited-state"" href="mailto:tts-benefits-studio@gsa.gov">tts-benefits-studio@gsa.gov</a>.</p>
{% call form_wrapper() %}
<p class="govuk-body">You can expect a response within 1 business day.</p>
<!-- <p class="govuk-body">US Notify provides 24-hour online support.</p> -->
<!-- {% call form_wrapper() %}
{% if current_user.is_authenticated %}
{{ form.support_type }}
{% else %}
@@ -23,8 +28,6 @@
{{ page_footer('Continue') }}
{% endcall %}
<p class="govuk-body">You can also <a class="govuk-link govuk-link--no-visited-state" href="https://ukgovernmentdigital.slack.com/messages/C0E1ADVPC">contact us on Slack</a>.</p>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<h2 class="heading-medium">Office hours</h2>
@@ -42,6 +45,6 @@
<li>a 500 response code appears when you try to send messages using the API</li>
</ul>
</div>
</div>
</div> -->
{% endblock %}

View File

@@ -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">

View File

@@ -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 havent 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 %}

View File

@@ -70,7 +70,7 @@
</span>
&emsp;
{% 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 %}