diff --git a/app/assets/stylesheets/components/submit-form.scss b/app/assets/stylesheets/components/page-footer.scss similarity index 55% rename from app/assets/stylesheets/components/submit-form.scss rename to app/assets/stylesheets/components/page-footer.scss index 8b98d2905..53a94f75b 100644 --- a/app/assets/stylesheets/components/submit-form.scss +++ b/app/assets/stylesheets/components/page-footer.scss @@ -1,12 +1,10 @@ -.submit-form { +.page-footer { margin-bottom: 50px; &-back-link { - @include button($grey-1); - padding: 0.52632em 0.78947em 0.26316em 0.78947em; - @include inline-block; - margin-left: 5px; + display: block; + margin-top: $gutter; } .button {} diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index ce2093c01..9beb5dd10 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -33,7 +33,7 @@ @import 'components/template-picker'; @import 'components/placeholder'; @import 'components/sms-message'; -@import 'components/submit-form'; +@import 'components/page-footer'; @import 'components/table'; @import 'components/navigation'; @import 'components/big-number'; diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 63cff92ce..4613ca442 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -20,11 +20,9 @@ GOV.UK Notify admin {% endblock %} - {% block cookie_message %} {% endblock %} - {% block inside_header %} {% endblock %} {% block header_class %}with-proposition{% endblock %} diff --git a/app/templates/components/page-footer.html b/app/templates/components/page-footer.html new file mode 100644 index 000000000..333755449 --- /dev/null +++ b/app/templates/components/page-footer.html @@ -0,0 +1,11 @@ +{% macro page_footer(button_text=None, back_link=False, back_link_text="Back", destructive=False) %} + +{% endmacro %} diff --git a/app/templates/components/submit-form.html b/app/templates/components/submit-form.html deleted file mode 100644 index 4627b6204..000000000 --- a/app/templates/components/submit-form.html +++ /dev/null @@ -1,9 +0,0 @@ -{% macro submit_form(button_text, back_link=False, back_link_text="Back", destructive=False) %} -
- - - {% if back_link %} - {{ back_link_text }} - {% endif %} -
-{% endmacro %} diff --git a/app/templates/views/api-keys.html b/app/templates/views/api-keys.html index dd1c7678d..c03b117bb 100644 --- a/app/templates/views/api-keys.html +++ b/app/templates/views/api-keys.html @@ -1,4 +1,5 @@ {% extends "withnav_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | API keys and documentation @@ -10,8 +11,9 @@ GOV.UK Notify | API keys and documentation

Here's where developers can access information about the API and access keys

-

Back to dashboard

- - + {{ page_footer( + back_link=url_for('.dashboard'), + back_link_text='Back to dashboard' + ) }} {% endblock %} diff --git a/app/templates/views/check-sms.html b/app/templates/views/check-sms.html index b3277f09e..d933b890b 100644 --- a/app/templates/views/check-sms.html +++ b/app/templates/views/check-sms.html @@ -2,7 +2,7 @@ {% from "components/sms-message.html" import sms_message %} {% from "components/table.html" import table, field %} {% from "components/placeholder.html" import placeholder %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Send text messages @@ -17,9 +17,8 @@
- {{ submit_form( - "Send {} text messages".format(number_of_recipients), - url_for(".sendsms") + {{ page_footer( + "Send {} text messages".format(number_of_recipients) ) }}

First 3 messages

@@ -57,13 +56,11 @@ See all

- {{ submit_form( - "Send {} text messages".format(number_of_recipients), - url_for(".sendsms") + {{ page_footer( + button_text = "Send {} text messages".format(number_of_recipients), + back_link = url_for(".sendsms") ) }}
- - {% endblock %} diff --git a/app/templates/views/edit-template.html b/app/templates/views/edit-template.html index b17b5b64c..46615c78e 100644 --- a/app/templates/views/edit-template.html +++ b/app/templates/views/edit-template.html @@ -1,6 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/textbox.html" import textbox %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Edit template @@ -13,9 +13,12 @@ GOV.UK Notify | Edit template
{{ textbox(name='template_name', label='Template name', value=template_name) }} {{ textbox(name='template_body', label='Message', small=False, value=template_body, highlight_tags=True) }} - {{ submit_form('Save and continue') }} + {{ page_footer( + 'Save and continue', + back_link=url_for('.dashboard'), + back_link_text='Back to manage templates' + ) }}
-

Back to manage templates

{% endblock %} diff --git a/app/templates/views/email-not-received.html b/app/templates/views/email-not-received.html index 24bdcf33b..9f7960383 100644 --- a/app/templates/views/email-not-received.html +++ b/app/templates/views/email-not-received.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify @@ -18,8 +19,8 @@ GOV.UK Notify {{ render_field(form.email_address, class='form-control-2-3') }} Your email address must end in .gov.uk

-

+ {{ page_footer('Resend confirmation code') }} diff --git a/app/templates/views/manage-users.html b/app/templates/views/manage-users.html index f60a6c53b..c0211affa 100644 --- a/app/templates/views/manage-users.html +++ b/app/templates/views/manage-users.html @@ -1,4 +1,5 @@ {% extends "withnav_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Manage users @@ -10,8 +11,9 @@ GOV.UK Notify | Manage users

Here's where you can add or remove users of a service.

-

Back to dashboard

- - + {{ page_footer( + back_link = url_for('.dashboard'), + back_link_text = 'Back to dashboard' + ) }} {% endblock %} diff --git a/app/templates/views/notification.html b/app/templates/views/notification.html index 1dcb034a2..1e771062a 100644 --- a/app/templates/views/notification.html +++ b/app/templates/views/notification.html @@ -1,5 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/sms-message.html" import sms_message, message_status %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Notifications activity @@ -21,9 +22,9 @@ GOV.UK Notify | Notifications activity -

- View other notifications in this job -

- + {{ page_footer( + back_link = url_for('.showjob'), + back_link_text = 'View other messages in this job' + ) }} {% endblock %} diff --git a/app/templates/views/register.html b/app/templates/views/register.html index 9de86a373..f640ac116 100644 --- a/app/templates/views/register.html +++ b/app/templates/views/register.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Create an account @@ -21,9 +22,7 @@ GOV.UK Notify | Create an account {{ render_field(form.mobile_number, class='form-control-2-3') }} {{ render_field(form.password, class='form-control-2-3') }} Your password must have at least 10 characters -

- -

+ {{ page_footer("Continue") }} diff --git a/app/templates/views/send-email.html b/app/templates/views/send-email.html index e5911ec4c..94edfab93 100644 --- a/app/templates/views/send-email.html +++ b/app/templates/views/send-email.html @@ -6,7 +6,6 @@ GOV.UK Notify | Send email {% block maincolumn_content %} -

Send email

This page will be where we construct email messages

@@ -15,5 +14,4 @@ GOV.UK Notify | Send email Continue

- {% endblock %} diff --git a/app/templates/views/send-sms.html b/app/templates/views/send-sms.html index 75d81ffeb..c413b12db 100644 --- a/app/templates/views/send-sms.html +++ b/app/templates/views/send-sms.html @@ -1,5 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/sms-message.html" import sms_message %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Send text messages @@ -39,11 +40,7 @@

- -

- - -

+ {{ page_footer("Continue") }} diff --git a/app/templates/views/service-settings/confirm.html b/app/templates/views/service-settings/confirm.html index 5216f3085..a6a08441a 100644 --- a/app/templates/views/service-settings/confirm.html +++ b/app/templates/views/service-settings/confirm.html @@ -1,6 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/textbox.html" import textbox %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Service settings @@ -15,7 +15,7 @@ GOV.UK Notify | Service settings
{{ textbox('new_name', 'Enter your password', password=True) }} - {{ submit_form( + {{ page_footer( submit_button_text, destructive=destructive, back_link=url_for('.service_settings') diff --git a/app/templates/views/service-settings/delete.html b/app/templates/views/service-settings/delete.html index 1c025ec3a..c40950a37 100644 --- a/app/templates/views/service-settings/delete.html +++ b/app/templates/views/service-settings/delete.html @@ -1,5 +1,5 @@ {% extends "withnav_template.html" %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Service settings @@ -31,7 +31,7 @@ - {{ submit_form( + {{ page_footer( 'Yes, delete ‘{}’'.format(service.name), destructive=True, back_link=url_for('.service_settings') diff --git a/app/templates/views/service-settings/name.html b/app/templates/views/service-settings/name.html index ab411f23c..da427bf08 100644 --- a/app/templates/views/service-settings/name.html +++ b/app/templates/views/service-settings/name.html @@ -1,6 +1,6 @@ {% extends "withnav_template.html" %} {% from "components/textbox.html" import textbox %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Service settings @@ -19,7 +19,7 @@ GOV.UK Notify | Service settings {{ textbox('new_name', 'New name', value=service.name) }} - {{ submit_form( + {{ page_footer( 'Save', back_link=url_for('.service_settings') ) }} 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 5d9878712..b87d4dbab 100644 --- a/app/templates/views/service-settings/request-to-go-live.html +++ b/app/templates/views/service-settings/request-to-go-live.html @@ -1,8 +1,8 @@ {% extends "withnav_template.html" %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} -GOV.UK Notify | Service settings + GOV.UK Notify | Service settings {% endblock %} {% block maincolumn_content %} @@ -37,7 +37,7 @@ GOV.UK Notify | Service settings

- {{ submit_form( + {{ page_footer( 'Request to make service live', back_link=url_for('.service_settings') ) }} diff --git a/app/templates/views/service-settings/status.html b/app/templates/views/service-settings/status.html index f88e46830..545e02ddf 100644 --- a/app/templates/views/service-settings/status.html +++ b/app/templates/views/service-settings/status.html @@ -1,5 +1,5 @@ {% extends "withnav_template.html" %} -{% from "components/submit-form.html" import submit_form %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Service settings @@ -22,7 +22,7 @@ GOV.UK Notify | Service settings

- {{ submit_form( + {{ page_footer( 'Turn off outgoing messages', destructive=True, back_link=url_for('.service_settings') diff --git a/app/templates/views/signin.html b/app/templates/views/signin.html index 6a824fcb9..a399f0196 100644 --- a/app/templates/views/signin.html +++ b/app/templates/views/signin.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} Sign in @@ -19,9 +20,7 @@ Sign in

Forgotten password?

-

- -

+ {{ page_footer("Continue") }}
diff --git a/app/templates/views/text-not-received.html b/app/templates/views/text-not-received.html index a37c27cdd..529193617 100644 --- a/app/templates/views/text-not-received.html +++ b/app/templates/views/text-not-received.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify @@ -15,9 +16,7 @@ GOV.UK Notify
{{ form.hidden_tag() }} {{ render_field(form.mobile_number, class='form-control-2-3') }} -

- -

+ {{ page_footer("Resend confirmation code") }}
diff --git a/app/templates/views/two-factor.html b/app/templates/views/two-factor.html index 119836381..46724c617 100644 --- a/app/templates/views/two-factor.html +++ b/app/templates/views/two-factor.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Text verification @@ -16,10 +17,8 @@ GOV.UK Notify | Text verification
{{ form.hidden_tag() }} {{ render_field(form.sms_code, class='form-control-1-4') }} - I haven't received a text -

- -

+ I haven't received a text + {{ page_footer("Continue") }}
diff --git a/app/templates/views/user-profile.html b/app/templates/views/user-profile.html index 12f322314..3384c9ba5 100644 --- a/app/templates/views/user-profile.html +++ b/app/templates/views/user-profile.html @@ -1,4 +1,5 @@ {% extends "withnav_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | User settings @@ -10,7 +11,9 @@ GOV.UK Notify | User settings

Here's where users can update their profile, password etc.

-

Back to dashboard

- + {{ page_footer( + back_link = url_for('.dashboard'), + back_link_text = 'Back to dashboard' + ) }} {% endblock %} diff --git a/app/templates/views/verify.html b/app/templates/views/verify.html index 1f22ea29e..94e594d1a 100644 --- a/app/templates/views/verify.html +++ b/app/templates/views/verify.html @@ -1,4 +1,5 @@ {% extends "admin_template.html" %} +{% from "components/page-footer.html" import page_footer %} {% block page_title %} GOV.UK Notify | Confirm email address and mobile number @@ -18,9 +19,7 @@ GOV.UK Notify | Confirm email address and mobile number I haven't received an email {{ render_field(form.sms_code, class='form-control-1-4') }} I haven't received a text -

- -

+ {{ page_footer("Continue") }}