From 380a6526c4c27b80cbb706be2d8ed72ddb6793af Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Mon, 22 Aug 2016 12:52:05 +0100 Subject: [PATCH 1/2] Changed some more instances of "confirmation" code to "security" code --- app/templates/views/text-not-received-2.html | 4 ++-- app/templates/views/text-not-received.html | 4 ++-- app/templates/views/user-profile/confirm.html | 2 +- app/templates/views/verify-mobile.html | 4 ++-- tests/app/main/views/test_code_not_received.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/templates/views/text-not-received-2.html b/app/templates/views/text-not-received-2.html index 4e10ac956..3a49f39a7 100644 --- a/app/templates/views/text-not-received-2.html +++ b/app/templates/views/text-not-received-2.html @@ -12,7 +12,7 @@ Check your mobile number – GOV.UK Notify

Check your mobile number

-

Check your mobile phone number is correct and then resend the confirmation code.

+

Check your mobile phone number is correct and then resend the security code.

@@ -21,7 +21,7 @@ Check your mobile number – GOV.UK Notify

- Resend confirmation code + Resend security code

diff --git a/app/templates/views/text-not-received.html b/app/templates/views/text-not-received.html index e6bab7546..4ee286f08 100644 --- a/app/templates/views/text-not-received.html +++ b/app/templates/views/text-not-received.html @@ -12,11 +12,11 @@ Check your mobile number – GOV.UK Notify

Check your mobile number

-

Check your mobile phone number is correct and then resend the confirmation code.

+

Check your mobile phone number is correct and then resend the security code.

{{ textbox(form.mobile_number) }} - {{ page_footer("Resend confirmation code") }} + {{ page_footer("Resend security code") }}
diff --git a/app/templates/views/user-profile/confirm.html b/app/templates/views/user-profile/confirm.html index 069fe0e7e..0a4d8db32 100644 --- a/app/templates/views/user-profile/confirm.html +++ b/app/templates/views/user-profile/confirm.html @@ -13,7 +13,7 @@ GOV.UK Notify | Service settings

- We’ve sent a code to your new {{ thing }}. + We’ve sent a security code to your new {{ thing }}.

{{ textbox(form_field) }} diff --git a/app/templates/views/verify-mobile.html b/app/templates/views/verify-mobile.html index 2ed9dbdd1..f10427872 100644 --- a/app/templates/views/verify-mobile.html +++ b/app/templates/views/verify-mobile.html @@ -10,10 +10,10 @@ Confirm your mobile number – GOV.UK Notify

Confirm your mobile number

-

We've sent you a confirmation code by text message.

+

We've sent you a security code by text message.

-

diff --git a/tests/app/main/views/test_code_not_received.py b/tests/app/main/views/test_code_not_received.py index 271b6ee81..675885111 100644 --- a/tests/app/main/views/test_code_not_received.py +++ b/tests/app/main/views/test_code_not_received.py @@ -66,7 +66,7 @@ def test_should_render_correct_resend_template_for_pending_user(app_, page = BeautifulSoup(response.data.decode('utf-8'), 'html.parser') assert page.h1.string == 'Check your mobile number' - expected = 'Check your mobile phone number is correct and then resend the confirmation code.' + expected = 'Check your mobile phone number is correct and then resend the security code.' message = page.find_all('p')[1].text assert message == expected assert page.find('form').input['value'] == api_user_pending.mobile_number From 1e254415d2f00d85de085f7ff0fb1279932e08ed Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 22 Aug 2016 13:30:03 +0100 Subject: [PATCH 2/2] Text message not Sms --- app/main/forms.py | 2 +- tests/app/main/test_validators.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index c1f50a089..820d47c9c 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -337,7 +337,7 @@ class ServiceSmsSender(Form): def validate_sms_sender(form, field): import re if field.data and not re.match('^[a-zA-Z0-9\s]+$', field.data): - raise ValidationError('Sms text message sender can only contain alpha-numeric characters') + raise ValidationError('Text message sender can only contain alpha-numeric characters') class ServiceBrandingOrg(Form): diff --git a/tests/app/main/test_validators.py b/tests/app/main/test_validators.py index f8b1a6490..5ea1300ca 100644 --- a/tests/app/main/test_validators.py +++ b/tests/app/main/test_validators.py @@ -141,4 +141,4 @@ def test_sms_sender_form_validation(app_, mock_get_user_by_email): form.sms_sender.data = '###########' form.validate() - assert 'Sms text message sender can only contain alpha-numeric characters' == form.errors['sms_sender'][0] + assert 'Text message sender can only contain alpha-numeric characters' == form.errors['sms_sender'][0]