From 82064ca4d062c78beabebf37f345ed470d3932ec Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 1 Nov 2016 11:31:39 +0000 Subject: [PATCH] Make MOU a multiple choice question not a banner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we want someone to read something (ie that they need to have the MOU signed), then the best way is to make them interact with it. And if someone doesn’t have the MOU in place, then we need to know to send them a copy. The best way of them telling us this is in this form, rather than sending them to the generic contact form and have them compose a message saying ‘please send me the MOU thanks’, which we haven’t seen anyone actually do. --- app/main/forms.py | 12 ++++++++++++ app/main/views/service_settings.py | 2 ++ .../views/service-settings/request-to-go-live.html | 14 +++----------- tests/app/main/views/test_service_settings.py | 2 ++ 4 files changed, 19 insertions(+), 11 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 82e8f36f7..0e1c32c5a 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -350,6 +350,18 @@ class Feedback(Form): class RequestToGoLiveForm(Form): + mou = RadioField( + ( + 'Has your organisation accepted the GOV.UK Notify data sharing and financial ' + 'agreement (Memorandum of Understanding)?' + ), + choices=[ + ('yes', 'Yes'), + ('no', 'No – we’ll send you a copy'), + ('don’t know', 'I don’t know – we’ll check for you') + ], + validators=[DataRequired()] + ) channel = RadioField( 'What kind of messages will you be sending?', choices=[ diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index 71a038bed..42106c271 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -112,11 +112,13 @@ def service_request_to_go_live(service_id): 'subject': 'Request to go live', 'message': ( 'On behalf of {} ({})\n\nExpected usage\n---' + '\nMOU in place: {}' '\nChannel: {}\nStart date: {}\nStart volume: {}' '\nPeak volume: {}\nUpload or API: {}' ).format( current_service['name'], url_for('main.service_dashboard', service_id=current_service['id'], _external=True), + form.mou.data, form.channel.data, form.start_date.data, form.start_volume.data, diff --git a/app/templates/views/service-settings/request-to-go-live.html b/app/templates/views/service-settings/request-to-go-live.html index 4fbdfe1f7..39ba7fcd0 100644 --- a/app/templates/views/service-settings/request-to-go-live.html +++ b/app/templates/views/service-settings/request-to-go-live.html @@ -12,19 +12,10 @@

Request to go live

- {% call banner_wrapper(type='warning') %} -

You must accept the GOV.UK Notify data sharing and financial agreement (Memorandum of Understanding) before we can process data for you.

- -

- Contact the Notify team to get a copy of the agreement or to find out if your organisation has already accepted it. -

- {% endcall %} -

Before you request to go live, make sure you’ve:

+ {{ radios(form.mou) }} {{ radios(form.channel) }} {{ textbox(form.start_date, width='1-1') }} - {{ textbox(form.start_volume, width='1-1', hint='For example, ‘1000 a month’.') }} - {{ textbox(form.peak_volume, width='1-1', hint='For example, ‘Messages will increase to 20,000 a month in January’.') }} + {{ textbox(form.start_volume, width='1-1') }} + {{ textbox(form.peak_volume, width='1-1') }} {{ radios(form.upload_or_api) }}

diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index bef3de3fb..5225b8f1c 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -314,6 +314,7 @@ def test_should_redirect_after_request_to_go_live( response = client.post( url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'), data={ + 'mou': 'yes', 'channel': 'emails', 'start_date': '01/01/2017', 'start_volume': '100,000', @@ -376,6 +377,7 @@ def test_log_error_on_request_to_go_live( resp = client.post( url_for('main.service_request_to_go_live', service_id='6ce466d0-fd6a-11e5-82f5-e0accb9d11a6'), data={ + 'mou': 'yes', 'channel': 'emails', 'start_date': 'start_date', 'start_volume': 'start_volume',