diff --git a/app/main/views/service_settings.py b/app/main/views/service_settings.py index d39e41058..572c430c7 100644 --- a/app/main/views/service_settings.py +++ b/app/main/views/service_settings.py @@ -158,10 +158,17 @@ def service_name_change_confirm(service_id): form=form) -@main.route("/services//service-settings/request-to-go-live", methods=['GET', 'POST']) +@main.route("/services//service-settings/request-to-go-live") @login_required @user_has_permissions('manage_settings', admin_override=True) -def service_request_to_go_live(service_id): +def request_to_go_live(service_id): + return render_template('views/service-settings/request-to-go-live.html') + + +@main.route("/services//service-settings/submit-request-to-go-live", methods=['GET', 'POST']) +@login_required +@user_has_permissions('manage_settings', admin_override=True) +def submit_request_to_go_live(service_id): form = RequestToGoLiveForm() if form.validate_on_submit(): @@ -204,7 +211,7 @@ def service_request_to_go_live(service_id): flash('We’ve received your request to go live', 'default') return redirect(url_for('.service_settings', service_id=service_id)) - return render_template('views/service-settings/request-to-go-live.html', form=form) + return render_template('views/service-settings/submit-request-to-go-live.html', form=form) @main.route("/services//service-settings/switch-live") diff --git a/app/templates/views/service-settings.html b/app/templates/views/service-settings.html index d6de69edb..b39a7d850 100644 --- a/app/templates/views/service-settings.html +++ b/app/templates/views/service-settings.html @@ -228,7 +228,7 @@

To remove these restrictions - request to go live. + request to go live.

{% else %}

Your service is live

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 f3bbd98de..ed8628485 100644 --- a/app/templates/views/service-settings/request-to-go-live.html +++ b/app/templates/views/service-settings/request-to-go-live.html @@ -10,55 +10,34 @@ {% endblock %} {% block maincolumn_content %} - +
+

Request to go live

-

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

- -
-
-

We need permission to process your data before we can make your service live.

- {{ radios(form.mou, option_hints={ - 'no': 'We’ll send you a copy', - 'don’t know': 'We’ll check for you', - }) }} -
- {{ checkbox_group('What kind of messages will you be sending?', [ - form.channel_email, - form.channel_sms, - form.channel_letter - ]) }} -
- {{ textbox(form.start_date, width='1-1') }} - {{ textbox(form.start_volume, width='1-1', hint='For example, ‘1,000 per month’.') }} - {{ textbox(form.peak_volume, width='1-1', hint='For example, ‘Messages will increase to 20,000 per month in January’.') }} -
- {{ checkbox_group('How are you going to send messages?', [ - form.method_one_off, - form.method_upload, - form.method_api - ]) }} -

- Once you’ve completed the tasks needed to set up, we’ll make your service live. We’ll do this within one working day. -

-

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

- - {{ page_footer('Request to go live') }} -
- - +

+ Once you’ve made the request, we’ll put your service live within one working day. +

+

+ Next +

+
+
{% endblock %} 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 new file mode 100644 index 000000000..ff4fb472a --- /dev/null +++ b/app/templates/views/service-settings/submit-request-to-go-live.html @@ -0,0 +1,47 @@ +{% extends "withnav_template.html" %} +{% from "components/checkbox.html" import checkbox_group %} +{% from "components/textbox.html" import textbox %} +{% from "components/radios.html" import radios %} +{% from "components/page-footer.html" import page_footer %} +{% from "components/banner.html" import banner_wrapper %} + +{% block service_page_title %} + Request to go live +{% endblock %} + +{% block maincolumn_content %} + +

Request to go live

+ +
+
+

We need permission to process your data before we can make your service live.

+ {{ radios(form.mou, option_hints={ + 'no': 'We’ll send you a copy', + 'don’t know': 'We’ll check for you', + }) }} +
+ {{ checkbox_group('What kind of messages will you be sending?', [ + form.channel_email, + form.channel_sms, + form.channel_letter + ]) }} +
+ {{ textbox(form.start_date, width='1-1') }} + {{ textbox(form.start_volume, width='1-1', hint='For example, ‘1,000 per month’.') }} + {{ textbox(form.peak_volume, width='1-1', hint='For example, ‘Messages will increase to 20,000 per month in January’.') }} +
+ {{ checkbox_group('How are you going to send messages?', [ + form.method_one_off, + form.method_upload, + form.method_api + ]) }} +

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

+ + {{ page_footer('Request to go live') }} +
+ + +{% endblock %} diff --git a/app/templates/views/using-notify.html b/app/templates/views/using-notify.html index d23f89520..325666eaa 100644 --- a/app/templates/views/using-notify.html +++ b/app/templates/views/using-notify.html @@ -25,7 +25,13 @@

Trial mode

When you sign up to GOV.UK Notify, you’ll start in trial mode. In trial mode, you can send up to 50 text messages and emails a day. You can only send them to yourself and other people in your team.

You can’t send letters in trial mode.

-

When you request to go live on Notify, we’ll remove these restrictions.

+

When you + {% if current_service and current_service.restricted %} + request to go live + {% else %} + request to go live + {% endif %} + on Notify, we’ll remove these restrictions.

Sending messages

When you send a message, it moves through different states in Notify.

diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 865c8a18a..34a0392f6 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -425,11 +425,24 @@ def test_should_raise_duplicate_name_handled( assert mock_verify_password.called +def test_should_show_request_to_go_live_checklist( + client_request, +): + page = client_request.get( + 'main.request_to_go_live', service_id=SERVICE_ONE_ID + ) + assert page.h1.text == 'Request to go live' + assert page.select_one('main .button')['href'] == url_for( + 'main.submit_request_to_go_live', + service_id=SERVICE_ONE_ID, + ) + + def test_should_show_request_to_go_live( client_request, ): page = client_request.get( - 'main.service_request_to_go_live', service_id=SERVICE_ONE_ID + 'main.submit_request_to_go_live', service_id=SERVICE_ONE_ID ) assert page.h1.text == 'Request to go live' for channel, label in ( @@ -462,7 +475,7 @@ def test_should_redirect_after_request_to_go_live( ): mock_post = mocker.patch('app.main.views.service_settings.deskpro_client.create_ticket') page = client_request.post( - 'main.service_request_to_go_live', + 'main.submit_request_to_go_live', service_id=SERVICE_ONE_ID, _data={ 'mou': 'yes', @@ -505,7 +518,8 @@ def test_should_redirect_after_request_to_go_live( 'main.service_settings', 'main.service_name_change', 'main.service_name_change_confirm', - 'main.service_request_to_go_live', + 'main.request_to_go_live', + 'main.submit_request_to_go_live', 'main.archive_service' ]) def test_route_permissions( @@ -536,7 +550,8 @@ def test_route_permissions( 'main.service_settings', 'main.service_name_change', 'main.service_name_change_confirm', - 'main.service_request_to_go_live', + 'main.request_to_go_live', + 'main.submit_request_to_go_live', 'main.service_switch_live', 'main.service_switch_research_mode', 'main.archive_service', @@ -564,7 +579,8 @@ def test_route_invalid_permissions( 'main.service_settings', 'main.service_name_change', 'main.service_name_change_confirm', - 'main.service_request_to_go_live', + 'main.request_to_go_live', + 'main.submit_request_to_go_live', ]) def test_route_for_platform_admin( mocker,