diff --git a/app/main/forms.py b/app/main/forms.py index e80fa0023..5c3c389ca 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -723,7 +723,7 @@ class InternationalSMSForm(Form): class SMSPrefixForm(Form): enabled = RadioField( - 'Start all text messages with service name', + '', choices=[ ('on', 'On'), ('off', 'Off'), diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index ecadb06cb..55f7ade46 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -497,6 +497,8 @@ def service_set_sms_prefix(service_id): '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(): service_api_client.update_service( current_service['id'], diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index 7d417e58e..1eb75ee21 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -93,7 +93,7 @@ {% endcall %} {% 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) }} {{ edit_field('Change', url_for('.service_set_sms_prefix', service_id=current_service.id)) }} {% endcall %} diff --git a/app/templates/views/service-settings/sms-prefix.html b/app/templates/views/service-settings/sms-prefix.html index 5a99b86d6..e74508596 100644 --- a/app/templates/views/service-settings/sms-prefix.html +++ b/app/templates/views/service-settings/sms-prefix.html @@ -3,15 +3,12 @@ {% from "components/page-footer.html" import page_footer %} {% block service_page_title %} - Start all text messages with service name + Text messages start with service name {% endblock %} {% block maincolumn_content %} -

Start all text messages with service name

-

- Your service name is {{ current_service.name}}. -

+

Text messages start with service name

{{ radios(form.enabled) }} {{ page_footer( diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 1f09d38c4..ca180e3a6 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -44,7 +44,7 @@ from tests.conftest import ( 'Label Value Action', 'Send text messages On Change', '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', 'Receive text messages Off Change', @@ -64,7 +64,7 @@ from tests.conftest import ( 'Label Value Action', 'Send text messages On Change', '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', 'Receive text messages Off Change', @@ -121,7 +121,7 @@ def test_should_show_overview( 'Label Value Action', 'Send text messages On Change', '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', 'Receive text messages On Change', 'Callback URL for received text messages Not set Change', @@ -141,7 +141,7 @@ def test_should_show_overview( 'Label Value Action', 'Send text messages On Change', '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', 'Receive text messages Off Change', @@ -2076,8 +2076,8 @@ def test_show_sms_prefixing_setting_page( page = client_request.get( 'main.service_set_sms_prefix', service_id=SERVICE_ONE_ID ) - assert normalize_spaces(page.select_one('main p').text) == ( - 'Your service name is service one.' + assert normalize_spaces(page.select_one('legend').text) == ( + 'Start all text messages with ‘service one:’' ) radios = page.select('input[type=radio]') assert len(radios) == 2