2015-12-14 16:53:07 +00:00
|
|
|
{% extends "withnav_template.html" %}
|
2016-09-20 12:12:58 +01:00
|
|
|
{% from "components/banner.html" import banner_wrapper %}
|
2016-01-07 12:29:56 +00:00
|
|
|
{% from "components/browse-list.html" import browse_list %}
|
2017-06-07 14:54:23 +01:00
|
|
|
{% from "components/table.html" import mapping_table, row, text_field, edit_field, field, boolean_field %}
|
2015-11-30 16:16:58 +00:00
|
|
|
|
2017-02-13 10:45:15 +00:00
|
|
|
{% block service_page_title %}
|
|
|
|
|
Settings
|
2015-11-30 16:16:58 +00:00
|
|
|
{% endblock %}
|
|
|
|
|
|
2015-12-14 16:53:07 +00:00
|
|
|
{% block maincolumn_content %}
|
2015-11-30 16:16:58 +00:00
|
|
|
|
2016-04-01 10:42:23 +01:00
|
|
|
<h1 class="heading-large">Settings</h1>
|
2016-01-07 12:29:56 +00:00
|
|
|
|
2017-03-15 12:50:45 +00:00
|
|
|
<div class="bottom-gutter-3-2 body-copy-table">
|
2016-08-22 14:39:57 +01:00
|
|
|
|
|
|
|
|
{% call mapping_table(
|
|
|
|
|
caption='Settings',
|
|
|
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
|
|
|
field_headings_visible=False,
|
|
|
|
|
caption_visible=False
|
|
|
|
|
) %}
|
|
|
|
|
{% call row() %}
|
2017-03-02 15:56:28 +00:00
|
|
|
{{ text_field('Service name') }}
|
2016-08-22 14:39:57 +01:00
|
|
|
{{ text_field(current_service.name) }}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_name_change', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
2017-03-02 15:56:28 +00:00
|
|
|
|
2016-08-22 14:39:57 +01:00
|
|
|
{% call row() %}
|
2017-03-02 15:56:28 +00:00
|
|
|
{{ text_field('Email reply to address') }}
|
2016-08-22 14:39:57 +01:00
|
|
|
{{ text_field(
|
|
|
|
|
current_service.reply_to_email_address,
|
|
|
|
|
status='' if current_service.reply_to_email_address else 'default'
|
|
|
|
|
) }}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_set_reply_to_email', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
2017-03-02 15:56:28 +00:00
|
|
|
|
2016-08-22 14:39:57 +01:00
|
|
|
{% call row() %}
|
2017-03-02 15:56:28 +00:00
|
|
|
{{ text_field('Text message sender') }}
|
2017-06-02 16:37:45 +01:00
|
|
|
{{ text_field(current_service.sms_sender) }}
|
2017-06-02 16:25:24 +01:00
|
|
|
{% if current_user.has_permissions([], admin_override=True) or not can_receive_inbound %}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_set_sms_sender', service_id=current_service.id, set_inbound_sms=False)) }}
|
|
|
|
|
{% else %}
|
|
|
|
|
{{ text_field('') }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2016-08-22 14:39:57 +01:00
|
|
|
{% endcall %}
|
2017-05-02 11:03:10 +01:00
|
|
|
|
2017-04-27 14:26:25 +01:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('International text messages') }}
|
2017-06-23 13:35:08 +01:00
|
|
|
{{ boolean_field('international_sms' in current_service.permissions) }}
|
2017-04-27 14:26:25 +01:00
|
|
|
{{ edit_field('Change', url_for('.service_set_international_sms', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
2017-03-02 15:56:28 +00:00
|
|
|
|
2017-06-07 14:14:53 +01:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('Receive text messages') }}
|
2017-06-07 14:54:23 +01:00
|
|
|
{{ boolean_field('inbound_sms' in current_service.permissions) }}
|
2017-06-07 14:14:53 +01:00
|
|
|
{{ edit_field('Change', url_for('.service_set_inbound_sms', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
2017-06-20 17:51:58 +01:00
|
|
|
{% if can_receive_inbound %}
|
2017-06-20 13:24:01 +01:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('API endpoint for received text messages') }}
|
|
|
|
|
{{ text_field(
|
|
|
|
|
'None' if not inbound_api_url else inbound_api_url,
|
|
|
|
|
status='' if inbound_api_url else 'default'
|
|
|
|
|
) }}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_set_inbound_api', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% endif %}
|
|
|
|
|
|
2017-05-02 11:03:10 +01:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('Letters') }}
|
2017-06-23 13:35:08 +01:00
|
|
|
{{ boolean_field('letter' in current_service.permissions) }}
|
2017-05-02 11:03:10 +01:00
|
|
|
{{ edit_field('Change', url_for('.service_set_letters', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
|
2017-06-23 13:35:08 +01:00
|
|
|
{% if 'letter' in current_service.permissions %}
|
2017-03-02 15:56:28 +00:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('Letter contact details') }}
|
|
|
|
|
{% call field(status='' if current_service.letter_contact_block else 'default') %}
|
2017-05-17 15:35:21 +01:00
|
|
|
{{ letter_contact_block | string | nl2br | safe if current_service.letter_contact_block else 'None'}}
|
2017-03-02 15:56:28 +00:00
|
|
|
{% endcall %}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_set_letter_contact_block', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{% endif %}
|
2017-06-15 16:20:07 +01:00
|
|
|
|
2016-08-22 11:43:35 +01:00
|
|
|
{% endcall %}
|
2016-08-22 14:39:57 +01:00
|
|
|
</div>
|
2015-11-30 16:16:58 +00:00
|
|
|
|
2016-11-04 09:50:11 +00:00
|
|
|
{% 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>
|
2016-11-04 10:38:37 +00:00
|
|
|
{% 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?
|
2016-12-12 11:18:25 +00:00
|
|
|
<a href="{{ url_for('main.support') }}">Give feedback</a>.
|
2016-11-04 10:38:37 +00:00
|
|
|
</p>
|
|
|
|
|
|
2016-11-04 09:50:11 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
2016-08-23 14:16:07 +01:00
|
|
|
{% if current_user.has_permissions([], admin_override=True) %}
|
2016-08-22 10:44:45 +01:00
|
|
|
|
2016-08-22 20:22:47 +01:00
|
|
|
<h2 class="heading-medium">Platform admin settings</h2>
|
2016-08-22 10:44:45 +01:00
|
|
|
|
2016-08-24 09:34:14 +01:00
|
|
|
{% call mapping_table(
|
|
|
|
|
caption='Settings',
|
|
|
|
|
field_headings=['Label', 'Value', 'Action'],
|
|
|
|
|
field_headings_visible=False,
|
|
|
|
|
caption_visible=False
|
|
|
|
|
) %}
|
|
|
|
|
{% 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 }}
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% endcall %}
|
|
|
|
|
{{ edit_field('Change', url_for('.service_set_branding_and_org', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
2017-04-19 16:11:28 +01:00
|
|
|
{% call row() %}
|
|
|
|
|
{{ text_field('Letter branding')}}
|
|
|
|
|
{{ text_field(letter_branding) }}
|
|
|
|
|
{{ edit_field('Change', url_for('.set_letter_branding', service_id=current_service.id)) }}
|
|
|
|
|
{% endcall %}
|
2016-08-24 09:34:14 +01:00
|
|
|
{% endcall %}
|
2016-08-22 10:44:45 +01:00
|
|
|
|
2016-08-23 15:47:43 +01:00
|
|
|
<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>
|
2016-10-26 16:56:51 +01:00
|
|
|
<li class="bottom-gutter">
|
2016-08-23 15:47:43 +01:00
|
|
|
<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>
|
2016-10-26 16:56:51 +01:00
|
|
|
<li class="bottom-gutter">
|
2016-10-26 16:51:36 +01:00
|
|
|
<a href="{{ url_for('.service_switch_can_send_letters', service_id=current_service.id) }}" class="button">
|
2017-06-23 13:35:08 +01:00
|
|
|
{{ 'Stop sending letters' if 'letter' in current_service.permissions else 'Allow to send letters' }}
|
2016-10-26 16:51:36 +01:00
|
|
|
</a>
|
|
|
|
|
</li>
|
2017-04-24 13:52:10 +01:00
|
|
|
<li class="bottom-gutter">
|
|
|
|
|
<a href="{{ url_for('.service_switch_can_send_international_sms', service_id=current_service.id) }}" class="button">
|
2017-06-23 13:35:08 +01:00
|
|
|
{{ 'Stop sending international sms' if 'international_sms' in current_service.permissions else 'Allow international sms' }}
|
2017-04-24 13:52:10 +01:00
|
|
|
</a>
|
|
|
|
|
</li>
|
2016-11-02 16:53:40 +00:00
|
|
|
{% if current_service.active %}
|
|
|
|
|
<li class="bottom-gutter">
|
2017-01-31 09:54:51 +00:00
|
|
|
<a href="{{ url_for('.archive_service', service_id=current_service.id) }}" class="button">
|
2016-11-08 14:33:53 +00:00
|
|
|
Archive service
|
2016-11-02 16:53:40 +00:00
|
|
|
</a>
|
|
|
|
|
</li>
|
2017-01-31 15:56:06 +00:00
|
|
|
<li class="bottom-gutter">
|
|
|
|
|
<a href="{{ url_for('.suspend_service', service_id=current_service.id) }}" class="button">
|
|
|
|
|
Suspend service
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
|
|
|
|
{% endif %}
|
|
|
|
|
{% if not current_service.active %}
|
|
|
|
|
<li class="bottom-gutter">
|
|
|
|
|
<a href="{{ url_for('.resume_service', service_id=current_service.id) }}" class="button">
|
|
|
|
|
Resume service
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2016-11-02 16:53:40 +00:00
|
|
|
{% endif %}
|
2017-06-02 16:25:24 +01:00
|
|
|
<li class="bottom-gutter">
|
|
|
|
|
<a href="{{ url_for('.service_set_sms_sender', service_id=current_service.id, set_inbound_sms=True) }}" class="button">
|
|
|
|
|
{{ 'Stop inbound sms' if can_receive_inbound else 'Allow inbound sms' }}
|
|
|
|
|
</a>
|
|
|
|
|
</li>
|
2016-08-23 15:47:43 +01:00
|
|
|
</ul>
|
|
|
|
|
|
2016-08-22 10:44:45 +01:00
|
|
|
{% endif %}
|
|
|
|
|
|
2015-11-30 16:16:58 +00:00
|
|
|
{% endblock %}
|