mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 01:55:41 -04:00
remove broadcast-related code
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user