Tell people they can have their logo on letters

At the moment there’s nothing in Notify that says the logo on letter
templates can be changed from ‘HM Government’. While some people guess
that it’s possible, or are motivated enough to enquire, others might be
assuming that the branding can’t be changed (and thus deciding Notify
letters aren’t for them).

In the future we should make this process slicker (eg with a file
upload) but the easiest, quickest improvement to make for now is:
- let people know that the branding can be changed
- direct them to support if they do want to change it
This commit is contained in:
Chris Hill-Scott
2018-08-21 09:23:32 +01:00
parent b8f41d5204
commit 0b86a12fdd
7 changed files with 98 additions and 3 deletions

View File

@@ -23,6 +23,9 @@ def get_prefilled_message():
'Please can you tell me if theres an agreement in place '
'between GOV.UK Notify and my organisation?'
),
'letter-branding': (
'I would like my own logo on my letter templates.'
),
}.get(
request.args.get('body'), ''
)

View File

@@ -938,6 +938,18 @@ def set_letter_branding(service_id):
)
@main.route("/services/<service_id>/service-settings/request-letter-branding", methods=['GET', 'POST'])
@login_required
@user_has_permissions('manage_service')
def request_letter_branding(service_id):
return render_template(
'views/service-settings/request-letter-branding.html',
letter_branding=email_branding_client.get_letter_email_branding()[
current_service.get('dvla_organisation', '001')
]
)
@main.route("/services/<service_id>/service-settings/link-service-to-organisation", methods=['GET', 'POST'])
@login_required
@user_is_platform_admin

View File

@@ -189,6 +189,7 @@ class HeaderNavigation(Navigation):
'registration_continue',
'remove_user_from_organisation',
'remove_user_from_service',
'request_letter_branding',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',
@@ -325,6 +326,7 @@ class MainNavigation(Navigation):
'settings': {
'branding_request',
'link_service_to_organisation',
'request_letter_branding',
'request_to_go_live',
'service_add_email_reply_to',
'service_add_letter_contact',
@@ -632,6 +634,7 @@ class CaseworkNavigation(Navigation):
'registration_continue',
'remove_user_from_organisation',
'remove_user_from_service',
'request_letter_branding',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',
@@ -853,6 +856,7 @@ class OrgNavigation(Navigation):
'register_from_org_invite',
'registration_continue',
'remove_user_from_service',
'request_letter_branding',
'request_to_go_live',
'resend_email_link',
'resend_email_verification',

View File

@@ -227,6 +227,16 @@
}}
{% endcall %}
{% call settings_row(if_has_permission='letter') %}
{{ text_field('Letter branding') }}
{{ text_field(letter_branding) }}
{{ edit_field(
'Change',
url_for('.request_letter_branding', service_id=current_service.id),
permissions=['manage_service']
)}}
{% endcall %}
{% endcall %}
</div>

View File

@@ -0,0 +1,29 @@
{% extends "withnav_template.html" %}
{% from "components/radios.html" import radios %}
{% from "components/page-footer.html" import page_footer %}
{% block service_page_title %}
Letter branding
{% endblock %}
{% block maincolumn_content %}
<h1 class="heading-large">Letter branding</h1>
<div class="grid-row">
<div class="column-three-quarters">
<p>
Your letters have the {{ letter_branding }} logo.
</p>
<p>
If you want a different logo then
<a href="{{ url_for('main.feedback', ticket_type='ask-question-give-feedback', body='letter-branding') }}">contact support</a>
and well help you set one up.
</p>
{{ page_footer(
back_link=url_for('.service_settings', service_id=current_service.id),
back_link_text='Back to settings'
) }}
</div>
</div>
{% endblock %}

View File

@@ -173,7 +173,7 @@ def test_should_show_overview(
'Send letters Off Change',
]),
(['letters'], [
(['letter'], [
'Service name service one Change',
'Sign-in method Text message code Change',
@@ -185,7 +185,9 @@ def test_should_show_overview(
'Send text messages Off Change',
'Label Value Action',
'Send letters Off Change',
'Send letters On Change',
'Sender addresses 1 Example Street Manage',
'Letter branding HM Government Change',
]),
])
@@ -1676,6 +1678,24 @@ def test_set_letter_contact_block_has_max_10_lines(
assert error_message == 'Contains 11 lines, maximum is 10'
def test_request_letter_branding(
client_request,
mock_get_letter_email_branding,
):
request_page = client_request.get(
'main.request_letter_branding',
service_id=SERVICE_ONE_ID,
)
assert request_page.select_one('main p').text.strip() == (
'Your letters have the HM Government logo.'
)
link_href = request_page.select_one('main a')['href']
feedback_page = client_request.get_url(link_href)
assert feedback_page.select_one('textarea').text.strip() == (
'I would like my own logo on my letter templates.'
)
def test_set_letter_branding_platform_admin_only(
logged_in_client,
service_one,

View File

@@ -2696,8 +2696,25 @@ def client_request(
_test_page_title=True,
**endpoint_kwargs
):
resp = logged_in_client.get(
return ClientRequest.get_url(
url_for(endpoint, **(endpoint_kwargs or {})),
_expected_status=_expected_status,
_follow_redirects=_follow_redirects,
_expected_redirect=_expected_redirect,
_test_page_title=_test_page_title,
)
@staticmethod
def get_url(
url,
_expected_status=200,
_follow_redirects=False,
_expected_redirect=None,
_test_page_title=True,
**endpoint_kwargs
):
resp = logged_in_client.get(
url,
follow_redirects=_follow_redirects,
)
assert resp.status_code == _expected_status, resp.location