Add form to set service broadcast account type

Note, no option at the moment to set the service broadcast account type
as None, or back to without the broadcast permission. This has been done
for speed of development given the chance of us needing this is very
low. We can add it later if we need to.
This commit is contained in:
David McDonald
2021-02-15 21:02:37 +00:00
parent 6837b76d44
commit f8f3d44511
12 changed files with 393 additions and 1 deletions

View File

@@ -428,6 +428,23 @@
{% endif %}
{% endfor %}
{% call row() %}
{{ text_field('Send cell broadcasts')}}
{% call field(wrap=True) %}
{% if not current_service.broadcast_channel %}
Off
{% else %}
{% if current_service.live %}Live{% else %}Training mode{% endif %} - {% if current_service.allowed_broadcast_provider %}{{ current_service.allowed_broadcast_provider|format_mobile_network }} network{% else %}All networks{% endif %} - {% if current_service.broadcast_channel == "test" %}Test channel only{% else %}Public channel{% endif %}
{% endif %}
{% endcall %}
{{ edit_field(
'Change',
url_for('.service_set_broadcast_account_type', service_id=current_service.id),
suffix='your settings for Send cell broadcasts'
)
}}
{% endcall %}
{% endcall %}
</div>

View File

@@ -0,0 +1,32 @@
{% 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 %}
Send cell broadcasts
{% endblock %}
{% block maincolumn_content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-five-sixths">
{{ govukBackLink({
"text": "Back",
"href": url_for('.service_settings', service_id=current_service.id)
}) }}
{% call form_wrapper() %}
{{ form.account_type(param_extensions={
'fieldset': {
'legend': {
'isPageHeading': True,
'classes': 'govuk-fieldset__legend--l'
}
}
}) }}
{{ page_footer('Save') }}
{% endcall %}
</div>
</div>
{% endblock %}