mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-08 10:28:57 -04:00
Email auth is a new feature that currently we’ve only given to teams who have contact us with a problem. At the moment, we’re aware of all the teams that are sharing phone numbers when they sign in. We think that in the future there will be other teams who encounter this problem. So we should let them know that they should contact us if they are having the problem. At the moment we want to talk to teams before giving them access to the feature, so that we’re confident it’s only going to teams from whom it’s more secure than using a text message code.
301 lines
12 KiB
HTML
301 lines
12 KiB
HTML
{% extends "withnav_template.html" %}
|
|
{% from "components/banner.html" import banner_wrapper %}
|
|
{% from "components/browse-list.html" import browse_list %}
|
|
{% from "components/table.html" import mapping_table, row, text_field, optional_text_field, edit_field, field, boolean_field %}
|
|
|
|
{% block service_page_title %}
|
|
Settings
|
|
{% endblock %}
|
|
|
|
{% block maincolumn_content %}
|
|
|
|
<h1 class="heading-large">Settings</h1>
|
|
|
|
<div class="bottom-gutter-3-2 dashboard-table body-copy-table">
|
|
|
|
{% call mapping_table(
|
|
caption='General',
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
field_headings_visible=False,
|
|
caption_visible=False
|
|
) %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('Service name') }}
|
|
{{ text_field(current_service.name) }}
|
|
{{ edit_field('Change', url_for('.service_name_change', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('Sign-in method') }}
|
|
{{ text_field(
|
|
'Email link or text message code'
|
|
if 'email_auth' in current_service.permissions
|
|
else 'Text message code'
|
|
) }}
|
|
{{ edit_field('Change', url_for('.service_set_auth_type', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% endcall %}
|
|
|
|
{% call mapping_table(
|
|
caption='Email',
|
|
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_email', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% if 'email' in current_service.permissions %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('Email reply to addresses') }}
|
|
{% call field(status='default' if default_reply_to_email_address == "Not set" else '') %}
|
|
|
|
{{ default_reply_to_email_address }}
|
|
{% if reply_to_email_address_count > 1 %}
|
|
<div class="hint">
|
|
{{ '…and %d more' | format(reply_to_email_address_count - 1) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endcall %}
|
|
{{ edit_field(
|
|
'Manage' if reply_to_email_address_count else 'Change',
|
|
url_for('.service_email_reply_to', service_id=current_service.id))
|
|
}}
|
|
{% endcall %}
|
|
|
|
{% endif %}
|
|
|
|
{% endcall %}
|
|
|
|
{% call mapping_table(
|
|
caption='Text messages',
|
|
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_sms', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% if 'sms' in current_service.permissions %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('Text message sender') }}
|
|
{% call field(status='default' if default_sms_sender == "None" else '') %}
|
|
{{ default_sms_sender | string | nl2br | safe if default_sms_sender else 'None'}}
|
|
{% if sms_sender_count > 1 %}
|
|
<div class="hint">
|
|
{{ '…and %d more' | format(sms_sender_count - 1) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endcall %}
|
|
{{ edit_field('Manage' if sms_sender_count else 'Change', url_for('.service_sms_senders', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('Text messages start with service name') }}
|
|
{{ boolean_field(prefix_sms) }}
|
|
{{ edit_field('Change', url_for('.service_set_sms_prefix', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% call row() %}
|
|
{{ text_field('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)) }}
|
|
{% endcall %}
|
|
|
|
{% call row() %}
|
|
{{ 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)) }}
|
|
{% endcall %}
|
|
|
|
{% if can_receive_inbound %}
|
|
{% call row() %}
|
|
{{ text_field('Callback URL for received text messages') }}
|
|
{{ optional_text_field(inbound_api_url) }}
|
|
{{ edit_field('Change', url_for('.service_set_inbound_api', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
{% endcall %}
|
|
|
|
{% call mapping_table(
|
|
caption='Letters',
|
|
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_letters', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
|
|
{% if 'letter' in current_service.permissions %}
|
|
{% call row() %}
|
|
{{ text_field('Sender addresses') }}
|
|
{% call field(status='default' if default_letter_contact_block == "Not set" else '') %}
|
|
{{ default_letter_contact_block | string | nl2br | safe if default_letter_contact_block else 'Not set'}}
|
|
{% if letter_contact_details_count > 1 %}
|
|
<div class="hint">
|
|
{{ '…and %d more' | format(letter_contact_details_count - 1) }}
|
|
</div>
|
|
{% endif %}
|
|
{% endcall %}
|
|
{{ edit_field('Manage' if letter_contact_details_count else 'Change', url_for('.service_letter_contact_details', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% endif %}
|
|
|
|
{% endcall %}
|
|
</div>
|
|
|
|
{% if current_service.restricted %}
|
|
<h2 class="heading-medium">Your service is in trial mode</h2>
|
|
|
|
<ul class='list list-bullet'>
|
|
<li>you can only send messages to yourself</li>
|
|
<li>you can add people to your team, then you can send messages to them too</li>
|
|
<li>you can only send 50 messages per day</li>
|
|
</ul>
|
|
|
|
<p>
|
|
To remove these restrictions
|
|
<a href="{{ url_for('.service_request_to_go_live', service_id=current_service.id) }}">request to go live</a>.
|
|
</p>
|
|
{% else %}
|
|
<h2 class="heading-medium">Your service is live</h2>
|
|
|
|
<p>
|
|
You can send up to
|
|
{{ "{:,}".format(current_service.message_limit) }} messages
|
|
per day.
|
|
</p>
|
|
<p>
|
|
Problems or comments?
|
|
<a href="{{ url_for('main.support') }}">Give feedback</a>.
|
|
</p>
|
|
|
|
{% endif %}
|
|
|
|
{% if current_user.has_permissions([], admin_override=True) %}
|
|
|
|
<h2 class="heading-medium">Platform admin settings</h2>
|
|
|
|
{% call mapping_table(
|
|
caption='Settings',
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
field_headings_visible=False,
|
|
caption_visible=False
|
|
) %}
|
|
{% call row() %}
|
|
{{ text_field('Organisation type')}}
|
|
{{ optional_text_field(
|
|
(current_service.organisation_type or '')|title
|
|
) }}
|
|
{{ edit_field('Change', url_for('.set_organisation_type', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Free text message allowance')}}
|
|
{{ text_field('{:,}'.format(free_sms_fragment_limit or 0)) }}
|
|
{{ edit_field('Change', url_for('.set_free_sms_allowance', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Email branding' )}}
|
|
{% call field() %}
|
|
{% if current_service.branding == 'govuk' %}
|
|
GOV.UK
|
|
{% elif current_service.branding == 'both' %}
|
|
GOV.UK and {{ organisation.name if organisation else None }}
|
|
{% elif current_service.branding == 'org' %}
|
|
Only {{ organisation.name if organisation else None }}
|
|
{% elif current_service.branding == 'org_banner' %}
|
|
Only {{ organisation.name if organisation else None }} banner
|
|
{% endif %}
|
|
{% endcall %}
|
|
{{ edit_field('Change', url_for('.service_set_branding_and_org', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% call row() %}
|
|
{{ text_field('Letter branding')}}
|
|
{{ text_field(letter_branding) }}
|
|
{{ edit_field('Change', url_for('.set_letter_branding', service_id=current_service.id)) }}
|
|
{% endcall %}
|
|
{% endcall %}
|
|
|
|
<ul>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_live', service_id=current_service.id) }}" class="button">
|
|
{{ 'Make service live' if current_service.restricted else 'Revert service to trial mode' }}
|
|
</a>
|
|
</li>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_research_mode', service_id=current_service.id) }}" class="button">
|
|
{{ 'Take service out of research mode' if current_service.research_mode else 'Put into research mode' }}
|
|
</a>
|
|
</li>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_can_send_email', service_id=current_service.id) }}" class="button">
|
|
{{ 'Stop sending emails' if 'email' in current_service.permissions else 'Allow to send emails' }}
|
|
</a>
|
|
</li>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_can_send_letters', service_id=current_service.id) }}" class="button">
|
|
{{ 'Stop sending letters' if 'letter' in current_service.permissions else 'Allow to send letters' }}
|
|
</a>
|
|
</li>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_can_send_sms', service_id=current_service.id) }}" class="button">
|
|
{{ 'Stop sending sms' if 'sms' in current_service.permissions else 'Allow to send sms' }}
|
|
</a>
|
|
</li>
|
|
{% if 'sms' in current_service.permissions %}
|
|
<li class="bottom-gutter">
|
|
{% if not can_receive_inbound %}
|
|
<a href="{{ url_for('.service_set_inbound_number', service_id=current_service.id, set_inbound_sms=True) }}" class="button">
|
|
Allow inbound sms
|
|
</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endif %}
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.service_switch_email_auth', service_id=current_service.id) }}" class="button">
|
|
{{ 'Stop editing user auth' if 'email_auth' in current_service.permissions else 'Allow editing user auth' }}
|
|
</a>
|
|
</li>
|
|
{% if current_service.active %}
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.archive_service', service_id=current_service.id) }}" class="button">
|
|
Archive service
|
|
</a>
|
|
</li>
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="button">
|
|
Suspend service
|
|
</a>
|
|
</li>
|
|
{% else %}
|
|
<li class="bottom-gutter">
|
|
<a href="{{ url_for('.resume_service', service_id=current_service.id) }}" class="button">
|
|
Resume service
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
</ul>
|
|
|
|
{% endif %}
|
|
|
|
{% endblock %}
|