hof 19.14.2 → 20.0.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/.nyc_output/65af88d9-aebe-4d1b-a21d-6fbf7f2bbda4.json +1 -0
- package/.nyc_output/processinfo/65af88d9-aebe-4d1b-a21d-6fbf7f2bbda4.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -0
- package/.vscode/settings.json +6 -0
- package/components/date/index.js +26 -35
- package/components/date/templates/date.html +15 -12
- package/components/emailer/index.js +41 -49
- package/components/summary/index.js +0 -18
- package/config/hof-defaults.js +2 -4
- package/controller/base-controller.js +8 -26
- package/controller/controller.js +45 -2
- package/frontend/govuk-template/build/config.js +3 -3
- package/frontend/govuk-template/build/govuk_template.html +104 -0
- package/frontend/govuk-template/build/index.js +2 -2
- package/frontend/govuk-template/govuk_template_generated.html +104 -0
- package/frontend/govuk-template/index.js +4 -4
- package/frontend/template-mixins/mixins/template-mixins.js +20 -9
- package/frontend/template-mixins/partials/forms/checkbox-group.html +38 -0
- package/frontend/template-mixins/partials/forms/checkbox.html +4 -4
- package/frontend/template-mixins/partials/forms/input-submit.html +1 -1
- package/frontend/template-mixins/partials/forms/input-text-date.html +37 -0
- package/frontend/template-mixins/partials/forms/input-text-group.html +12 -9
- package/frontend/template-mixins/partials/forms/option-group.html +33 -26
- package/frontend/template-mixins/partials/forms/select.html +10 -5
- package/frontend/template-mixins/partials/forms/textarea-group.html +15 -6
- package/frontend/template-mixins/partials/mixins/panel.html +4 -4
- package/frontend/template-partials/translations/src/en/errors.json +0 -12
- package/frontend/template-partials/views/accessibility.html +4 -4
- package/frontend/template-partials/views/cookies.html +1 -1
- package/frontend/template-partials/views/layout.html +22 -22
- package/frontend/template-partials/views/partials/back.html +1 -1
- package/frontend/template-partials/views/partials/bullet-list.html +1 -1
- package/frontend/template-partials/views/partials/confirmation-alert.html +4 -3
- package/frontend/template-partials/views/partials/continue.html +1 -1
- package/frontend/template-partials/views/partials/cookie-banner.html +27 -24
- package/frontend/template-partials/views/partials/cookie-settings-radio.html +6 -6
- package/frontend/template-partials/views/partials/external-link.html +1 -1
- package/frontend/template-partials/views/partials/form.html +1 -1
- package/frontend/template-partials/views/partials/maincontent-left.html +4 -4
- package/frontend/template-partials/views/partials/navigation.html +7 -6
- package/frontend/template-partials/views/partials/session-cookies-table.html +6 -6
- package/frontend/template-partials/views/partials/table.html +7 -7
- package/frontend/template-partials/views/partials/validation-list.html +2 -2
- package/frontend/template-partials/views/partials/validation-summary.html +14 -13
- package/frontend/template-partials/views/session-timeout.html +1 -1
- package/frontend/themes/gov-uk/client-js/cookieSettings.js +1 -1
- package/frontend/themes/gov-uk/client-js/govuk-cookies.js +122 -0
- package/frontend/themes/gov-uk/client-js/index.js +5 -0
- package/frontend/themes/gov-uk/client-js/skip-to-main.js +18 -0
- package/frontend/themes/gov-uk/styles/_cookie-banner.scss +51 -1
- package/frontend/themes/gov-uk/styles/modules/_validation.scss +3 -3
- package/frontend/toolkit/assets/javascript/character-count.js +4 -4
- package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +3 -3
- package/index.js +5 -5
- package/lib/router.js +1 -2
- package/lib/settings.js +17 -2
- package/middleware/errors.js +0 -32
- package/middleware/index.js +1 -2
- package/package.json +7 -6
- package/sandbox/.env +1 -0
- package/sandbox/apps/sandbox/fields.js +24 -11
- package/sandbox/apps/sandbox/index.js +5 -1
- package/sandbox/apps/sandbox/translations/en/default.json +203 -0
- package/sandbox/apps/sandbox/translations/src/en/fields.json +9 -6
- package/sandbox/apps/sandbox/translations/src/en/journey.json +4 -1
- package/sandbox/apps/sandbox/translations/src/en/pages.json +2 -29
- package/sandbox/apps/sandbox/translations/src/en/validation.json +1 -1
- package/sandbox/assets/js/index.js +1 -1
- package/sandbox/assets/scss/app.scss +68 -16
- package/sandbox/package.json +4 -1
- package/sandbox/public/css/app.css +9444 -0
- package/sandbox/public/images/icons/icon-caret-left.png +0 -0
- package/sandbox/public/images/icons/icon-complete.png +0 -0
- package/sandbox/public/images/icons/icon-cross-remove-sign.png +0 -0
- package/sandbox/public/js/bundle.js +35644 -0
- package/sandbox/server.js +0 -5
- package/sandbox/yarn.lock +767 -0
- package/utilities/helpers/index.js +1 -16
- package/wizard/index.js +0 -1
- package/config/rate-limits.js +0 -20
- package/config/sanitisation-rules.js +0 -29
- package/frontend/govuk-template/govuk_template.html +0 -109
- package/frontend/template-partials/views/rate-limit-error.html +0 -10
- package/frontend/themes/gov-uk/views/partials/form.html +0 -9
- package/frontend/themes/gov-uk/views/partials/forms/option-group.html +0 -28
- package/frontend/themes/gov-uk/views/partials/mixins/panel.html +0 -3
- package/frontend/themes/gov-uk/views/partials/validation-summary.html +0 -24
- package/middleware/rate-limiter.js +0 -96
- package/sandbox/apps/sandbox/views/confirmation.html +0 -15
@@ -0,0 +1,104 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html>
|
3
|
+
<!--[if lt IE 9]><html class="lte-ie8" lang="{{htmlLang}}"><![endif]-->
|
4
|
+
<!--[if gt IE 8]><!--><html lang="{{htmlLang}}" class="govuk-template"><!--<![endif]-->
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8" />
|
7
|
+
<title>{{$pageTitle}}{{/pageTitle}}</title>
|
8
|
+
|
9
|
+
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="{{govukAssetPath}}images/favicon.ico" type="image/x-icon">
|
10
|
+
<link rel="mask-icon" href="{{govukAssetPath}}images/govuk-mask-icon.svg" color="#0b0c0c">
|
11
|
+
<link rel="apple-touch-icon" sizes="180x180" href="{{govukAssetPath}}images/govuk-apple-touch-icon-180x180.png">
|
12
|
+
<link rel="apple-touch-icon" sizes="167x167" href="{{govukAssetPath}}images/govuk-apple-touch-icon-167x167.png">
|
13
|
+
<link rel="apple-touch-icon" sizes="152x152" href="{{govukAssetPath}}images/govuk-apple-touch-icon-152x152.png">
|
14
|
+
<link rel="apple-touch-icon" href="{{govukAssetPath}}images/govuk-apple-touch-icon.png">
|
15
|
+
|
16
|
+
|
17
|
+
<meta name="theme-color" content="#0b0c0c" />
|
18
|
+
|
19
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
20
|
+
|
21
|
+
{{$head}}{{/head}}
|
22
|
+
|
23
|
+
|
24
|
+
<meta property="og:image" content="{{govukAssetPath}}images/opengraph-image.png">
|
25
|
+
</head>
|
26
|
+
|
27
|
+
<body class="{{$bodyClasses}}{{/bodyClasses}} govuk-template__body js-enabled" >
|
28
|
+
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>document.body.className = ((document.body.className) ? document.body.className + ' js-enabled' : 'js-enabled');</script>
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
<div id="global-cookie-message" class="gem-c-cookie-banner govuk-clearfix" data-module="cookie-banner" role="region" aria-label="cookie banner" data-nosnippet="">
|
33
|
+
{{$cookieMessage}}{{/cookieMessage}}
|
34
|
+
</div>
|
35
|
+
|
36
|
+
{{$bodyStart}}{{/bodyStart}}
|
37
|
+
|
38
|
+
<header role="banner" id="govuk-header" class="{{$headerClass}}{{/headerClass}}">
|
39
|
+
<div class="govuk-header__container govuk-width-container">
|
40
|
+
|
41
|
+
<div class="govuk-header__logo">
|
42
|
+
<a href="{{$homepageUrl}}https://www.gov.uk{{/homepageUrl}}" title="{{$logoLinkTitle}}Go to the GOV.UK homepage{{/logoLinkTitle}}" id="logo" class="govuk-header__link govuk-header__link--homepage" target="_blank" data-module="track-click" data-track-category="homeLinkClicked" data-track-action="homeHeader">
|
43
|
+
<span class="govuk-header__logotype">
|
44
|
+
<!--[if gt IE 8]><!-->
|
45
|
+
<svg aria-hidden="true" focusable="false" class="govuk-header__logotype-crown" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 97" height="30" width="36">
|
46
|
+
<path fill="currentColor" fill-rule="evenodd" d="M25 30.2c3.5 1.5 7.7-.2 9.1-3.7 1.5-3.6-.2-7.8-3.9-9.2-3.6-1.4-7.6.3-9.1 3.9-1.4 3.5.3 7.5 3.9 9zM9 39.5c3.6 1.5 7.8-.2 9.2-3.7 1.5-3.6-.2-7.8-3.9-9.1-3.6-1.5-7.6.2-9.1 3.8-1.4 3.5.3 7.5 3.8 9zM4.4 57.2c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.5-1.5-7.6.3-9.1 3.8-1.4 3.5.3 7.6 3.9 9.1zm38.3-21.4c3.5 1.5 7.7-.2 9.1-3.8 1.5-3.6-.2-7.7-3.9-9.1-3.6-1.5-7.6.3-9.1 3.8-1.3 3.6.4 7.7 3.9 9.1zm64.4-5.6c-3.6 1.5-7.8-.2-9.1-3.7-1.5-3.6.2-7.8 3.8-9.2 3.6-1.4 7.7.3 9.2 3.9 1.3 3.5-.4 7.5-3.9 9zm15.9 9.3c-3.6 1.5-7.7-.2-9.1-3.7-1.5-3.6.2-7.8 3.7-9.1 3.6-1.5 7.7.2 9.2 3.8 1.5 3.5-.3 7.5-3.8 9zm4.7 17.7c-3.6 1.5-7.8-.2-9.2-3.8-1.5-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.3 3.5-.4 7.6-3.9 9.1zM89.3 35.8c-3.6 1.5-7.8-.2-9.2-3.8-1.4-3.6.2-7.7 3.9-9.1 3.6-1.5 7.7.3 9.2 3.8 1.4 3.6-.3 7.7-3.9 9.1zM69.7 17.7l8.9 4.7V9.3l-8.9 2.8c-.2-.3-.5-.6-.9-.9L72.4 0H59.6l3.5 11.2c-.3.3-.6.5-.9.9l-8.8-2.8v13.1l8.8-4.7c.3.3.6.7.9.9l-5 15.4v.1c-.2.8-.4 1.6-.4 2.4 0 4.1 3.1 7.5 7 8.1h.2c.3 0 .7.1 1 .1.4 0 .7 0 1-.1h.2c4-.6 7.1-4.1 7.1-8.1 0-.8-.1-1.7-.4-2.4V34l-5.1-15.4c.4-.2.7-.6 1-.9zM66 92.8c16.9 0 32.8 1.1 47.1 3.2 4-16.9 8.9-26.7 14-33.5l-9.6-3.4c1 4.9 1.1 7.2 0 10.2-1.5-1.4-3-4.3-4.2-8.7L108.6 76c2.8-2 5-3.2 7.5-3.3-4.4 9.4-10 11.9-13.6 11.2-4.3-.8-6.3-4.6-5.6-7.9 1-4.7 5.7-5.9 8-.5 4.3-8.7-3-11.4-7.6-8.8 7.1-7.2 7.9-13.5 2.1-21.1-8 6.1-8.1 12.3-4.5 20.8-4.7-5.4-12.1-2.5-9.5 6.2 3.4-5.2 7.9-2 7.2 3.1-.6 4.3-6.4 7.8-13.5 7.2-10.3-.9-10.9-8-11.2-13.8 2.5-.5 7.1 1.8 11 7.3L80.2 60c-4.1 4.4-8 5.3-12.3 5.4 1.4-4.4 8-11.6 8-11.6H55.5s6.4 7.2 7.9 11.6c-4.2-.1-8-1-12.3-5.4l1.4 16.4c3.9-5.5 8.5-7.7 10.9-7.3-.3 5.8-.9 12.8-11.1 13.8-7.2.6-12.9-2.9-13.5-7.2-.7-5 3.8-8.3 7.1-3.1 2.7-8.7-4.6-11.6-9.4-6.2 3.7-8.5 3.6-14.7-4.6-20.8-5.8 7.6-5 13.9 2.2 21.1-4.7-2.6-11.9.1-7.7 8.8 2.3-5.5 7.1-4.2 8.1.5.7 3.3-1.3 7.1-5.7 7.9-3.5.7-9-1.8-13.5-11.2 2.5.1 4.7 1.3 7.5 3.3l-4.7-15.4c-1.2 4.4-2.7 7.2-4.3 8.7-1.1-3-.9-5.3 0-10.2l-9.5 3.4c5 6.9 9.9 16.7 14 33.5 14.8-2.1 30.8-3.2 47.7-3.2z"></path>
|
47
|
+
</svg>
|
48
|
+
<!--<![endif]-->
|
49
|
+
<!--<![endif]-->
|
50
|
+
<!--[if IE 8]>
|
51
|
+
<img src="{{govukAssetPath}}images/govuk-logotype-crown.png" class="govuk-header__logotype-crown-fallback-image" width="36" height="32">
|
52
|
+
<![endif]-->
|
53
|
+
</span>
|
54
|
+
<span class="govuk-header__logotype-text">
|
55
|
+
{{$globalHeaderText}}GOV.UK{{/globalHeaderText}}
|
56
|
+
</span>
|
57
|
+
</a>
|
58
|
+
</div>
|
59
|
+
{{$insideHeader}}{{/insideHeader}}
|
60
|
+
|
61
|
+
{{$propositionHeader}}{{/propositionHeader}}
|
62
|
+
</div>
|
63
|
+
</header>
|
64
|
+
|
65
|
+
|
66
|
+
{{$afterHeader}}{{/afterHeader}}
|
67
|
+
|
68
|
+
|
69
|
+
{{$main}}{{/main}}
|
70
|
+
|
71
|
+
<footer class="govuk-footer" id="footer" role="contentinfo">
|
72
|
+
|
73
|
+
<div class="govuk-width-container">
|
74
|
+
{{$footerTop}}{{/footerTop}}
|
75
|
+
|
76
|
+
<div class="govuk-footer__meta">
|
77
|
+
<div class="govuk-footer__meta-item govuk-footer__meta-item--grow">
|
78
|
+
<h2 class="govuk-visually-hidden">Support links</h2>
|
79
|
+
{{$footerSupportLinks}}{{/footerSupportLinks}}
|
80
|
+
|
81
|
+
<svg aria-hidden="true" focusable="false" class="govuk-footer__licence-logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 483.2 195.7" height="17" width="41">
|
82
|
+
<path fill="currentColor" d="M421.5 142.8V.1l-50.7 32.3v161.1h112.4v-50.7zm-122.3-9.6A47.12 47.12 0 0 1 221 97.8c0-26 21.1-47.1 47.1-47.1 16.7 0 31.4 8.7 39.7 21.8l42.7-27.2A97.63 97.63 0 0 0 268.1 0c-36.5 0-68.3 20.1-85.1 49.7A98 98 0 0 0 97.8 0C43.9 0 0 43.9 0 97.8s43.9 97.8 97.8 97.8c36.5 0 68.3-20.1 85.1-49.7a97.76 97.76 0 0 0 149.6 25.4l19.4 22.2h3v-87.8h-80l24.3 27.5zM97.8 145c-26 0-47.1-21.1-47.1-47.1s21.1-47.1 47.1-47.1 47.2 21 47.2 47S123.8 145 97.8 145"></path>
|
83
|
+
</svg>
|
84
|
+
|
85
|
+
<span class="govuk-footer__licence-description">{{$licenceMessage}}All content is available under the <a href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" id="open-government-licence" class="govuk-footer__link" target="_blank" rel="license">Open Government Licence v3.0</a>, except where otherwise stated{{/licenceMessage}}</span>
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<div class="govuk-footer__meta-item">
|
89
|
+
<a class="govuk-footer__link govuk-footer__copyright-logo" id="copyright-logo" target="_blank" href="https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/uk-government-licensing-framework/crown-copyright/">{{$crownCopyrightMessage}}© Crown copyright{{/crownCopyrightMessage}}</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
</div>
|
93
|
+
</footer>
|
94
|
+
|
95
|
+
<div id="global-app-error" class="app-error hidden"></div>
|
96
|
+
|
97
|
+
|
98
|
+
{{$bodyEnd}}{{/bodyEnd}}
|
99
|
+
|
100
|
+
|
101
|
+
<script {{#nonce}}nonce="{{nonce}}"{{/nonce}}>if (typeof window.GOVUK === 'undefined') document.body.className = document.body.className.replace('js-enabled', '');</script>
|
102
|
+
|
103
|
+
</body>
|
104
|
+
</html>
|
@@ -5,18 +5,18 @@ const servestatic = require('serve-static');
|
|
5
5
|
const Router = require('express').Router;
|
6
6
|
const buildTemplateLayout = require('./build');
|
7
7
|
|
8
|
-
const basedir = path.dirname(require.resolve('
|
8
|
+
const basedir = path.dirname(require.resolve('govuk-frontend/package.json'));
|
9
9
|
|
10
10
|
const setup = (opts, router) => {
|
11
11
|
buildTemplateLayout();
|
12
12
|
const options = opts || {};
|
13
|
-
options.path = options.path || '/
|
13
|
+
options.path = options.path || '/assets';
|
14
14
|
|
15
|
-
router.use(options.path, servestatic(path.join(basedir, './assets'), options));
|
15
|
+
router.use(options.path, servestatic(path.join(basedir, './govuk/assets'), options));
|
16
16
|
router.use((req, res, next) => {
|
17
17
|
res.locals.govukAssetPath = req.baseUrl + options.path + '/';
|
18
18
|
res.locals.partials = res.locals.partials || {};
|
19
|
-
res.locals.partials['govuk-template'] = path.resolve(__dirname, './
|
19
|
+
res.locals.partials['govuk-template'] = path.resolve(__dirname, './govuk_template_generated');
|
20
20
|
next();
|
21
21
|
});
|
22
22
|
|
@@ -12,11 +12,13 @@ const renderer = require('./render');
|
|
12
12
|
const PANELMIXIN = 'partials/mixins/panel';
|
13
13
|
const PARTIALS = [
|
14
14
|
'partials/forms/input-text-group',
|
15
|
+
'partials/forms/input-text-date',
|
15
16
|
'partials/forms/input-submit',
|
16
17
|
'partials/forms/select',
|
17
18
|
'partials/forms/checkbox',
|
18
19
|
'partials/forms/textarea-group',
|
19
|
-
'partials/forms/option-group'
|
20
|
+
'partials/forms/option-group',
|
21
|
+
'partials/forms/checkbox-group'
|
20
22
|
];
|
21
23
|
|
22
24
|
// This returns a middleware that places mixins against the `res.locals` object.
|
@@ -191,6 +193,7 @@ module.exports = function (options) {
|
|
191
193
|
const lKey = getTranslationKey(field, key, 'label');
|
192
194
|
const hint = conditionalTranslate(hKey);
|
193
195
|
const required = isRequired(field);
|
196
|
+
const labelClassName = classNames(field, 'labelClassName');
|
194
197
|
const autocomplete = field.autocomplete || extension.autocomplete;
|
195
198
|
|
196
199
|
return Object.assign({}, extension, {
|
@@ -199,8 +202,8 @@ module.exports = function (options) {
|
|
199
202
|
type: extension.type || type(field),
|
200
203
|
value: this.values && this.values[key],
|
201
204
|
label: t(lKey),
|
202
|
-
labelClassName:
|
203
|
-
formGroupClassName: classNames(field, 'formGroupClassName') || extension.formGroupClassName || 'form-group',
|
205
|
+
labelClassName: labelClassName ? `govuk-label ${labelClassName}` : 'govuk-label',
|
206
|
+
formGroupClassName: classNames(field, 'formGroupClassName') || extension.formGroupClassName || 'govuk-form-group',
|
204
207
|
hint: hint,
|
205
208
|
hintId: extension.hintId || (hint ? key + '-hint' : null),
|
206
209
|
error: this.errors && this.errors[key],
|
@@ -210,6 +213,7 @@ module.exports = function (options) {
|
|
210
213
|
date: extension.date,
|
211
214
|
autocomplete: autocomplete,
|
212
215
|
child: field.child,
|
216
|
+
noHeading: field.noHeading,
|
213
217
|
attributes: field.attributes,
|
214
218
|
renderChild: renderChild.bind(this)
|
215
219
|
});
|
@@ -219,7 +223,7 @@ module.exports = function (options) {
|
|
219
223
|
opts = opts || {};
|
220
224
|
const field = Object.assign({}, this.options.fields[key] || options.fields[key]);
|
221
225
|
const legend = field.legend;
|
222
|
-
|
226
|
+
const detail = field.detail;
|
223
227
|
let legendClassName;
|
224
228
|
let legendValue = 'fields.' + key + '.legend';
|
225
229
|
if (legend) {
|
@@ -236,7 +240,9 @@ module.exports = function (options) {
|
|
236
240
|
legend: t(legendValue),
|
237
241
|
legendClassName: legendClassName,
|
238
242
|
role: opts.type === 'radio' ? 'radiogroup' : 'group',
|
239
|
-
|
243
|
+
radioOption: opts.type === 'radio',
|
244
|
+
noHeading: field.noHeading,
|
245
|
+
detail: detail ? detail : '',
|
240
246
|
hint: conditionalTranslate(getTranslationKey(field, key, 'hint')),
|
241
247
|
options: _.map(field.options, function (obj) {
|
242
248
|
let selected = false;
|
@@ -355,7 +361,7 @@ module.exports = function (options) {
|
|
355
361
|
}
|
356
362
|
},
|
357
363
|
'checkbox-group': {
|
358
|
-
path: 'partials/forms/
|
364
|
+
path: 'partials/forms/checkbox-group',
|
359
365
|
renderWith: optionGroup,
|
360
366
|
options: {
|
361
367
|
type: 'checkbox'
|
@@ -425,16 +431,21 @@ module.exports = function (options) {
|
|
425
431
|
year: autocomplete + '-year'
|
426
432
|
};
|
427
433
|
}
|
434
|
+
const isRequired = field.validate ? field.validate.indexOf('required') > -1 : false;
|
435
|
+
const formGroupClassName = (field.formGroup && field.formGroup.className) ? field.formGroup.className : ''
|
436
|
+
const classNameDay = (field.controlsClass && field.controlsClass.day) ? field.controlsClass.day : 'govuk-date-input__input govuk-input--width-2';
|
437
|
+
const classNameMonth = (field.controlsClass && field.controlsClass.month) ? field.controlsClass.month : 'govuk-date-input__input govuk-input--width-2';
|
438
|
+
const classNameYear = (field.controlsClass && field.controlsClass.year) ? field.controlsClass.year : 'govuk-date-input__input govuk-input--width-4';
|
428
439
|
|
429
440
|
const parts = [];
|
430
441
|
|
431
442
|
if (isExact) {
|
432
|
-
const dayPart = compiled['partials/forms/input-text-
|
443
|
+
const dayPart = compiled['partials/forms/input-text-date'].render(inputText.call(this, key + '-day', { pattern: '[0-9]*', min: 1, max: 31, maxlength: 2, hintId: key + '-hint', date: true, autocomplete: autocomplete.day, formGroupClassName, className: classNameDay, isRequired }));
|
433
444
|
parts.push(dayPart);
|
434
445
|
}
|
435
446
|
|
436
|
-
const monthPart = compiled['partials/forms/input-text-
|
437
|
-
const yearPart = compiled['partials/forms/input-text-
|
447
|
+
const monthPart = compiled['partials/forms/input-text-date'].render(inputText.call(this, key + '-month', { pattern: '[0-9]*', min: 1, max: 12, maxlength: 2, hintId: key + '-hint', date: true, autocomplete: autocomplete.month, formGroupClassName, className: classNameMonth, isRequired }));
|
448
|
+
const yearPart = compiled['partials/forms/input-text-date'].render(inputText.call(this, key + '-year', { pattern: '[0-9]*', maxlength: 4, hintId: key + '-hint', date: true, autocomplete: autocomplete.year, formGroupClassName, className: classNameYear, isRequired }));
|
438
449
|
|
439
450
|
return parts.concat(monthPart, yearPart).join('\n');
|
440
451
|
};
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<div id="{{key}}-group" class="govuk-form-group{{#className}} {{className}} {{/className}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
+
<fieldset class="govuk-fieldset" {{#hint}} aria-describedby="{{key}}-hint"{{/hint}}>
|
3
|
+
<legend class="govuk-fieldset__legend {{^noHeading}}govuk-fieldset__legend--l{{/noHeading}}{{#legendClassName}} {{legendClassName}}{{/legendClassName}}">
|
4
|
+
{{^noHeading}}<h1 class="govuk-fieldset__heading">{{/noHeading}}
|
5
|
+
{{legend}}
|
6
|
+
{{^noHeading}}</h1>{{/noHeading}}
|
7
|
+
</legend>
|
8
|
+
{{#hint}}<div id="{{key}}-hint" class="govuk-hint">{{hint}}</div>{{/hint}}
|
9
|
+
{{#error}}
|
10
|
+
<p id="{{key}}-error" class="govuk-error-message">
|
11
|
+
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
12
|
+
</span>
|
13
|
+
{{/error}}
|
14
|
+
{{{detail}}}
|
15
|
+
<div class="govuk-checkboxes" data-module="govuk-checkboxes">
|
16
|
+
{{#options}}
|
17
|
+
<div class="govuk-checkboxes__item">
|
18
|
+
<input
|
19
|
+
class="govuk-checkboxes__input"
|
20
|
+
type="{{type}}"
|
21
|
+
name="{{key}}"
|
22
|
+
id="{{key}}-{{value}}"
|
23
|
+
value="{{value}}"
|
24
|
+
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
25
|
+
{{#selected}} checked="checked"{{/selected}}
|
26
|
+
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
27
|
+
{{#error}} aria-describedby="{{key}}-error" aria-invalid="true"{{/error}}
|
28
|
+
>
|
29
|
+
<label class="govuk-label govuk-checkboxes__label" for="{{key}}-{{value}}">
|
30
|
+
{{{label}}}
|
31
|
+
{{#optionHint}}<div id="{{key}}-{{value}}-item-hint" class="govuk-hint govuk-radios__hint">{{optionHint}}</div>{{/optionHint}}
|
32
|
+
</label>
|
33
|
+
</div>
|
34
|
+
{{#renderChild}}{{/renderChild}}
|
35
|
+
{{/options}}
|
36
|
+
</div>
|
37
|
+
</fieldset>
|
38
|
+
</div>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<div id="{{key}}-group" class="form-group{{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}}
|
2
|
-
{{#error}}<p class="error-message" aria-hidden="true">{{error.message}}</p>{{/error}}
|
3
|
-
<div class="
|
4
|
-
<input type="checkbox" id="{{key}}" name="{{key}}" value="true" aria-required="{{required}}"{{#error}} aria-invalid="true"{{/error}}{{^error}}{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}{{#selected}} checked="checked"{{/selected}}{{/error}}>
|
1
|
+
<div id="{{key}}-group" class="govuk-form-group {{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
+
{{#error}}<p class="govuk-error-message" aria-hidden="true">{{error.message}}</p>{{/error}}
|
3
|
+
<div class="govuk-checkboxes__item">
|
4
|
+
<input class="govuk-checkboxes__input" type="checkbox" id="{{key}}" name="{{key}}" value="true" aria-required="{{required}}"{{#error}} aria-invalid="true"{{/error}}{{^error}}{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}{{#selected}} checked="checked"{{/selected}}{{/error}}>
|
5
5
|
<label for="{{key}}" class="{{#className}}{{className}} {{/className}}{{#invalid}}invalid-input{{/invalid}}">
|
6
6
|
{{{label}}}
|
7
7
|
{{#error}}<span class="visuallyhidden">{{error.message}}</span>{{/error}}
|
@@ -1 +1 @@
|
|
1
|
-
<input type="submit" {{#id}}id="{{id}}"{{/id}} value="{{{value}}}" class="button">
|
1
|
+
<input type="submit" {{#id}}id="{{id}}"{{/id}} value="{{{value}}}" class="govuk-button">
|
@@ -0,0 +1,37 @@
|
|
1
|
+
<div class="govuk-date-input__item">
|
2
|
+
<div id="{{id}}-group" class="{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}">
|
3
|
+
<label for="{{id}}" class="{{labelClassName}}">
|
4
|
+
<span class="label-text">{{{label}}}</span>
|
5
|
+
</label>
|
6
|
+
{{#hint}}<span {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</span>{{/hint}}
|
7
|
+
{{#renderChild}}{{/renderChild}}
|
8
|
+
{{#attributes}}
|
9
|
+
{{#prefix}}
|
10
|
+
<div class="govuk-input__prefix" aria-hidden="true">{{prefix}}</div>
|
11
|
+
{{/prefix}}
|
12
|
+
{{/attributes}}
|
13
|
+
<input
|
14
|
+
type="{{type}}"
|
15
|
+
name="{{id}}"
|
16
|
+
id="{{id}}"
|
17
|
+
class="govuk-input{{#className}} {{className}}{{/className}}{{#error}} invalid-input{{/error}}"
|
18
|
+
aria-required="{{required}}"
|
19
|
+
{{#value}} value="{{value}}"{{/value}}
|
20
|
+
{{#min}} min="{{min}}"{{/min}}
|
21
|
+
{{#max}} max="{{max}}"{{/max}}
|
22
|
+
{{#maxlength}} maxlength="{{maxlength}}"{{/maxlength}}
|
23
|
+
{{#pattern}} pattern="{{pattern}}"{{/pattern}}
|
24
|
+
{{#hintId}} aria-describedby="{{hintId}}"{{/hintId}}
|
25
|
+
{{#error}} aria-invalid="true"{{/error}}
|
26
|
+
{{#autocomplete}} autocomplete="{{autocomplete}}"{{/autocomplete}}
|
27
|
+
{{#attributes}}
|
28
|
+
{{attribute}}="{{value}}"
|
29
|
+
{{/attributes}}
|
30
|
+
>
|
31
|
+
{{#attributes}}
|
32
|
+
{{#suffix}}
|
33
|
+
<div class="govuk-input__prefix" aria-hidden="true">{{suffix}}</div>
|
34
|
+
{{/suffix}}
|
35
|
+
{{/attributes}}
|
36
|
+
</div>
|
37
|
+
</div>
|
@@ -1,11 +1,15 @@
|
|
1
|
-
<div id="{{id}}-group" class="
|
2
|
-
<label for="{{id}}" class="{{labelClassName}}">
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
</
|
1
|
+
<div id="{{id}}-group" class="{{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}}{{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
+
{{^noHeading}}<h1 class="govuk-label-wrapper">{{/noHeading}}<label for="{{id}}" class="{{labelClassName}}">
|
3
|
+
{{{label}}}
|
4
|
+
</label>
|
5
|
+
{{^noHeading}}</h1>{{/noHeading}}
|
6
|
+
{{#hint}}<span {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</span>{{/hint}}
|
7
|
+
{{#error}}
|
8
|
+
<p class="govuk-error-message">
|
9
|
+
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
10
|
+
</p>
|
11
|
+
{{/error}}
|
7
12
|
{{#renderChild}}{{/renderChild}}
|
8
|
-
<div class="govuk-input__wrapper">
|
9
13
|
{{#attributes}}
|
10
14
|
{{#prefix}}
|
11
15
|
<div class="govuk-input__prefix" aria-hidden="true">{{prefix}}</div>
|
@@ -15,7 +19,7 @@
|
|
15
19
|
type="{{type}}"
|
16
20
|
name="{{id}}"
|
17
21
|
id="{{id}}"
|
18
|
-
class="
|
22
|
+
class="{{^className}}govuk-input{{/className}}{{#className}}{{className}}{{/className}}{{#error}} invalid-input{{/error}}"
|
19
23
|
aria-required="{{required}}"
|
20
24
|
{{#value}} value="{{value}}"{{/value}}
|
21
25
|
{{#min}} min="{{min}}"{{/min}}
|
@@ -34,5 +38,4 @@
|
|
34
38
|
<div class="govuk-input__prefix" aria-hidden="true">{{suffix}}</div>
|
35
39
|
{{/suffix}}
|
36
40
|
{{/attributes}}
|
37
|
-
</div>
|
38
41
|
</div>
|
@@ -1,27 +1,34 @@
|
|
1
|
-
<div id="{{key}}-group" class="form-group{{#className}} {{className}} {{/className}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}}
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
1
|
+
<div id="{{key}}-group" class="govuk-form-group{{#className}} {{className}} {{/className}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
+
<fieldset class="govuk-fieldset" {{#hint}} aria-describedby="{{key}}-hint"{{/hint}}>
|
3
|
+
<legend class="govuk-fieldset__legend {{^noHeading}}govuk-fieldset__legend--l{{/noHeading}}{{#legendClassName}} {{legendClassName}}{{/legendClassName}}">
|
4
|
+
{{^noHeading}}<h1 class="govuk-fieldset__heading">{{/noHeading}}
|
5
|
+
{{legend}}
|
6
|
+
{{^noHeading}}</h1>{{/noHeading}}
|
7
|
+
</legend>
|
8
|
+
{{#hint}}<div id="{{key}}-hint" class="govuk-hint">{{hint}}</div>{{/hint}}
|
9
|
+
{{#error}}<p id="{{key}}-error" class="govuk-error-message"><span class="govuk-visually-hidden">Error:</span> {{error.message}}</p>{{/error}}
|
10
|
+
{{{detail}}}
|
11
|
+
<div class="govuk-radios" data-module="govuk-radios">
|
12
|
+
{{#options}}
|
13
|
+
<div class="govuk-radios__item">
|
14
|
+
<input
|
15
|
+
class="govuk-radios__input"
|
16
|
+
type="{{type}}"
|
17
|
+
name="{{key}}"
|
18
|
+
id="{{key}}-{{value}}"
|
19
|
+
value="{{value}}"
|
20
|
+
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
21
|
+
{{#selected}} checked="checked"{{/selected}}
|
22
|
+
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
23
|
+
{{#error}} aria-describedby="{{key}}-error" aria-invalid="true"{{/error}}
|
24
|
+
>
|
25
|
+
<label class="govuk-label govuk-radios__label" for="{{key}}-{{value}}">
|
26
|
+
{{{label}}}
|
27
|
+
{{#optionHint}}<div id="{{key}}-{{value}}-item-hint" class="govuk-hint govuk-radios__hint">{{optionHint}}</div>{{/optionHint}}
|
28
|
+
</label>
|
29
|
+
</div>
|
30
|
+
{{#renderChild}}{{/renderChild}}
|
31
|
+
{{/options}}
|
32
|
+
</div>
|
33
|
+
</fieldset>
|
27
34
|
</div>
|
@@ -1,10 +1,15 @@
|
|
1
|
-
<div id="{{id}}-group" class="
|
2
|
-
<label for="{{id}}" class="{{labelClassName}}">
|
1
|
+
<div id="{{id}}-group" class="{{#compound}} form-group-compound{{/compound}}{{#formGroupClassName}} {{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
2
|
+
{{^noHeading}}<h1 class="govuk-label-wrapper">{{/noHeading}}<label for="{{id}}" class="{{labelClassName}}{{^noHeading}}govuk-label--l{{/noHeading}}">
|
3
3
|
{{{label}}}
|
4
|
-
{{#hint}}<span {{$hintId}}id="{{hintId}}" {{/hintId}}class="
|
5
|
-
{{#error}}
|
4
|
+
{{#hint}}<span {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</span>{{/hint}}
|
5
|
+
{{#error}}
|
6
|
+
<p class="govuk-error-message">
|
7
|
+
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
8
|
+
</p>
|
9
|
+
{{/error}}
|
6
10
|
</label>
|
7
|
-
|
11
|
+
{{^noHeading}}</h1>{{/noHeading}}
|
12
|
+
<select id="{{id}}" class="govuk-select{{#className}} {{className}}{{/className}}{{#error}} invalid-input{{/error}}" name="{{id}}" aria-required="{{required}}">
|
8
13
|
{{#options}}
|
9
14
|
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{label}}</option>
|
10
15
|
{{/options}}
|
@@ -1,14 +1,22 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
{{#maxlength}}
|
2
|
+
<div class="govuk-character-count" data-module="govuk-character-count" data-maxlength="{{maxlength}}">
|
3
|
+
{{/maxlength}}
|
4
|
+
<div id="{{id}}-group" class="{{#compound}}form-group-compound {{/compound}}{{#formGroupClassName}}{{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
5
|
+
{{^noHeading}}<h1 class="govuk-label-wrapper">{{/noHeading}}<label for="{{id}}" class="{{labelClassName}}">
|
3
6
|
{{{label}}}
|
4
|
-
{{#
|
5
|
-
|
7
|
+
{{#error}}
|
8
|
+
<p id="{{id}}-error" class="govuk-error-message">
|
9
|
+
<span id="{{id}}-error" class="govuk-visually-hidden">Error:</span>{{error.message}}
|
10
|
+
</p>
|
11
|
+
{{/error}}
|
6
12
|
</label>
|
13
|
+
{{^noHeading}}</h1>{{/noHeading}}
|
14
|
+
{{#hint}}<div {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</div>{{/hint}}
|
7
15
|
{{#renderChild}}{{/renderChild}}
|
8
16
|
<textarea
|
9
17
|
name="{{id}}"
|
10
18
|
id="{{id}}"
|
11
|
-
class="
|
19
|
+
class="govuk-textarea{{#className}} {{className}}{{/className}} {{#maxlength}}maxlength{{/maxlength}}{{#error}} invalid-input{{/error}}"
|
12
20
|
aria-required="{{required}}"
|
13
21
|
{{#maxlength}} maxlength="{{maxlength}}"{{/maxlength}}
|
14
22
|
{{#attributes}}
|
@@ -19,5 +27,6 @@
|
|
19
27
|
{{^error}}{{^hintId}}{{#maxlength}} aria-describedby="{{id}}-maxlength-hint"{{/maxlength}}{{/hintId}}{{/error}}
|
20
28
|
{{#error}} aria-invalid="true" aria-describedby="{{id}}-error"{{/error}}
|
21
29
|
>{{value}}</textarea>
|
22
|
-
{{#maxlength}}<
|
30
|
+
{{#maxlength}}<div id="{{id}}-maxlength-hint" class="govuk-character-count__message" aria-live="polite">You have {{maxlength}} characters remaining</div>{{/maxlength}}
|
23
31
|
</div>
|
32
|
+
{{#maxlength}}</div>{{/maxlength}}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
<div id="{{toggle}}-panel"
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
<div id="{{toggle}}-panel"
|
2
|
+
class="{{#radioOption}}govuk-radios__conditional govuk-radios__conditional--hidden{{/radioOption}}
|
3
|
+
{{^radioOption}}govuk-checkboxes__conditional govuk-checkboxes__conditional--hidden{{/radioOption}}">
|
4
|
+
{{#renderMixin}}{{/renderMixin}}
|
5
5
|
</div>
|
@@ -14,17 +14,5 @@
|
|
14
14
|
"cookies-required": {
|
15
15
|
"title": "Cookies are required to use this service",
|
16
16
|
"message": "Cookies are required in order to use this service.<br /><br /> Please <a href=\"http://www.aboutcookies.org/how-to-control-cookies/\" rel=\"external\">enable cookies</a> and try again. Find out <a href=\"/cookies\">how to we use cookies</a>."
|
17
|
-
},
|
18
|
-
"ddos-rate-limit": {
|
19
|
-
"title": "Too many requests submitted",
|
20
|
-
"message": "You have submitted too many requests in quick succession.",
|
21
|
-
"pre-time-to-wait": "Please try again in ",
|
22
|
-
"post-time-to-wait": " minutes."
|
23
|
-
},
|
24
|
-
"submission-rate-limit": {
|
25
|
-
"title": "Too many submissions",
|
26
|
-
"message": "You have submitted too many applications in a short space of time.",
|
27
|
-
"pre-time-to-wait": "Please try again in ",
|
28
|
-
"post-time-to-wait": " minutes."
|
29
17
|
}
|
30
18
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
{{$content}}
|
10
10
|
<p class="govuk-body">{{#t}}accessibility.intro-p2{{/t}}</p>
|
11
|
-
<ul class="list
|
11
|
+
<ul class="govuk-list">
|
12
12
|
<li>{{#t}}accessibility.intro-p2-li1{{/t}}</li>
|
13
13
|
<li>{{#t}}accessibility.intro-p2-li2{{/t}}</li>
|
14
14
|
<li>{{#t}}accessibility.intro-p2-li3{{/t}}</li>
|
@@ -18,13 +18,13 @@
|
|
18
18
|
<p class="govuk-body">{{#t}}accessibility.intro-p3-pre-link{{/t}} <a href="https://mcmw.abilitynet.org.uk/">{{#t}}accessibility.intro-p3-link{{/t}}</a> {{#t}}accessibility.intro-p3-post-link{{/t}}</p>
|
19
19
|
<h2 class="govuk-heading-m">{{#t}}accessibility.how-accessible-header{{/t}}</h2>
|
20
20
|
<p class="govuk-body">{{#t}}accessibility.how-accessible-p1{{/t}}</p>
|
21
|
-
<ul class="list
|
21
|
+
<ul class="govuk-list">
|
22
22
|
<li>{{#t}}accessibility.how-accessible-p1-li1{{/t}}</li>
|
23
23
|
<li>{{#t}}accessibility.how-accessible-p1-li2{{/t}}</li>
|
24
24
|
</ul>
|
25
25
|
<h2 class="govuk-heading-m">{{#t}}accessibility.reporting-header{{/t}}</h2>
|
26
26
|
<p class="govuk-body">{{#t}}accessibility.reporting-p1{{/t}}</p>
|
27
|
-
<ul class="list
|
27
|
+
<ul class="govuk-list">
|
28
28
|
<li>{{#t}}accessibility.reporting-p1-li1-pre-link{{/t}} <a href="mailto:{{#t}}accessibility.contact-email-accessibility{{/t}}">{{#t}}accessibility.contact-email-accessibility{{/t}}</a></li>
|
29
29
|
</ul>
|
30
30
|
<p class="govuk-body">
|
@@ -40,7 +40,7 @@
|
|
40
40
|
<h2 class="govuk-heading-m">{{#t}}accessibility.non-accessible-header{{/t}}</h2>
|
41
41
|
<p class="govuk-body">{{#t}}accessibility.non-accessible-p1{{/t}}</p>
|
42
42
|
<h3 class="govuk-heading-m">{{#t}}accessibility.non-compliance-header{{/t}}</h3>
|
43
|
-
<ul class="list
|
43
|
+
<ul class="govuk-list">
|
44
44
|
<li>{{#t}}accessibility.non-compliance-li1{{/t}}</li>
|
45
45
|
</ul>
|
46
46
|
<h3 class="govuk-heading-m">{{#t}}accessibility.disproportionate-burden-header{{/t}}</h3>
|