hof 22.9.0-beta.v1 → 22.9.0-beta.v2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/package/.eslintignore +0 -1
- package/package/CHANGELOG.md +0 -232
- package/package/LICENSE +0 -21
- package/package/README.md +0 -1887
- package/package/bin/hof-build +0 -10
- package/package/bin/hof-transpiler +0 -12
- package/package/build/helpers/importer.js +0 -29
- package/package/build/helpers/local.js +0 -35
- package/package/build/helpers/resolver/import.js +0 -32
- package/package/build/helpers/resolver/nearest-package-root.js +0 -33
- package/package/build/helpers/resolver/package.js +0 -29
- package/package/build/helpers/resolver.js +0 -16
- package/package/build/index.js +0 -49
- package/package/build/lib/env.js +0 -36
- package/package/build/lib/mkdir.js +0 -9
- package/package/build/lib/run.js +0 -17
- package/package/build/lib/spawn.js +0 -18
- package/package/build/tasks/browserify/compress.js +0 -15
- package/package/build/tasks/browserify/index.js +0 -48
- package/package/build/tasks/build/index.js +0 -6
- package/package/build/tasks/images/index.js +0 -27
- package/package/build/tasks/index.js +0 -8
- package/package/build/tasks/sass/index.js +0 -67
- package/package/build/tasks/translate/index.js +0 -20
- package/package/build/tasks/watch/index.js +0 -161
- package/package/components/address-lookup/default-model.js +0 -76
- package/package/components/address-lookup/defaults.js +0 -25
- package/package/components/address-lookup/index.js +0 -251
- package/package/components/address-lookup/templates/address-lookup.html +0 -14
- package/package/components/address-lookup/templates/address.html +0 -22
- package/package/components/address-lookup/templates/postcode.html +0 -9
- package/package/components/clear-session/Readme.md +0 -46
- package/package/components/clear-session/index.js +0 -26
- package/package/components/combine-and-loop-fields/Readme.md +0 -42
- package/package/components/combine-and-loop-fields/index.js +0 -156
- package/package/components/date/fields.js +0 -16
- package/package/components/date/index.js +0 -172
- package/package/components/date/templates/date.html +0 -20
- package/package/components/emailer/assets/images/govuk_logotype_email.png +0 -0
- package/package/components/emailer/assets/images/ho_crest_27px.png +0 -0
- package/package/components/emailer/assets/images/spacer.gif +0 -0
- package/package/components/emailer/email-service.js +0 -51
- package/package/components/emailer/emailer.js +0 -53
- package/package/components/emailer/index.js +0 -74
- package/package/components/emailer/transports/debug.js +0 -74
- package/package/components/emailer/transports/index.js +0 -8
- package/package/components/emailer/transports/ses.js +0 -36
- package/package/components/emailer/transports/smtp.js +0 -26
- package/package/components/emailer/transports/stub.js +0 -5
- package/package/components/emailer/views/layout.html +0 -63
- package/package/components/homeoffice-countries/index.js +0 -22
- package/package/components/index.js +0 -13
- package/package/components/notify/index.js +0 -62
- package/package/components/notify/notify.js +0 -51
- package/package/components/session-timeout-warning/index.js +0 -67
- package/package/components/summary/index.js +0 -237
- package/package/config/builder-defaults.js +0 -45
- package/package/config/component-defaults.js +0 -13
- package/package/config/hof-defaults.js +0 -65
- package/package/config/rate-limits.js +0 -20
- package/package/config/sanitisation-rules.js +0 -32
- package/package/controller/base-controller.js +0 -296
- package/package/controller/behaviour-hooks.js +0 -51
- package/package/controller/behaviour-session.js +0 -64
- package/package/controller/controller.js +0 -258
- package/package/controller/deprecate-error.js +0 -10
- package/package/controller/formatting/formatters.js +0 -70
- package/package/controller/formatting/index.js +0 -32
- package/package/controller/index.js +0 -17
- package/package/controller/validation/email.js +0 -30
- package/package/controller/validation/index.js +0 -101
- package/package/controller/validation/validators.js +0 -181
- package/package/controller/validation-error.js +0 -14
- package/package/frontend/govuk-template/build/config.js +0 -24
- package/package/frontend/govuk-template/build/govuk_template.html +0 -102
- package/package/frontend/govuk-template/build/index.js +0 -23
- package/package/frontend/govuk-template/govuk_template_generated.html +0 -102
- package/package/frontend/govuk-template/index.js +0 -29
- package/package/frontend/index.js +0 -9
- package/package/frontend/template-mixins/mixins/helpers.js +0 -103
- package/package/frontend/template-mixins/mixins/index.js +0 -37
- package/package/frontend/template-mixins/mixins/render.js +0 -12
- package/package/frontend/template-mixins/mixins/template-mixins.js +0 -520
- package/package/frontend/template-mixins/partials/forms/checkbox-group.html +0 -47
- package/package/frontend/template-mixins/partials/forms/checkbox.html +0 -16
- package/package/frontend/template-mixins/partials/forms/input-submit.html +0 -1
- package/package/frontend/template-mixins/partials/forms/input-text-date.html +0 -37
- package/package/frontend/template-mixins/partials/forms/input-text-group.html +0 -45
- package/package/frontend/template-mixins/partials/forms/option-group.html +0 -43
- package/package/frontend/template-mixins/partials/forms/select.html +0 -17
- package/package/frontend/template-mixins/partials/forms/textarea-group.html +0 -37
- package/package/frontend/template-mixins/partials/mixins/panel.html +0 -4
- package/package/frontend/template-partials/index.js +0 -9
- package/package/frontend/template-partials/translations/index.js +0 -26
- package/package/frontend/template-partials/translations/src/cy/base.json +0 -4
- package/package/frontend/template-partials/translations/src/cy/buttons.json +0 -6
- package/package/frontend/template-partials/translations/src/cy/cookies.json +0 -104
- package/package/frontend/template-partials/translations/src/cy/errorlist.json +0 -6
- package/package/frontend/template-partials/translations/src/cy/errors.json +0 -18
- package/package/frontend/template-partials/translations/src/cy/terms.json +0 -28
- package/package/frontend/template-partials/translations/src/en/accessibility.json +0 -43
- package/package/frontend/template-partials/translations/src/en/base.json +0 -5
- package/package/frontend/template-partials/translations/src/en/buttons.json +0 -10
- package/package/frontend/template-partials/translations/src/en/cookies.json +0 -116
- package/package/frontend/template-partials/translations/src/en/errorlist.json +0 -7
- package/package/frontend/template-partials/translations/src/en/errors.json +0 -35
- package/package/frontend/template-partials/translations/src/en/exit.json +0 -5
- package/package/frontend/template-partials/translations/src/en/fields.json +0 -5
- package/package/frontend/template-partials/translations/src/en/journey.json +0 -6
- package/package/frontend/template-partials/translations/src/en/save-and-exit.json +0 -4
- package/package/frontend/template-partials/translations/src/en/terms.json +0 -28
- package/package/frontend/template-partials/views/404.html +0 -9
- package/package/frontend/template-partials/views/accessibility.html +0 -55
- package/package/frontend/template-partials/views/confirm.html +0 -8
- package/package/frontend/template-partials/views/confirmation.html +0 -19
- package/package/frontend/template-partials/views/content/en/what-happens-next.md +0 -0
- package/package/frontend/template-partials/views/cookie-error.html +0 -1
- package/package/frontend/template-partials/views/cookies.html +0 -84
- package/package/frontend/template-partials/views/email/data-row.html +0 -4
- package/package/frontend/template-partials/views/email/formatted.html +0 -12
- package/package/frontend/template-partials/views/email/layout.html +0 -63
- package/package/frontend/template-partials/views/email/raw.html +0 -11
- package/package/frontend/template-partials/views/email/section-row.html +0 -3
- package/package/frontend/template-partials/views/error.html +0 -20
- package/package/frontend/template-partials/views/exit.html +0 -9
- package/package/frontend/template-partials/views/feedback-submitted.html +0 -11
- package/package/frontend/template-partials/views/layout.html +0 -55
- package/package/frontend/template-partials/views/partials/analytics-table.html +0 -25
- package/package/frontend/template-partials/views/partials/back.html +0 -5
- package/package/frontend/template-partials/views/partials/bullet-list.html +0 -7
- package/package/frontend/template-partials/views/partials/confirmation-alert.html +0 -6
- package/package/frontend/template-partials/views/partials/continue.html +0 -5
- package/package/frontend/template-partials/views/partials/cookie-banner.html +0 -29
- package/package/frontend/template-partials/views/partials/cookie-notification.html +0 -4
- package/package/frontend/template-partials/views/partials/cookie-settings-button.html +0 -1
- package/package/frontend/template-partials/views/partials/cookie-settings-radio.html +0 -8
- package/package/frontend/template-partials/views/partials/details-summary.html +0 -8
- package/package/frontend/template-partials/views/partials/external-link.html +0 -1
- package/package/frontend/template-partials/views/partials/form.html +0 -10
- package/package/frontend/template-partials/views/partials/gatag.html +0 -60
- package/package/frontend/template-partials/views/partials/head.html +0 -31
- package/package/frontend/template-partials/views/partials/heading.html +0 -11
- package/package/frontend/template-partials/views/partials/items-table.html +0 -32
- package/package/frontend/template-partials/views/partials/maincontent-left.html +0 -10
- package/package/frontend/template-partials/views/partials/navigation.html +0 -8
- package/package/frontend/template-partials/views/partials/page.html +0 -23
- package/package/frontend/template-partials/views/partials/panel-indent.html +0 -3
- package/package/frontend/template-partials/views/partials/session-cookies-table.html +0 -28
- package/package/frontend/template-partials/views/partials/session-timeout-warning.html +0 -38
- package/package/frontend/template-partials/views/partials/summary-table-row.html +0 -14
- package/package/frontend/template-partials/views/partials/summary-table.html +0 -8
- package/package/frontend/template-partials/views/partials/table.html +0 -18
- package/package/frontend/template-partials/views/partials/validation-list.html +0 -3
- package/package/frontend/template-partials/views/partials/validation-summary.html +0 -25
- package/package/frontend/template-partials/views/partials/warn.html +0 -7
- package/package/frontend/template-partials/views/rate-limit-error.html +0 -10
- package/package/frontend/template-partials/views/save-and-exit.html +0 -17
- package/package/frontend/template-partials/views/service-unavailable.html +0 -13
- package/package/frontend/template-partials/views/session-timeout.html +0 -7
- package/package/frontend/template-partials/views/step.html +0 -14
- package/package/frontend/template-partials/views/terms.html +0 -26
- package/package/frontend/themes/gov-uk/client-js/cookieSettings.js +0 -145
- package/package/frontend/themes/gov-uk/client-js/govuk-cookies.js +0 -121
- package/package/frontend/themes/gov-uk/client-js/index.js +0 -27
- package/package/frontend/themes/gov-uk/client-js/session-timeout-dialog.js +0 -348
- package/package/frontend/themes/gov-uk/client-js/skip-to-main.js +0 -19
- package/package/frontend/themes/gov-uk/index.js +0 -9
- package/package/frontend/themes/gov-uk/styles/_base.scss +0 -17
- package/package/frontend/themes/gov-uk/styles/_check_your_answers.scss +0 -155
- package/package/frontend/themes/gov-uk/styles/_cookie-banner.scss +0 -111
- package/package/frontend/themes/gov-uk/styles/_cookie-settings.scss +0 -33
- package/package/frontend/themes/gov-uk/styles/_govuk_frontend_toolkit.scss +0 -23
- package/package/frontend/themes/gov-uk/styles/_helpers.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/_layout.scss +0 -125
- package/package/frontend/themes/gov-uk/styles/_panel-indent.scss +0 -27
- package/package/frontend/themes/gov-uk/styles/_pdf.scss +0 -42
- package/package/frontend/themes/gov-uk/styles/_session-timeout-dialog.scss +0 -121
- package/package/frontend/themes/gov-uk/styles/_typography.scss +0 -27
- package/package/frontend/themes/gov-uk/styles/_variables.scss +0 -11
- package/package/frontend/themes/gov-uk/styles/govuk.scss +0 -43
- package/package/frontend/themes/gov-uk/styles/mixins.scss +0 -16
- package/package/frontend/themes/gov-uk/styles/modules/_alerts.scss +0 -73
- package/package/frontend/themes/gov-uk/styles/modules/_buttons.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/modules/_character-count.scss +0 -8
- package/package/frontend/themes/gov-uk/styles/modules/_confirm-page.scss +0 -20
- package/package/frontend/themes/gov-uk/styles/modules/_lists.scss +0 -5
- package/package/frontend/themes/gov-uk/styles/modules/_progressive-reveal.scss +0 -17
- package/package/frontend/themes/gov-uk/styles/modules/_validation.scss +0 -51
- package/package/frontend/themes/index.js +0 -5
- package/package/frontend/toolkit/assets/images/passports/new-window-link-blue.png +0 -0
- package/package/frontend/toolkit/assets/images/passports/new-window-link.png +0 -0
- package/package/frontend/toolkit/assets/images/spinner.gif +0 -0
- package/package/frontend/toolkit/assets/javascript/character-count.js +0 -99
- package/package/frontend/toolkit/assets/javascript/form-focus.js +0 -101
- package/package/frontend/toolkit/assets/javascript/helpers.js +0 -177
- package/package/frontend/toolkit/assets/javascript/progressive-reveal.js +0 -72
- package/package/frontend/toolkit/assets/javascript/validation.js +0 -71
- package/package/frontend/toolkit/assets/javascript/vendor/details.polyfill.js +0 -189
- package/package/frontend/toolkit/assets/javascript/vendor/indexof.polyfill.js +0 -39
- package/package/frontend/toolkit/assets/javascript/vendor/safari-cachebuster.js +0 -6
- package/package/frontend/toolkit/assets/stylesheets/_base.scss +0 -17
- package/package/frontend/toolkit/assets/stylesheets/_helpers.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/_layout.scss +0 -118
- package/package/frontend/toolkit/assets/stylesheets/_typography.scss +0 -27
- package/package/frontend/toolkit/assets/stylesheets/_variables.scss +0 -11
- package/package/frontend/toolkit/assets/stylesheets/app.scss +0 -30
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_buttons.scss +0 -47
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_details.scss +0 -38
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_elements-typography.scss +0 -175
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_forms.scss +0 -167
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_helpers.scss +0 -39
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_layout.scss +0 -67
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_lists.scss +0 -40
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_panels.scss +0 -29
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_reset.scss +0 -33
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/_tables.scss +0 -33
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-block-labels.scss +0 -63
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-date.scss +0 -39
- package/package/frontend/toolkit/assets/stylesheets/govuk-elements/forms/_form-validation.scss +0 -63
- package/package/frontend/toolkit/assets/stylesheets/mixins.scss +0 -16
- package/package/frontend/toolkit/assets/stylesheets/modules/_alerts.scss +0 -73
- package/package/frontend/toolkit/assets/stylesheets/modules/_buttons.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/modules/_confirm-page.scss +0 -20
- package/package/frontend/toolkit/assets/stylesheets/modules/_lists.scss +0 -5
- package/package/frontend/toolkit/assets/stylesheets/modules/_progressive-reveal.scss +0 -17
- package/package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +0 -51
- package/package/frontend/toolkit/index.js +0 -10
- package/package/index.js +0 -351
- package/package/lib/deindex.js +0 -18
- package/package/lib/encryption.js +0 -23
- package/package/lib/ga-tag.js +0 -89
- package/package/lib/health.js +0 -26
- package/package/lib/helpers.js +0 -66
- package/package/lib/logger.js +0 -65
- package/package/lib/markdown.js +0 -46
- package/package/lib/router.js +0 -111
- package/package/lib/serve-static.js +0 -12
- package/package/lib/sessions.js +0 -82
- package/package/lib/settings.js +0 -74
- package/package/lib/which.js +0 -28
- package/package/middleware/cookies.js +0 -43
- package/package/middleware/deep-translate.js +0 -32
- package/package/middleware/errors.js +0 -119
- package/package/middleware/index.js +0 -10
- package/package/middleware/not-found.js +0 -38
- package/package/middleware/rate-limiter.js +0 -98
- package/package/middleware/service-unavailable.js +0 -64
- package/package/model/apis/axios-settings.js +0 -21
- package/package/model/apis/html-to-pdf-converter.js +0 -35
- package/package/model/apis/index.js +0 -5
- package/package/model/index.js +0 -348
- package/package/package.json +0 -147
- package/package/sandbox/README.md +0 -66
- package/package/sandbox/apps/sandbox/behaviours/clear-session.js +0 -8
- package/package/sandbox/apps/sandbox/behaviours/country-select.js +0 -10
- package/package/sandbox/apps/sandbox/behaviours/international-number.js +0 -22
- package/package/sandbox/apps/sandbox/fields.js +0 -128
- package/package/sandbox/apps/sandbox/index.js +0 -99
- package/package/sandbox/apps/sandbox/lib/staticAppealStages.js +0 -189
- package/package/sandbox/apps/sandbox/sections/summary-data-sections.js +0 -43
- package/package/sandbox/apps/sandbox/translations/src/en/errors.json +0 -5
- package/package/sandbox/apps/sandbox/translations/src/en/exit.json +0 -4
- package/package/sandbox/apps/sandbox/translations/src/en/fields.json +0 -101
- package/package/sandbox/apps/sandbox/translations/src/en/journey.json +0 -7
- package/package/sandbox/apps/sandbox/translations/src/en/pages.json +0 -72
- package/package/sandbox/apps/sandbox/translations/src/en/validation.json +0 -54
- package/package/sandbox/apps/sandbox/views/form-guidance-link.html +0 -8
- package/package/sandbox/apps/sandbox/views/save-and-exit.html +0 -19
- package/package/sandbox/assets/images/icons/icon-caret-left.png +0 -0
- package/package/sandbox/assets/images/icons/icon-complete.png +0 -0
- package/package/sandbox/assets/images/icons/icon-cross-remove-sign.png +0 -0
- package/package/sandbox/assets/js/index.js +0 -70
- package/package/sandbox/assets/scss/app.scss +0 -27
- package/package/sandbox/codecept.conf.js +0 -15
- package/package/sandbox/config.js +0 -17
- package/package/sandbox/package.json +0 -26
- package/package/sandbox/server.js +0 -23
- package/package/sandbox/yarn.lock +0 -262
- package/package/transpiler/index.js +0 -2
- package/package/transpiler/lib/aggregate.js +0 -32
- package/package/transpiler/lib/build.js +0 -15
- package/package/transpiler/lib/compile.js +0 -12
- package/package/transpiler/lib/expand-dirs.js +0 -14
- package/package/transpiler/lib/write-files.js +0 -24
- package/package/utilities/autofill/index.js +0 -189
- package/package/utilities/autofill/inputs.js +0 -60
- package/package/utilities/countries.js +0 -12
- package/package/utilities/helpers/index.js +0 -189
- package/package/utilities/index.js +0 -9
- package/package/utilities/reqres/index.js +0 -18
- package/package/utilities/test-data/data/domain.json +0 -7
- package/package/utilities/test-data/data/firstname.json +0 -16
- package/package/utilities/test-data/data/lastname.json +0 -10
- package/package/utilities/test-data/data/postcode.json +0 -12
- package/package/utilities/test-data/data/streetname.json +0 -8
- package/package/utilities/test-data/data/streetsuffix.json +0 -7
- package/package/utilities/test-data/data/town.json +0 -9
- package/package/utilities/test-data/index.js +0 -67
- package/package/wizard/behaviours/complete.js +0 -20
- package/package/wizard/behaviours/index.js +0 -5
- package/package/wizard/index.js +0 -124
- package/package/wizard/middleware/back-links.js +0 -68
- package/package/wizard/middleware/check-complete.js +0 -13
- package/package/wizard/middleware/check-progress.js +0 -139
- package/package/wizard/middleware/check-session.js +0 -17
- package/package/wizard/middleware/csrf.js +0 -47
- package/package/wizard/middleware/session-model.js +0 -11
- package/package/wizard/middleware/session.js +0 -9
- package/package/wizard/model.js +0 -29
- package/package/wizard/util/constants.js +0 -5
- package/package/wizard/util/helpers.js +0 -19
@@ -1,32 +0,0 @@
|
|
1
|
-
{{#hasItems}}
|
2
|
-
<div class="loop-summary-table">
|
3
|
-
{{#items}}
|
4
|
-
<table class="govuk-table">
|
5
|
-
<thead class="govuk-table__head">
|
6
|
-
<tr class="govuk-table__row">
|
7
|
-
<th scope="col" class="govuk-table__header data-col" colspan="2">{{itemTitle}}</th>
|
8
|
-
<th scope="col" class="govuk-table__header action-col">
|
9
|
-
<a href="{{baseUrl}}/{{route}}/edit/{{index}}">{{#t}}buttons.edit{{/t}}<span class="visuallyhidden"> {{itemTitle}}</span></a>
|
10
|
-
</th>
|
11
|
-
<th scope="col" class="govuk-table__header action-col">
|
12
|
-
<a href="{{baseUrl}}/{{route}}/delete/{{index}}">{{#t}}buttons.delete{{/t}}<span
|
13
|
-
class="visuallyhidden"> {{itemTitle}}</span></a>
|
14
|
-
</th>
|
15
|
-
</tr>
|
16
|
-
</thead>
|
17
|
-
<tbody class="govuk-table__body">
|
18
|
-
{{#fields}}
|
19
|
-
{{#showInSummary}}
|
20
|
-
<tr class="govuk-table__row">
|
21
|
-
<td class="govuk-table__cell" class="govuk-table__header data-col">{{#t}}fields.{{field}}{{/t}}</td>
|
22
|
-
<td></td>
|
23
|
-
<td class="govuk-table__cell" class="govuk-table__header data-col">{{#parsed}}{{parsed}}{{/parsed}}{{^parsed}}{{value}}{{/parsed}}</td>
|
24
|
-
<td></td>
|
25
|
-
</tr>
|
26
|
-
{{/showInSummary}}
|
27
|
-
{{/fields}}
|
28
|
-
</tbody>
|
29
|
-
</table>
|
30
|
-
{{/items}}
|
31
|
-
</div>
|
32
|
-
{{/hasItems}}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
{{$content-outer}}
|
2
|
-
{{$preloader}}{{/preloader}}
|
3
|
-
<div class="govuk-grid-column-two-thirds">
|
4
|
-
{{$validationSummary}}{{/validationSummary}}
|
5
|
-
{{#captionHeading}}<span class="govuk-caption-l">{{captionHeading}}</span>{{/captionHeading}}
|
6
|
-
{{#header}}<h1 class="govuk-heading-l">{{header}}</h1>{{/header}}
|
7
|
-
{{#subHeading}}<div id="page-header"><h2 class="govuk-heading-m">{{subHeading}}</h2></div>{{/subHeading}}
|
8
|
-
{{$content}}{{/content}}
|
9
|
-
</div>
|
10
|
-
{{/content-outer}}
|
@@ -1,8 +0,0 @@
|
|
1
|
-
<div class="govuk-header__content">
|
2
|
-
{{#startPageRedirectUrl}}
|
3
|
-
<a href="{{startPageRedirectUrl}}" class="govuk-header__link govuk-header__link--service-name" id="proposition-name">{{$journeyHeader}}{{/journeyHeader}}</a>
|
4
|
-
{{/startPageRedirectUrl}}
|
5
|
-
{{^startPageRedirectUrl}}
|
6
|
-
<a href="{{journeyHeaderURL}}" class="govuk-header__link govuk-header__link--service-name" id="proposition-name">{{$journeyHeader}}{{/journeyHeader}}</a>
|
7
|
-
{{/startPageRedirectUrl}}
|
8
|
-
</div>
|
@@ -1,23 +0,0 @@
|
|
1
|
-
{{<layout}}
|
2
|
-
{{$journeyHeader}}
|
3
|
-
{{#t}}journey.header{{/t}}
|
4
|
-
{{/journeyHeader}}
|
5
|
-
|
6
|
-
{{$validationSummary}}
|
7
|
-
{{> partials-validation-summary}}
|
8
|
-
{{/validationSummary}}
|
9
|
-
|
10
|
-
{{$propositionHeader}}
|
11
|
-
{{> partials-navigation}}
|
12
|
-
{{/propositionHeader}}
|
13
|
-
|
14
|
-
{{$header}}{{{title}}}{{/header}}
|
15
|
-
{{$content}}
|
16
|
-
{{<partials-form}}
|
17
|
-
{{$form}}
|
18
|
-
{{$page-content}}{{/page-content}}
|
19
|
-
{{> partials-session-timeout-warning}}
|
20
|
-
{{/form}}
|
21
|
-
{{/partials-form}}
|
22
|
-
{{/content}}
|
23
|
-
{{/layout}}
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<table class="govuk-table">
|
2
|
-
<thead class="govuk-table__head">
|
3
|
-
<tr class="govuk-table__row">
|
4
|
-
{{#headers}}
|
5
|
-
<th scope="col" class="govuk-table__header app-custom-class">{{.}}</th>
|
6
|
-
{{/headers}}
|
7
|
-
</tr>
|
8
|
-
</thead>
|
9
|
-
<tbody>
|
10
|
-
<tr class="govuk-table__row">
|
11
|
-
{{#cookieName}}
|
12
|
-
<td scope="row" class="govuk-table__header">{{cookieName}}</td>
|
13
|
-
{{/cookieName}}
|
14
|
-
{{^cookieName}}
|
15
|
-
<td>{{defaultCookieName}}</td>
|
16
|
-
{{/cookieName}}
|
17
|
-
<td>{{defaultCookiePurpose}}</td>
|
18
|
-
<td>{{defaultCookieExpires}}</td>
|
19
|
-
</tr>
|
20
|
-
{{#rows}}
|
21
|
-
<tr>
|
22
|
-
{{#.}}
|
23
|
-
<td>{{.}}</td>
|
24
|
-
{{/.}}
|
25
|
-
</tr>
|
26
|
-
{{/rows}}
|
27
|
-
</tbody>
|
28
|
-
</table>
|
@@ -1,38 +0,0 @@
|
|
1
|
-
<div class="govuk-timeout-warning-fallback">
|
2
|
-
<p>We will reset your application if you do not complete the page and press continue
|
3
|
-
in 5 minutes.</p>
|
4
|
-
<p>We do this to keep your information secure.</p>
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<dialog id="js-modal-dialog" data-session-timeout="{{sessionTimeOut}}" data-session-timeout-warning="{{sessionTimeOutWarning}}"
|
8
|
-
data-url-redirect="/session-timeout" class="modal-dialog dialog" role="dialog"
|
9
|
-
aria-live="polite" aria-labelledby="dialog-title" aria-describedby="at-timer">
|
10
|
-
<div class="modal-dialog__inner">
|
11
|
-
{{^showSaveAndExit}}
|
12
|
-
<h2 id="dialog-title" class="govuk-heading-l">
|
13
|
-
{{#dialogTitle}}{{#t}}pages.session-timeout-warning.dialog-title{{/t}}{{/dialogTitle}}{{^dialogTitle}}Your page will time out soon{{/dialogTitle}}
|
14
|
-
</h2>
|
15
|
-
<div class="govuk-body">
|
16
|
-
<div id="timer" class="timer" aria-hidden="true" aria-relevant="additions"></div>
|
17
|
-
<div id="at-timer" class="at-timer govuk-visually-hidden" role="status"></div>
|
18
|
-
<p class="dialog-text-prefix visually-hidden">To protect your information, this page will time out in </p>
|
19
|
-
<p class="dialog-text visually-hidden">{{#dialogText}}{{#t}}pages.session-timeout-warning.dialog-text{{/t}}{{/dialogText}}{{^dialogText}}If that happens, your progress will not be saved.{{/dialogText}}</p>
|
20
|
-
</div>
|
21
|
-
<button class="govuk-button dialog-button js-dialog-close" id="timeout-continue-button" data-module="govuk-button">{{#timeoutContinueButton}}{{#t}}pages.session-timeout-warning.timeout-continue-button{{/t}}{{/timeoutContinueButton}}{{^timeoutContinueButton}}Stay on this page{{/timeoutContinueButton}}</button>
|
22
|
-
<a href="{{baseUrl}}{{exitStep}}" class="govuk-link dialog-exit-link" role="button">{{#dialogExitLink}}{{#t}}pages.session-timeout-warning.dialog-exit-link{{/t}}{{/dialogExitLink}}{{^dialogExitLink}}Exit this form{{/dialogExitLink}}</a>
|
23
|
-
{{/showSaveAndExit}}
|
24
|
-
{{#showSaveAndExit}}
|
25
|
-
<h2 id="dialog-title" class="govuk-heading-l">
|
26
|
-
{{#dialogTitle}}{{#t}}pages.session-timeout-warning.dialog-title{{/t}}{{/dialogTitle}}{{^dialogTitle}}You will be signed out soon{{/dialogTitle}}
|
27
|
-
</h2>
|
28
|
-
<div class="govuk-body">
|
29
|
-
<div id="timer" class="timer" aria-hidden="true" aria-relevant="additions"></div>
|
30
|
-
<div id="at-timer" class="at-timer govuk-visually-hidden" role="status"></div>
|
31
|
-
<p class="dialog-text-prefix visually-hidden">To protect your information, you will be signed out in </p>
|
32
|
-
<p class="dialog-text visually-hidden">{{#dialogText}}{{#t}}pages.session-timeout-warning.dialog-text{{/t}}{{/dialogText}}{{^dialogText}}Any answers you have saved will not be affected, but your progress on this page will not be saved.{{/dialogText}}</p>
|
33
|
-
</div>
|
34
|
-
<button class="govuk-button dialog-button js-dialog-close" id="timeout-continue-button" data-module="govuk-button">{{#timeoutContinueButton}}{{#t}}pages.session-timeout-warning.timeout-continue-button{{/t}}{{/timeoutContinueButton}}{{^timeoutContinueButton}}Stay signed in{{/timeoutContinueButton}}</button>
|
35
|
-
<a href="{{baseUrl}}{{saveAndExitStep}}" class="govuk-link dialog-exit-link" role="button">{{#dialogExitLink}}{{#t}}pages.session-timeout-warning.dialog-exit-link{{/t}}{{/dialogExitLink}}{{^dialogExitLink}}Sign out{{/dialogExitLink}}</a>
|
36
|
-
{{/showSaveAndExit}}
|
37
|
-
</div>
|
38
|
-
</dialog>
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<div class="confirm-row">
|
2
|
-
{{#isSeparator}}
|
3
|
-
{{/isSeparator}}
|
4
|
-
{{^isSeparator}}
|
5
|
-
<dt class="confirm-label">{{label}}</dt>
|
6
|
-
<dd class="confirm-value" data-value="{{value}}">{{value}}</dd>
|
7
|
-
{{#changeLink}}
|
8
|
-
<dd><span><a class="govuk-link" href="{{changeLink}}" id="{{field}}-change-{{index}}">{{#t}}buttons.change{{/t}} <span class="visuallyhidden">{{changeLinkDescription}} from {{value}}</span></a></span></dd>
|
9
|
-
{{/changeLink}}
|
10
|
-
{{^changeLink}}
|
11
|
-
<dd><span><a class="govuk-link" href="{{baseUrl}}{{step}}/edit#{{field}}" id="{{field}}-change">{{#t}}buttons.change{{/t}} <span class="visuallyhidden">{{changeLinkDescription}} from {{value}}</span></a></span></dd>
|
12
|
-
{{/changeLink}}
|
13
|
-
{{/isSeparator}}
|
14
|
-
</div>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
<table class="govuk-table">
|
2
|
-
<thead class="govuk-table__head">
|
3
|
-
<tr class="govuk-table__row">
|
4
|
-
{{#headers}}
|
5
|
-
<th scope="col" class="govuk-table__header app-custom-class">{{.}}</th>
|
6
|
-
{{/headers}}
|
7
|
-
</tr>
|
8
|
-
</thead>
|
9
|
-
<tbody class="govuk-table__body">
|
10
|
-
{{#rows}}
|
11
|
-
<tr class="govuk-table__row">
|
12
|
-
{{#.}}
|
13
|
-
<td class="govuk-table__cell">{{.}}</td>
|
14
|
-
{{/.}}
|
15
|
-
</tr>
|
16
|
-
{{/rows}}
|
17
|
-
</tbody>
|
18
|
-
</table>
|
@@ -1,25 +0,0 @@
|
|
1
|
-
{{#errorlist.length}}
|
2
|
-
<div class="govuk-error-summary" aria-labelledby="error-summary-title" data-module="govuk-error-summary" role="alert" tabindex="-1">
|
3
|
-
{{$errorlist-title}}
|
4
|
-
|
5
|
-
{{#errorLength.single}}
|
6
|
-
<h2 class="govuk-error-summary__title" id="error-summary-title">{{#t}}errorlist.title.single{{/t}}</h2>
|
7
|
-
{{/errorLength.single}}
|
8
|
-
{{#errorLength.multiple}}
|
9
|
-
<h2 class="govuk-error-summary__title" id="error-summary-title">{{#t}}errorlist.title.multiple{{/t}}</h2>
|
10
|
-
{{/errorLength.multiple}}
|
11
|
-
|
12
|
-
{{/errorlist-title}}
|
13
|
-
<div class="govuk-error-summary__body">
|
14
|
-
{{<partials-validation-list}}
|
15
|
-
{{$validation-list}}
|
16
|
-
{{#errorlist}}
|
17
|
-
{{#message}}
|
18
|
-
<li><a href="#{{errorLinkId}}">{{ message }}</a></li>
|
19
|
-
{{/message}}
|
20
|
-
{{/errorlist}}
|
21
|
-
{{/validation-list}}
|
22
|
-
{{/partials-validation-list}}
|
23
|
-
</div>
|
24
|
-
</div>
|
25
|
-
{{/errorlist.length}}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
{{<layout}}
|
2
|
-
{{$header}}
|
3
|
-
{{content.title}}
|
4
|
-
{{/header}}
|
5
|
-
{{$content}}
|
6
|
-
<p>{{content.message}}</p>
|
7
|
-
<p>{{content.preTimeToWait}}{{content.timeToWait}}{{content.postTimeToWait}}</p>
|
8
|
-
<a href="/" class="button" role="button">{{#t}}buttons.try-again{{/t}}</a>
|
9
|
-
{{/content}}
|
10
|
-
{{/layout}}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
{{<layout}}
|
2
|
-
{{$journeyHeader}}
|
3
|
-
{{#t}}journey.header{{/t}}
|
4
|
-
{{/journeyHeader}}
|
5
|
-
|
6
|
-
{{$propositionHeader}}
|
7
|
-
{{> partials-navigation}}
|
8
|
-
{{/propositionHeader}}
|
9
|
-
|
10
|
-
{{$header}}
|
11
|
-
{{header}}
|
12
|
-
{{/header}}
|
13
|
-
|
14
|
-
{{$content}}
|
15
|
-
<p>{{#saveExitFormContent}}{{#t}}pages.save-and-exit.message{{/t}}{{/saveExitFormContent}}{{^saveExitFormContent}}{{{message}}}{{/saveExitFormContent}}</p>
|
16
|
-
{{/content}}
|
17
|
-
{{/layout}}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
{{<error}}
|
2
|
-
{{$content}}
|
3
|
-
<h1 class="govuk-heading-l">{{title}}</h1>
|
4
|
-
<p class="govuk-body">{{{message}}}</p>
|
5
|
-
<p class="govuk-body">{{{answers-saved}}}</p>
|
6
|
-
{{#contact}}
|
7
|
-
<p class="govuk-body">{{{contact}}}</p>
|
8
|
-
{{/contact}}
|
9
|
-
{{#alternative}}
|
10
|
-
<p class="govuk-body">{{{alternative}}}</p>
|
11
|
-
{{/alternative}}
|
12
|
-
{{/content}}
|
13
|
-
{{/error}}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
{{<partials-page}}
|
2
|
-
{{$page-content}}
|
3
|
-
{{#beforeFields}}
|
4
|
-
{{beforeFields}}
|
5
|
-
{{/beforeFields}}
|
6
|
-
{{#fields}}
|
7
|
-
{{#renderField}}{{/renderField}}
|
8
|
-
{{/fields}}
|
9
|
-
{{#afterFields}}
|
10
|
-
{{afterFields}}
|
11
|
-
{{/afterFields}}
|
12
|
-
{{#input-submit}}continue{{/input-submit}}
|
13
|
-
{{/page-content}}
|
14
|
-
{{/partials-page}}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
{{<layout}}
|
2
|
-
|
3
|
-
{{$propositionHeader}}{{/propositionHeader}}
|
4
|
-
|
5
|
-
{{$header}}
|
6
|
-
{{header}}
|
7
|
-
{{/header}}
|
8
|
-
|
9
|
-
{{$content}}
|
10
|
-
<h2>{{how-we-use}}</h2>
|
11
|
-
{{#data-link}}
|
12
|
-
{{> partials-external-link}}
|
13
|
-
{{/data-link}}
|
14
|
-
<p>{{used-for}}</p>
|
15
|
-
{{#used-for-list}}
|
16
|
-
{{> partials-bullet-list}}
|
17
|
-
{{/used-for-list}}
|
18
|
-
<p>{{your-info}}</p>
|
19
|
-
{{#your-info-list}}
|
20
|
-
{{> partials-bullet-list}}
|
21
|
-
{{/your-info-list}}
|
22
|
-
<p>{{info-gathered}}</p>
|
23
|
-
<h2>{{countries}}</h2>
|
24
|
-
<p>{{countries-text}}</p>
|
25
|
-
{{/content}}
|
26
|
-
{{/layout}}
|
@@ -1,145 +0,0 @@
|
|
1
|
-
/* eslint-disable max-len, no-var, vars-on-top, no-undef */
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
// TODO: update package.json(s)
|
5
|
-
|
6
|
-
function hideFallbackContent(containerId) {
|
7
|
-
var container = document.getElementById(containerId);
|
8
|
-
if (container === null) return;
|
9
|
-
var fallbackContent = container.getElementsByClassName('js-disabled');
|
10
|
-
for (var i = 0; i < fallbackContent.length; i++) {
|
11
|
-
fallbackContent[i].style.display = 'none';
|
12
|
-
}
|
13
|
-
}
|
14
|
-
|
15
|
-
function showInteractiveContent(containerId) {
|
16
|
-
var container = document.getElementById(containerId);
|
17
|
-
if (container === null) return;
|
18
|
-
var interactiveContent = container.getElementsByClassName('js-enabled');
|
19
|
-
for (var i = 0; i < interactiveContent.length; i++) {
|
20
|
-
interactiveContent[i].style.display = 'block';
|
21
|
-
}
|
22
|
-
}
|
23
|
-
|
24
|
-
function setCookiePreferences(preferences) {
|
25
|
-
GOVUK.cookie('cookie_preferences', JSON.stringify(preferences), { days: 30 });
|
26
|
-
|
27
|
-
if (!preferences.usage) {
|
28
|
-
GOVUK.cookie('_ga', null);
|
29
|
-
GOVUK.cookie('_gat', null);
|
30
|
-
GOVUK.cookie('_gid', null);
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
function showCookieBannerSubmitted() {
|
35
|
-
document.getElementById('cookie-banner-info').style.display = 'none';
|
36
|
-
document.getElementById('cookie-banner-actions').style.display = 'none';
|
37
|
-
var cookieBannerSubmitted = document.getElementById('cookie-banner-submitted');
|
38
|
-
cookieBannerSubmitted.style.display = 'block';
|
39
|
-
cookieBannerSubmitted.focus();
|
40
|
-
}
|
41
|
-
|
42
|
-
function initialiseBannerButtons() {
|
43
|
-
document.getElementById('accept-cookies-button').addEventListener('click', function () {
|
44
|
-
setCookiePreferences({essential: true, usage: true});
|
45
|
-
showCookieBannerSubmitted();
|
46
|
-
sessionStorage.setItem('reloading', 'true');
|
47
|
-
window.location = document.URL;
|
48
|
-
});
|
49
|
-
|
50
|
-
document.getElementById('reject-cookies-button').addEventListener('click', function () {
|
51
|
-
setCookiePreferences({essential: true, usage: false});
|
52
|
-
showCookieBannerSubmitted();
|
53
|
-
});
|
54
|
-
|
55
|
-
document.getElementById('hide-cookie-banner').addEventListener('click', function () {
|
56
|
-
document.getElementById('cookie-banner').style.display = 'none';
|
57
|
-
});
|
58
|
-
}
|
59
|
-
|
60
|
-
function initialiseCookieBanner() {
|
61
|
-
var preferences = GOVUK.cookie('cookie_preferences');
|
62
|
-
|
63
|
-
if (preferences !== null) {
|
64
|
-
return;
|
65
|
-
}
|
66
|
-
|
67
|
-
// the default cookie message container from hof-govuk-template
|
68
|
-
var bannerContainer = document.getElementById('global-cookie-message');
|
69
|
-
|
70
|
-
// the cookie banner that will replace the container's default content if using google analytics
|
71
|
-
var cookieBanner = document.getElementById('cookie-banner');
|
72
|
-
|
73
|
-
if (bannerContainer !== null && cookieBanner !== null) {
|
74
|
-
hideFallbackContent('global-cookie-message');
|
75
|
-
showInteractiveContent('global-cookie-message');
|
76
|
-
bannerContainer.style.display = 'block';
|
77
|
-
initialiseBannerButtons();
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
function handleSaveSettings(e) {
|
82
|
-
e.preventDefault();
|
83
|
-
setCookiePreferences({ essential: true, usage: document.getElementById('radio-1').checked });
|
84
|
-
|
85
|
-
var cookieNotification = document.getElementById('cookie-notification');
|
86
|
-
var cookieBanner = document.getElementById('cookie-banner');
|
87
|
-
|
88
|
-
if (cookieBanner !== null) {
|
89
|
-
cookieBanner.style.display = 'none';
|
90
|
-
}
|
91
|
-
|
92
|
-
if (cookieNotification !== null) {
|
93
|
-
cookieNotification.style.display = 'block';
|
94
|
-
cookieNotification.focus();
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
function initialiseFormControls() {
|
99
|
-
var preferences = JSON.parse(GOVUK.cookie('cookie_preferences'));
|
100
|
-
var usage;
|
101
|
-
|
102
|
-
if (preferences !== null && preferences.usage !== undefined && typeof preferences.usage === 'boolean') {
|
103
|
-
usage = preferences.usage;
|
104
|
-
} else {
|
105
|
-
usage = false;
|
106
|
-
}
|
107
|
-
|
108
|
-
document.getElementById('radio-1').checked = usage;
|
109
|
-
document.getElementById('radio-2').checked = !usage;
|
110
|
-
document.getElementById('save-cookie-settings').addEventListener('click', handleSaveSettings);
|
111
|
-
}
|
112
|
-
|
113
|
-
function initialiseCookiePage() {
|
114
|
-
var shouldDisplayCookieControls = document.getElementById('cookie-settings') !== null;
|
115
|
-
|
116
|
-
if (shouldDisplayCookieControls) {
|
117
|
-
hideFallbackContent('cookie-settings');
|
118
|
-
showInteractiveContent('cookie-settings');
|
119
|
-
initialiseFormControls();
|
120
|
-
}
|
121
|
-
}
|
122
|
-
|
123
|
-
function onLoad() {
|
124
|
-
window.onload = function () {
|
125
|
-
var reloading = sessionStorage.getItem('reloading');
|
126
|
-
if (reloading) {
|
127
|
-
sessionStorage.removeItem('reloading');
|
128
|
-
|
129
|
-
var bannerContainer = document.getElementById('global-cookie-message');
|
130
|
-
var cookieBanner = document.getElementById('cookie-banner');
|
131
|
-
|
132
|
-
if (bannerContainer !== null && cookieBanner !== null) {
|
133
|
-
bannerContainer.style.display = 'block';
|
134
|
-
}
|
135
|
-
initialiseBannerButtons();
|
136
|
-
showCookieBannerSubmitted();
|
137
|
-
}
|
138
|
-
};
|
139
|
-
}
|
140
|
-
|
141
|
-
module.exports = {
|
142
|
-
initialiseCookieBanner: initialiseCookieBanner,
|
143
|
-
initialiseCookiePage: initialiseCookiePage,
|
144
|
-
onLoad: onLoad
|
145
|
-
};
|
@@ -1,121 +0,0 @@
|
|
1
|
-
/* eslint-disable no-undef, no-param-reassign, no-unused-vars */
|
2
|
-
(function () {
|
3
|
-
'use strict';
|
4
|
-
const root = this;
|
5
|
-
if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }
|
6
|
-
|
7
|
-
/*
|
8
|
-
Cookie methods
|
9
|
-
==============
|
10
|
-
|
11
|
-
Usage:
|
12
|
-
|
13
|
-
Setting a cookie:
|
14
|
-
GOVUK.cookie('hobnob', 'tasty', { days: 30 });
|
15
|
-
|
16
|
-
Reading a cookie:
|
17
|
-
GOVUK.cookie('hobnob');
|
18
|
-
|
19
|
-
Deleting a cookie:
|
20
|
-
GOVUK.cookie('hobnob', null);
|
21
|
-
*/
|
22
|
-
GOVUK.cookie = function (name, value, options) {
|
23
|
-
if(typeof value !== 'undefined') {
|
24
|
-
if(value === false || value === null) {
|
25
|
-
return GOVUK.setCookie(name, '', { days: -1 });
|
26
|
-
}
|
27
|
-
return GOVUK.setCookie(name, value, options);
|
28
|
-
}
|
29
|
-
return GOVUK.getCookie(name);
|
30
|
-
};
|
31
|
-
GOVUK.setCookie = function (name, value, options) {
|
32
|
-
if(typeof options === 'undefined') {
|
33
|
-
options = {};
|
34
|
-
}
|
35
|
-
let cookieString = name + '=' + value + '; path=/';
|
36
|
-
if (options.days) {
|
37
|
-
const date = new Date();
|
38
|
-
date.setTime(date.getTime() + (options.days * 24 * 60 * 60 * 1000));
|
39
|
-
cookieString = cookieString + '; expires=' + date.toGMTString();
|
40
|
-
}
|
41
|
-
if (document.location.protocol === 'https:') {
|
42
|
-
cookieString = cookieString + '; Secure';
|
43
|
-
}
|
44
|
-
document.cookie = cookieString;
|
45
|
-
};
|
46
|
-
GOVUK.getCookie = function (name) {
|
47
|
-
const nameEQ = name + '=';
|
48
|
-
const cookies = document.cookie.split(';');
|
49
|
-
for(let i = 0, len = cookies.length; i < len; i++) {
|
50
|
-
let cookie = cookies[i];
|
51
|
-
while (cookie.charAt(0) === ' ') {
|
52
|
-
cookie = cookie.substring(1, cookie.length);
|
53
|
-
}
|
54
|
-
if (cookie.indexOf(nameEQ) === 0) {
|
55
|
-
return decodeURIComponent(cookie.substring(nameEQ.length));
|
56
|
-
}
|
57
|
-
}
|
58
|
-
return null;
|
59
|
-
};
|
60
|
-
}).call(this);
|
61
|
-
(function () {
|
62
|
-
'use strict';
|
63
|
-
const root = this;
|
64
|
-
if (typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }
|
65
|
-
|
66
|
-
GOVUK.addCookieMessage = function () {
|
67
|
-
const message = document.getElementById('global-cookie-message');
|
68
|
-
|
69
|
-
const hasCookieMessage = (message && GOVUK.cookie('seen_cookie_message') === null);
|
70
|
-
|
71
|
-
if (hasCookieMessage) {
|
72
|
-
message.style.display = 'block';
|
73
|
-
GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 });
|
74
|
-
|
75
|
-
document.addEventListener('DOMContentLoaded', function (event) {
|
76
|
-
if (GOVUK.analytics && typeof GOVUK.analytics.trackEvent === 'function') {
|
77
|
-
GOVUK.analytics.trackEvent('cookieBanner', 'Cookie banner shown', {
|
78
|
-
value: 1,
|
79
|
-
nonInteraction: true
|
80
|
-
});
|
81
|
-
}
|
82
|
-
});
|
83
|
-
}
|
84
|
-
};
|
85
|
-
}).call(this)
|
86
|
-
;
|
87
|
-
(function () {
|
88
|
-
'use strict';
|
89
|
-
|
90
|
-
// add cookie message
|
91
|
-
if (window.GOVUK && GOVUK.addCookieMessage) {
|
92
|
-
GOVUK.addCookieMessage();
|
93
|
-
}
|
94
|
-
|
95
|
-
// header navigation toggle
|
96
|
-
if (document.querySelectorAll && document.addEventListener) {
|
97
|
-
const els = document.querySelectorAll('.js-header-toggle');
|
98
|
-
let i; let _i;
|
99
|
-
for(i = 0, _i = els.length; i < _i; i++) {
|
100
|
-
els[i].addEventListener('click', function (e) {
|
101
|
-
e.preventDefault();
|
102
|
-
const target = document.getElementById(this.getAttribute('href').substr(1));
|
103
|
-
const targetClass = target.getAttribute('class') || '';
|
104
|
-
const sourceClass = this.getAttribute('class') || '';
|
105
|
-
|
106
|
-
if(targetClass.indexOf('js-visible') !== -1) {
|
107
|
-
target.setAttribute('class', targetClass.replace(/(^|\s)js-visible(\s|$)/, ''));
|
108
|
-
} else {
|
109
|
-
target.setAttribute('class', targetClass + ' js-visible');
|
110
|
-
}
|
111
|
-
if(sourceClass.indexOf('js-visible') !== -1) {
|
112
|
-
this.setAttribute('class', sourceClass.replace(/(^|\s)js-visible(\s|$)/, ''));
|
113
|
-
} else {
|
114
|
-
this.setAttribute('class', sourceClass + ' js-visible');
|
115
|
-
}
|
116
|
-
this.setAttribute('aria-expanded', this.getAttribute('aria-expanded') !== 'true');
|
117
|
-
target.setAttribute('aria-hidden', target.getAttribute('aria-hidden') === 'false');
|
118
|
-
});
|
119
|
-
}
|
120
|
-
}
|
121
|
-
}).call(this);
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/* eslint-disable no-var, vars-on-top, no-unused-vars */
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
var toolkit = require('../../../toolkit');
|
5
|
-
var helpers = toolkit.helpers;
|
6
|
-
var progressiveReveal = toolkit.progressiveReveal;
|
7
|
-
var formFocus = toolkit.formFocus;
|
8
|
-
var characterCount = toolkit.characterCount;
|
9
|
-
var validation = toolkit.validation;
|
10
|
-
|
11
|
-
var GOVUK = require('govuk-frontend');
|
12
|
-
GOVUK.initAll();
|
13
|
-
window.GOVUK = GOVUK;
|
14
|
-
var skipToMain = require('./skip-to-main');
|
15
|
-
var cookie = require('./govuk-cookies');
|
16
|
-
var cookieSettings = require('./cookieSettings');
|
17
|
-
var sessionDialog = require('./session-timeout-dialog');
|
18
|
-
|
19
|
-
toolkit.detailsSummary();
|
20
|
-
|
21
|
-
helpers.documentReady(progressiveReveal);
|
22
|
-
helpers.documentReady(formFocus);
|
23
|
-
helpers.documentReady(cookieSettings.initialiseCookieBanner);
|
24
|
-
helpers.documentReady(cookieSettings.initialiseCookiePage);
|
25
|
-
helpers.documentReady(cookieSettings.onLoad);
|
26
|
-
helpers.documentReady(characterCount);
|
27
|
-
helpers.documentReady(validation);
|