Change wording based on Thom’s feedback

This commit is contained in:
Chris Hill-Scott
2017-11-06 14:12:25 +00:00
parent 6d3855bba4
commit 31497945c0
5 changed files with 12 additions and 13 deletions

View File

@@ -723,7 +723,7 @@ class InternationalSMSForm(Form):
class SMSPrefixForm(Form): class SMSPrefixForm(Form):
enabled = RadioField( enabled = RadioField(
'Start all text messages with service name', '',
choices=[ choices=[
('on', 'On'), ('on', 'On'),
('off', 'Off'), ('off', 'Off'),

View File

@@ -497,6 +497,8 @@ def service_set_sms_prefix(service_id):
'on' if current_service['prefix_sms_with_service_name'] else 'off' 'on' if current_service['prefix_sms_with_service_name'] else 'off'
)) ))
form.enabled.label.text = 'Start all text messages with {}:'.format(current_service['name'])
if form.validate_on_submit(): if form.validate_on_submit():
service_api_client.update_service( service_api_client.update_service(
current_service['id'], current_service['id'],

View File

@@ -93,7 +93,7 @@
{% endcall %} {% endcall %}
{% call row() %} {% call row() %}
{{ text_field('Start all text messages with service name') }} {{ text_field('Text messages start with service name') }}
{{ boolean_field(prefix_sms_with_service_name) }} {{ boolean_field(prefix_sms_with_service_name) }}
{{ edit_field('Change', url_for('.service_set_sms_prefix', service_id=current_service.id)) }} {{ edit_field('Change', url_for('.service_set_sms_prefix', service_id=current_service.id)) }}
{% endcall %} {% endcall %}

View File

@@ -3,15 +3,12 @@
{% from "components/page-footer.html" import page_footer %} {% from "components/page-footer.html" import page_footer %}
{% block service_page_title %} {% block service_page_title %}
Start all text messages with service name Text messages start with service name
{% endblock %} {% endblock %}
{% block maincolumn_content %} {% block maincolumn_content %}
<h1 class="heading-large">Start all text messages with service name</h1> <h1 class="heading-large">Text messages start with service name</h1>
<p>
Your service name is {{ current_service.name}}.
</p>
<form method="post"> <form method="post">
{{ radios(form.enabled) }} {{ radios(form.enabled) }}
{{ page_footer( {{ page_footer(

View File

@@ -44,7 +44,7 @@ from tests.conftest import (
'Label Value Action', 'Label Value Action',
'Send text messages On Change', 'Send text messages On Change',
'Text message sender GOVUK Manage', 'Text message sender GOVUK Manage',
'Start all text messages with service name On Change', 'Text messages start with service name On Change',
'International text messages Off Change', 'International text messages Off Change',
'Receive text messages Off Change', 'Receive text messages Off Change',
@@ -64,7 +64,7 @@ from tests.conftest import (
'Label Value Action', 'Label Value Action',
'Send text messages On Change', 'Send text messages On Change',
'Text message sender GOVUK Manage', 'Text message sender GOVUK Manage',
'Start all text messages with service name On Change', 'Text messages start with service name On Change',
'International text messages Off Change', 'International text messages Off Change',
'Receive text messages Off Change', 'Receive text messages Off Change',
@@ -121,7 +121,7 @@ def test_should_show_overview(
'Label Value Action', 'Label Value Action',
'Send text messages On Change', 'Send text messages On Change',
'Text message sender GOVUK Manage', 'Text message sender GOVUK Manage',
'Start all text messages with service name On Change', 'Text messages start with service name On Change',
'International text messages On Change', 'International text messages On Change',
'Receive text messages On Change', 'Receive text messages On Change',
'Callback URL for received text messages Not set Change', 'Callback URL for received text messages Not set Change',
@@ -141,7 +141,7 @@ def test_should_show_overview(
'Label Value Action', 'Label Value Action',
'Send text messages On Change', 'Send text messages On Change',
'Text message sender GOVUK Manage', 'Text message sender GOVUK Manage',
'Start all text messages with service name On Change', 'Text messages start with service name On Change',
'International text messages Off Change', 'International text messages Off Change',
'Receive text messages Off Change', 'Receive text messages Off Change',
@@ -2076,8 +2076,8 @@ def test_show_sms_prefixing_setting_page(
page = client_request.get( page = client_request.get(
'main.service_set_sms_prefix', service_id=SERVICE_ONE_ID 'main.service_set_sms_prefix', service_id=SERVICE_ONE_ID
) )
assert normalize_spaces(page.select_one('main p').text) == ( assert normalize_spaces(page.select_one('legend').text) == (
'Your service name is service one.' 'Start all text messages with service one:'
) )
radios = page.select('input[type=radio]') radios = page.select('input[type=radio]')
assert len(radios) == 2 assert len(radios) == 2