diff --git a/app/assets/stylesheets/components/page-footer.scss b/app/assets/stylesheets/components/page-footer.scss index 4aea437c4..2a5e07613 100644 --- a/app/assets/stylesheets/components/page-footer.scss +++ b/app/assets/stylesheets/components/page-footer.scss @@ -28,6 +28,10 @@ } + &-secondary-link { + display: block; + margin-top: $gutter; + } .button {} diff --git a/app/main/views/api_keys.py b/app/main/views/api_keys.py index 1a0492351..36959a86d 100644 --- a/app/main/views/api_keys.py +++ b/app/main/views/api_keys.py @@ -51,5 +51,5 @@ def revoke_api_key(service_id, key_id): ) elif request.method == 'POST': api_key_api_client.revoke_api_key(service_id=service_id, key_id=key_id) - flash('‘{}’ was revoked'.format(key_name), 'default') + flash('‘{}’ was revoked'.format(key_name), 'default_with_tick') return redirect(url_for('.api_keys', service_id=service_id)) diff --git a/app/templates/components/page-footer.html b/app/templates/components/page-footer.html index 1ea1dae64..7c0153d58 100644 --- a/app/templates/components/page-footer.html +++ b/app/templates/components/page-footer.html @@ -3,6 +3,8 @@ destructive=False, back_link=False, back_link_text="Back", + secondary_link=False, + secondary_link_text=None, delete_link=False, delete_link_text="delete" ) %} @@ -19,5 +21,8 @@ {% if back_link %} {{ back_link_text }} {% endif %} + {% if secondary_link and secondary_link_text %} + {{ secondary_link_text }} + {% endif %} {% endmacro %} diff --git a/app/templates/flash_messages.html b/app/templates/flash_messages.html index 85be2d13d..ec2b1a5d0 100644 --- a/app/templates/flash_messages.html +++ b/app/templates/flash_messages.html @@ -4,7 +4,7 @@ {% for category, message in messages %} {{ banner( message, - 'default' if category == 'default' or 'default_with_tick' else 'dangerous', + 'default' if ((category == 'default') or (category == 'default_with_tick')) else 'dangerous', delete_button="Yes, delete this template" if 'delete' == category else None, with_tick=True if category == 'default_with_tick' else False )}} diff --git a/app/templates/views/api-keys.html b/app/templates/views/api-keys.html index a08dcef86..3884d35db 100644 --- a/app/templates/views/api-keys.html +++ b/app/templates/views/api-keys.html @@ -23,9 +23,10 @@
{{ banner( - 'You can only send notifications to yourself', - subhead='Trial mode', - type='info' + 'You can only send messages to yourself until you request to go live'.format( + url_for('.service_request_to_go_live', service_id=service_id) + )|safe, + type='important' ) }}Used to show some important statistics.
@@ -117,6 +119,10 @@ button_text='Send', back_link='http://example.com', back_link_text="Back to dashboard" ) }} + {{ page_footer( + button_text='Sign in', secondary_link='http://example.com', secondary_link_text="I’ve forgotten my password" + ) }} +Used to show, preview or choose an SMS message.
diff --git a/app/templates/views/user-profile/change-password.html b/app/templates/views/user-profile/change-password.html index 3669dd10c..52058e0c2 100644 --- a/app/templates/views/user-profile/change-password.html +++ b/app/templates/views/user-profile/change-password.html @@ -17,8 +17,8 @@ GOV.UK Notify | Service settings {{ textbox(form.new_password) }} {{ page_footer( 'Save', - back_link=url_for('.user_profile'), - back_link_text="Back to your profile" + secondary_link=url_for('.user_profile'), + secondary_link_text="Back to your profile" ) }} diff --git a/tests/app/main/views/test_service_settings.py b/tests/app/main/views/test_service_settings.py index 0f87134fd..045cc4c86 100644 --- a/tests/app/main/views/test_service_settings.py +++ b/tests/app/main/views/test_service_settings.py @@ -161,7 +161,7 @@ def test_should_show_status_page(app_, assert response.status_code == 200 resp_data = response.get_data(as_text=True) - assert 'Turn off all outgoing notifications' in resp_data + assert 'Suspend API keys' in resp_data assert mock_get_service.called