Merge pull request #1259 from alphagov/letters-are-a-thing

Tell users that letters are coming
This commit is contained in:
Chris Hill-Scott
2017-05-05 14:10:34 +01:00
committed by GitHub
4 changed files with 89 additions and 2 deletions

View File

@@ -286,6 +286,15 @@ def service_set_international_sms(service_id):
)
@main.route("/services/<service_id>/service-settings/set-letters", methods=['GET'])
@login_required
@user_has_permissions('manage_settings', admin_override=True)
def service_set_letters(service_id):
return render_template(
'views/service-settings/set-letters.html',
)
@main.route("/services/<service_id>/service-settings/set-letter-contact-block", methods=['GET', 'POST'])
@login_required
@user_has_permissions('manage_settings', admin_override=True)

View File

@@ -39,12 +39,19 @@
{{ text_field(current_service.sms_sender or '40604') }}
{{ edit_field('Change', url_for('.service_set_sms_sender', service_id=current_service.id)) }}
{% endcall %}
{% call row() %}
{{ text_field('International text messages') }}
{{ text_field('On' if current_service.can_send_international_sms else 'Off') }}
{{ edit_field('Change', url_for('.service_set_international_sms', service_id=current_service.id)) }}
{% endcall %}
{% call row() %}
{{ text_field('Letters') }}
{{ text_field('On' if current_service.can_send_letters else 'Off') }}
{{ edit_field('Change', url_for('.service_set_letters', service_id=current_service.id)) }}
{% endcall %}
{% if current_service.can_send_letters %}
{% call row() %}
{{ text_field('Letter contact details') }}

View File

@@ -0,0 +1,38 @@
{% extends "withnav_template.html" %}
{% from "components/textbox.html" import textbox %}
{% from "components/page-footer.html" import page_footer %}
{% block service_page_title %}
Text message sender
{% endblock %}
{% block maincolumn_content %}
<div class="grid-row">
<div class="column-five-sixths">
<h1 class="heading-large">Letters</h1>
{% if current_service.can_send_letters %}
<p>
Your service can send letters.
</p>
<p>
If you want to stop your sending from sending letters,
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
</p>
{% else %}
<p>
Using GOV.UK Notify to send letters is an invitation&#8209;only feature.
</p>
<p>
If you want to try it out,
<a href="{{ url_for('.support') }}">get in touch with the GOV.UK Notify team</a>.
</p>
{% endif %}
{{ page_footer(
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</div>
</div>
{% endblock %}