Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip link back button #1802

Merged
merged 5 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{% from "button/macro.njk" import govukButton %}
{% from "error-summary.njk" import errorSummary %}
{% from "input/macro.njk" import govukInput %}
{% from "back-link/macro.njk" import govukBackLink %}

{% set title = mssgs.address_lookup_title_you if data.isLicenceForYou else mssgs.address_lookup_title_other %}

Expand All @@ -22,16 +21,6 @@
}
%}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{% extends "standard-form.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}

{% if data.licensee.preferredMethodOfConfirmation == 'Email' %}
{% set contactType = mssgs.email_address %}
Expand All @@ -13,16 +12,6 @@

{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}

{% block pageTitle %}{{ mssgs.access_statement_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
9 changes: 0 additions & 9 deletions packages/gafl-webapp-service/src/pages/guidance/cookies.njk
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}
{% from "table/macro.njk" import govukTable %}

{% block pageTitle %}{{ mssgs.cookies_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}
{% from "table/macro.njk" import govukTable %}

{% block pageTitle %}{{ mssgs.new_prices_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
9 changes: 0 additions & 9 deletions packages/gafl-webapp-service/src/pages/guidance/os-terms.njk
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}

{% block pageTitle %}{{ mssgs.ordnance_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}

{% block pageTitle %}{{ mssgs.privacy_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
{% extends "layout.njk" %}
{% from "back-link/macro.njk" import govukBackLink %}

{% block pageTitle %}{{ mssgs.refund_title }}{% endblock %}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
14 changes: 14 additions & 0 deletions packages/gafl-webapp-service/src/pages/layout/layout.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
{% from "header/macro.njk" import govukHeader %}
{% from "button/macro.njk" import govukButton %}
{% from "footer/macro.njk" import govukFooter %}
{% from "back-link/macro.njk" import govukBackLink %}

{% macro csrf() %}
<div><input type="hidden" name="{{CSRF_TOKEN_NAME}}" value="{{CSRF_TOKEN_VALUE}}"></div>
Expand Down Expand Up @@ -150,6 +151,19 @@
</div>
{% endif%}
{% endif %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% elseif uri.back %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block bodyStart %}{% endblock %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "button/macro.njk" import govukButton %}
{% from "error-summary.njk" import errorSummary %}
{% from "back-link/macro.njk" import govukBackLink %}

{% set title = mssgs.licence_start_time_title + data.startDateStr %}

Expand Down Expand Up @@ -47,16 +46,6 @@
{ text: mssgs.licence_start_time_am_text_23, value: "23", checked: payload['licence-start-time'] === '23', disabled: true if data.minHour > 23 else false }
] %}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,12 @@
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "button/macro.njk" import govukButton %}
{% from "radios/macro.njk" import govukRadios %}
{% from "back-link/macro.njk" import govukBackLink %}
{% from "error-summary.njk" import errorSummary %}

{% set title = mssgs.no_licence_req_title %}

{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
11 changes: 0 additions & 11 deletions packages/gafl-webapp-service/src/pages/macros/standard-form.njk
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,9 @@
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "button/macro.njk" import govukButton %}
{% from "error-summary.njk" import errorSummary %}
{% from "back-link/macro.njk" import govukBackLink %}

{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{% from "warning-text/macro.njk" import govukWarningText %}
{% from "inset-text/macro.njk" import govukInsetText %}
{% from "summary-list/macro.njk" import govukSummaryList %}
{% from "back-link/macro.njk" import govukBackLink %}

{% set title = mssgs.licence_details_title %}
{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}
Expand All @@ -27,14 +26,6 @@
{{ licenseDetailsSummaryRows.push({ key: { text: mssgs.licence_summary_disability_concession }, value: { text: mssgs.yes } }) if data.disabled }}
{{ licenseDetailsSummaryRows.push({ key: { text: mssgs.age_concession }, value: { text: data.ageConcessionText } }) if data.ageConcession }}

{% block beforeContent %}
{{ govukBackLink({
text: mssgs.back,
href: uri.back,
classes: "govuk-!-margin-bottom-7 no-print"
}) }}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
{% extends "layout.njk" %}
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "back-link/macro.njk" import govukBackLink %}

{% set title = data.title %}

{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
{% from "summary-list/macro.njk" import govukSummaryList %}
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "button/macro.njk" import govukButton %}
{% from "back-link/macro.njk" import govukBackLink %}

{% set title = mssgs.contact_summary_title %}
{% block pageTitle %}{{ title }}{{ mssgs.gov_uk }}{% endblock %}
Expand All @@ -20,16 +19,6 @@
{% endcall %}
{% endset -%}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{% from "fieldset/macro.njk" import govukFieldset %}
{% from "warning-text/macro.njk" import govukWarningText %}
{% from "button/macro.njk" import govukButton %}
{% from "back-link/macro.njk" import govukBackLink %}
{% from "notification-banner.njk" import notificationBanner %}

{% set title = mssgs.licence_summary_title %}
Expand All @@ -25,16 +24,6 @@
{% endcall %}
{% endset -%}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{% from "button/macro.njk" import govukButton %}
{% from "checkboxes/macro.njk" import govukCheckboxes %}
{% from "error-summary.njk" import errorSummary %}
{% from "back-link/macro.njk" import govukBackLink %}
{% from "warning-text/macro.njk" import govukWarningText %}

{% set title = mssgs.terms_conds_title %}
Expand All @@ -18,16 +17,6 @@
}
%}

{% block beforeContent %}
{% if backRef %}
{{ govukBackLink({
text: mssgs.back,
href: backRef,
classes: "govuk-!-margin-bottom-7"
}) }}
{% endif %}
{% endblock %}

{% block content %}
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
Expand Down