Files
notifications-admin/app/templates/views/service-settings.html
Chris Hill-Scott 135ff1ee77 Include service name in page <title>
In pages specific to a service (e.g. dashboard and sub pages) the title
needs to distinguish which service it applies to. This is mainly to give
context to screen reader users who could be managing multiple services.

Implementing this uses template inheritance:

`page_title` includes `per_page_title` includes `service_page_title`

‘GOV.UK Notify’ is inserted into every page title.

Pages that set `service_page_title` get the service name inserted too.
2017-02-14 11:53:53 +00:00

136 lines
4.9 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, edit_field, field %}
{% block service_page_title %}
Settings
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Settings</h1>
<div class="bottom-gutter-3-2">
{% call mapping_table(
caption='Settings',
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('Email reply to address')}}
{{ 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 %}
{% call row() %}
{{ text_field('Text message sender')}}
{{ text_field(current_service.sms_sender or '40604') }}
{{ edit_field('Change', url_for('.service_set_sms_sender', service_id=current_service.id)) }}
{% endcall %}
{% 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('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 %}
{% 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_letters', service_id=current_service.id) }}" class="button">
{{ 'Stop sending letters' if current_service.can_send_letters else 'Allow to send letters' }}
</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>
{% 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>
{% endif %}
</ul>
{% endif %}
{% endblock %}