From 86ad77e54591acfb0a2a5fc13169dd8315198454 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 30 Aug 2018 11:51:34 +0100 Subject: [PATCH] Add question about research consent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since GDPR came into effect it’s less clear about whether we can contact teams for user research purposes. If we make people opt-in (or not) we know we’re safe to contact them (or not). Since we mostly care about how services are using Notify for real (ie live services) or services that are considering adopting it (ie those who have contacted us with a question) it feels like the go-live process is the most appropriate place to collect this consent. --- app/main/forms.py | 8 ++++++++ app/main/views/service_settings.py | 4 +++- app/templates/components/radios.html | 5 +++++ .../submit-request-to-go-live.html | 14 ++++++-------- tests/app/main/views/test_service_settings.py | 4 +++- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 2d9db1e98..4d5bbf3a6 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -581,6 +581,14 @@ class RequestToGoLiveForm(StripWhitespaceForm): 'How many letters do you expect to send in the next year?', validators=[DataRequired(message='Can’t be empty')] ) + research_consent = RadioField( + 'Can we contact you when we’re doing user research?', + choices=[ + ('yes', 'Yes'), + ('no', 'No'), + ], + validators=[DataRequired()] + ) class ProviderForm(StripWhitespaceForm): diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index 2cb07c1f0..8d4a40cd8 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -224,6 +224,7 @@ def submit_request_to_go_live(service_id): '\nEmails in next year: {volume_email}' '\nText messages in next year: {volume_sms}' '\nLetters in next year: {volume_letter}' + '\nConsent to research: {research_consent}' '\n' '\n---' '\n' @@ -240,11 +241,12 @@ def submit_request_to_go_live(service_id): ).format( service_name=current_service.name, service_dashboard=url_for('main.service_dashboard', service_id=current_service.id, _external=True), - organisation_type=current_service.organisation_type, + organisation_type=str(current_service.organisation_type).title(), agreement=AgreementInfo.from_current_user().as_human_readable, volume_email=form.volume_email.data, volume_sms=form.volume_sms.data, volume_letter=form.volume_letter.data, + research_consent=form.research_consent.data.title(), service_id=current_service.id, organisation=AgreementInfo.from_current_user().owner, user_name=current_user.name, diff --git a/app/templates/components/radios.html b/app/templates/components/radios.html index 0604c9361..8b3ee19dc 100644 --- a/app/templates/components/radios.html +++ b/app/templates/components/radios.html @@ -21,6 +21,11 @@ {% if hide_legend %}{% endif %} {{ field.label.text|safe }} {% if hide_legend %}{% endif %} + {% if hint %} + + {{ hint }} + + {% endif %} {% if field.errors %} {{ field.errors[0] }} diff --git a/app/templates/views/service-settings/submit-request-to-go-live.html b/app/templates/views/service-settings/submit-request-to-go-live.html index fab2cf079..b5d888b3c 100644 --- a/app/templates/views/service-settings/submit-request-to-go-live.html +++ b/app/templates/views/service-settings/submit-request-to-go-live.html @@ -13,20 +13,18 @@

Request to go live

-
-
-

- Tell us how you plan to use Notify. When we receive your request we’ll make your service live within one working day. -

-
-
-
{{ textbox(form.volume_email, width='1-2', hint='For example, 1,000,000') }} {{ textbox(form.volume_sms, width='1-2', hint='For example, 500,000') }} {{ textbox(form.volume_letter, width='1-2', hint='For example, 5,000') }}
+ {{ radios(form.research_consent, hint='You don’t have to take part and you can unsubscribe at any time') }} +

+ When we receive your request we’ll get back to you within one working day. +

+ +

By requesting to go live you’re agreeing to our terms of use.

diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index e29568672..f632e20c7 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -728,6 +728,7 @@ def test_should_redirect_after_request_to_go_live( 'volume_email': '111', 'volume_sms': '222', 'volume_letter': '333', + 'research_consent': 'yes', }, _follow_redirects=True ) @@ -743,11 +744,12 @@ def test_should_redirect_after_request_to_go_live( 'http://localhost/services/{}\n' '\n' '---\n' - 'Organisation type: central\n' + 'Organisation type: Central\n' 'Agreement signed: Can’t tell (domain is user.gov.uk)\n' 'Emails in next year: 111\n' 'Text messages in next year: 222\n' 'Letters in next year: 333\n' + 'Consent to research: Yes\n' '\n' '---\n' '{}\tNone\tservice one\tTest User\ttest@user.gov.uk\t-\t21/12/2012\t222\t111\t333'