hof 21.0.0-instrumentation-beta.0 → 21.0.1-axios-beta
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/automate-publish.yml +1 -1
- package/.github/workflows/automate-tag.yml +4 -4
- package/.nyc_output/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
- package/.nyc_output/processinfo/4fc007c9-d6c8-4614-89ce-04c7d6ce9fe5.json +1 -0
- package/.nyc_output/processinfo/index.json +1 -1
- package/README.md +340 -256
- package/build/tasks/sass/index.js +3 -1
- package/build/tasks/watch/index.js +1 -1
- package/components/combine-and-loop-fields/Readme.md +42 -0
- package/components/combine-and-loop-fields/index.js +156 -0
- package/components/date/index.js +3 -1
- package/components/date/templates/date.html +15 -12
- package/components/homeoffice-countries/index.js +22 -0
- package/components/index.js +2 -0
- package/components/notify/notify.js +2 -2
- package/components/summary/index.js +3 -2
- package/config/builder-defaults.js +3 -1
- package/config/component-defaults.js +13 -0
- package/controller/controller.js +57 -1
- package/controller/formatting/formatters.js +12 -0
- package/controller/validation/index.js +2 -1
- package/controller/validation/validators.js +4 -0
- package/frontend/govuk-template/build/config.js +2 -2
- package/frontend/govuk-template/build/govuk_template.html +104 -0
- package/frontend/govuk-template/build/index.js +2 -2
- package/frontend/govuk-template/index.js +4 -4
- package/frontend/template-mixins/mixins/template-mixins.js +39 -11
- package/frontend/template-mixins/partials/forms/checkbox-group.html +47 -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 +15 -10
- package/frontend/template-mixins/partials/forms/option-group.html +42 -26
- package/frontend/template-mixins/partials/forms/select.html +10 -5
- package/frontend/template-mixins/partials/forms/textarea-group.html +37 -23
- package/frontend/template-mixins/partials/mixins/panel.html +3 -4
- 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 +24 -17
- 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 +2 -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/summary-table-row.html +2 -2
- 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/partials/warn.html +7 -0
- package/frontend/template-partials/views/session-timeout.html +3 -2
- package/frontend/themes/gov-uk/client-js/cookieSettings.js +1 -1
- package/frontend/themes/gov-uk/client-js/govuk-cookies.js +121 -0
- package/frontend/themes/gov-uk/client-js/index.js +6 -1
- package/frontend/themes/gov-uk/client-js/skip-to-main.js +19 -0
- package/frontend/themes/gov-uk/styles/_cookie-banner.scss +51 -1
- package/frontend/themes/gov-uk/styles/govuk.scss +4 -0
- package/frontend/themes/gov-uk/styles/modules/_validation.scss +5 -5
- package/frontend/toolkit/assets/javascript/character-count.js +4 -4
- package/frontend/toolkit/assets/javascript/progressive-reveal.js +3 -1
- package/frontend/toolkit/assets/javascript/validation.js +5 -1
- package/frontend/toolkit/assets/stylesheets/modules/_validation.scss +3 -3
- package/index.js +15 -2
- package/lib/ga-tag.js +1 -1
- package/lib/settings.js +18 -2
- package/middleware/errors.js +2 -3
- package/middleware/not-found.js +0 -3
- package/middleware/rate-limiter.js +1 -0
- package/model/apis/html-to-pdf-converter.js +9 -8
- package/model/index.js +27 -28
- package/package.json +16 -14
- package/sandbox/README.md +3 -3
- package/sandbox/apps/sandbox/fields.js +33 -11
- package/sandbox/apps/sandbox/index.js +4 -0
- package/sandbox/apps/sandbox/sections/summary-data-sections.js +3 -0
- package/sandbox/apps/sandbox/translations/en/default.json +224 -0
- package/sandbox/apps/sandbox/translations/src/en/fields.json +11 -4
- package/sandbox/apps/sandbox/translations/src/en/journey.json +4 -1
- package/sandbox/apps/sandbox/translations/src/en/pages.json +7 -25
- package/sandbox/apps/sandbox/translations/src/en/validation.json +5 -1
- package/sandbox/assets/js/index.js +1 -1
- package/sandbox/assets/scss/app.scss +16 -16
- package/sandbox/package.json +6 -1
- package/sandbox/public/css/app.css +2793 -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 +32888 -0
- package/sandbox/server.js +2 -1
- package/sandbox/yarn.lock +243 -1
- package/wizard/index.js +0 -13
- package/wizard/middleware/check-progress.js +36 -1
- package/.nyc_output/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
- package/.nyc_output/processinfo/4d5a4574-78fc-4fcb-9412-3658f6ce33ff.json +0 -1
- package/frontend/govuk-template/govuk_template.html +0 -109
- 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/monitor.js +0 -20
- package/sandbox/apps/sandbox/views/confirmation.html +0 -15
@@ -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.
|
@@ -40,6 +42,15 @@ module.exports = function (options) {
|
|
40
42
|
return null;
|
41
43
|
}
|
42
44
|
|
45
|
+
function maxword(field) {
|
46
|
+
const validation = field.validate || [];
|
47
|
+
const mw = _.findWhere(validation, { type: 'maxword' });
|
48
|
+
if (mw) {
|
49
|
+
return _.isArray(mw.arguments) ? mw.arguments[0] : mw.arguments;
|
50
|
+
}
|
51
|
+
return null;
|
52
|
+
}
|
53
|
+
|
43
54
|
function type(field) {
|
44
55
|
return field.type || 'text';
|
45
56
|
}
|
@@ -191,6 +202,7 @@ module.exports = function (options) {
|
|
191
202
|
const lKey = getTranslationKey(field, key, 'label');
|
192
203
|
const hint = conditionalTranslate(hKey);
|
193
204
|
const required = isRequired(field);
|
205
|
+
const labelClassName = classNames(field, 'labelClassName');
|
194
206
|
const autocomplete = field.autocomplete || extension.autocomplete;
|
195
207
|
|
196
208
|
return Object.assign({}, extension, {
|
@@ -199,18 +211,22 @@ module.exports = function (options) {
|
|
199
211
|
type: extension.type || type(field),
|
200
212
|
value: this.values && this.values[key],
|
201
213
|
label: t(lKey),
|
202
|
-
labelClassName:
|
203
|
-
formGroupClassName: classNames(field, 'formGroupClassName') || extension.formGroupClassName || 'form-group',
|
214
|
+
labelClassName: labelClassName ? `govuk-label ${labelClassName}` : 'govuk-label',
|
215
|
+
formGroupClassName: classNames(field, 'formGroupClassName') || extension.formGroupClassName || 'govuk-form-group',
|
204
216
|
hint: hint,
|
205
217
|
hintId: extension.hintId || (hint ? key + '-hint' : null),
|
206
218
|
error: this.errors && this.errors[key],
|
207
219
|
maxlength: maxlength(field) || extension.maxlength,
|
220
|
+
maxword: maxword(field) || extension.maxword,
|
208
221
|
required: required,
|
209
222
|
pattern: extension.pattern,
|
210
223
|
date: extension.date,
|
211
224
|
autocomplete: autocomplete,
|
212
225
|
child: field.child,
|
226
|
+
isPageHeading: field.isPageHeading,
|
213
227
|
attributes: field.attributes,
|
228
|
+
isPrefixOrSuffix: _.map(field.attributes, item => {if (item.prefix || item.suffix !== undefined) return true;}),
|
229
|
+
isMaxlengthOrMaxword: maxlength(field) || extension.maxlength || maxword(field) || extension.maxword,
|
214
230
|
renderChild: renderChild.bind(this)
|
215
231
|
});
|
216
232
|
}
|
@@ -219,7 +235,8 @@ module.exports = function (options) {
|
|
219
235
|
opts = opts || {};
|
220
236
|
const field = Object.assign({}, this.options.fields[key] || options.fields[key]);
|
221
237
|
const legend = field.legend;
|
222
|
-
|
238
|
+
const detail = field.detail;
|
239
|
+
const warningValue = 'fields.' + key + '.warning';
|
223
240
|
let legendClassName;
|
224
241
|
let legendValue = 'fields.' + key + '.legend';
|
225
242
|
if (legend) {
|
@@ -236,7 +253,10 @@ module.exports = function (options) {
|
|
236
253
|
legend: t(legendValue),
|
237
254
|
legendClassName: legendClassName,
|
238
255
|
role: opts.type === 'radio' ? 'radiogroup' : 'group',
|
239
|
-
|
256
|
+
isPageHeading: field.isPageHeading,
|
257
|
+
isWarning: field.isWarning,
|
258
|
+
warning: t(warningValue),
|
259
|
+
detail: detail ? detail : '',
|
240
260
|
hint: conditionalTranslate(getTranslationKey(field, key, 'hint')),
|
241
261
|
options: _.map(field.options, function (obj) {
|
242
262
|
let selected = false;
|
@@ -245,6 +265,7 @@ module.exports = function (options) {
|
|
245
265
|
let toggle;
|
246
266
|
let child;
|
247
267
|
let optionHint;
|
268
|
+
let useHintText;
|
248
269
|
|
249
270
|
if (typeof obj === 'string') {
|
250
271
|
value = obj;
|
@@ -255,6 +276,7 @@ module.exports = function (options) {
|
|
255
276
|
label = obj.label || 'fields.' + key + '.options.' + obj.value + '.label';
|
256
277
|
toggle = obj.toggle;
|
257
278
|
child = obj.child;
|
279
|
+
useHintText = obj.useHintText;
|
258
280
|
optionHint = obj.hint || 'fields.' + key + '.options.' + obj.value + '.hint';
|
259
281
|
}
|
260
282
|
|
@@ -270,9 +292,10 @@ module.exports = function (options) {
|
|
270
292
|
value: value,
|
271
293
|
type: opts.type,
|
272
294
|
selected: selected,
|
295
|
+
radioOption: opts.type === 'radio',
|
273
296
|
toggle: toggle,
|
274
297
|
child: child,
|
275
|
-
optionHint: conditionalTranslate(optionHint) || ''
|
298
|
+
optionHint: useHintText ? optionHint : conditionalTranslate(optionHint) || ''
|
276
299
|
};
|
277
300
|
}, this),
|
278
301
|
className: classNames(field),
|
@@ -297,7 +320,7 @@ module.exports = function (options) {
|
|
297
320
|
invalid: this.errors && this.errors[key] && opts.required,
|
298
321
|
label: t(fieldLabel || 'fields.' + key + '.label'),
|
299
322
|
selected: selected,
|
300
|
-
className: classNames(field) || '
|
323
|
+
className: classNames(field) || 'govuk-label govuk-checkboxes__label',
|
301
324
|
child: field.child,
|
302
325
|
renderChild: renderChild.bind(this)
|
303
326
|
});
|
@@ -355,7 +378,7 @@ module.exports = function (options) {
|
|
355
378
|
}
|
356
379
|
},
|
357
380
|
'checkbox-group': {
|
358
|
-
path: 'partials/forms/
|
381
|
+
path: 'partials/forms/checkbox-group',
|
359
382
|
renderWith: optionGroup,
|
360
383
|
options: {
|
361
384
|
type: 'checkbox'
|
@@ -425,16 +448,21 @@ module.exports = function (options) {
|
|
425
448
|
year: autocomplete + '-year'
|
426
449
|
};
|
427
450
|
}
|
451
|
+
const isThisRequired = field.validate ? field.validate.indexOf('required') > -1 : false;
|
452
|
+
const formGroupClassName = (field.formGroup && field.formGroup.className) ? field.formGroup.className : '';
|
453
|
+
const classNameDay = (field.controlsClass && field.controlsClass.day) ? field.controlsClass.day : 'govuk-date-input__input govuk-input--width-2';
|
454
|
+
const classNameMonth = (field.controlsClass && field.controlsClass.month) ? field.controlsClass.month : 'govuk-date-input__input govuk-input--width-2';
|
455
|
+
const classNameYear = (field.controlsClass && field.controlsClass.year) ? field.controlsClass.year : 'govuk-date-input__input govuk-input--width-4';
|
428
456
|
|
429
457
|
const parts = [];
|
430
458
|
|
431
459
|
if (isExact) {
|
432
|
-
const dayPart = compiled['partials/forms/input-text-
|
460
|
+
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, isThisRequired }));
|
433
461
|
parts.push(dayPart);
|
434
462
|
}
|
435
463
|
|
436
|
-
const monthPart = compiled['partials/forms/input-text-
|
437
|
-
const yearPart = compiled['partials/forms/input-text-
|
464
|
+
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, isThisRequired }));
|
465
|
+
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, isThisRequired }));
|
438
466
|
|
439
467
|
return parts.concat(monthPart, yearPart).join('\n');
|
440
468
|
};
|
@@ -0,0 +1,47 @@
|
|
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 {{#isPageHeading}}govuk-fieldset__legend--l{{/isPageHeading}}{{#legendClassName}} {{legendClassName}}{{/legendClassName}}">
|
4
|
+
{{#isPageHeading}}<h1 class="govuk-fieldset__heading">{{/isPageHeading}}
|
5
|
+
{{legend}}
|
6
|
+
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
7
|
+
</legend>
|
8
|
+
{{#isWarning}}
|
9
|
+
<div class="govuk-warning-text">
|
10
|
+
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
|
11
|
+
<strong class="govuk-warning-text__text">
|
12
|
+
<span class="govuk-warning-text__assistive">Warning</span>
|
13
|
+
{{warning}}
|
14
|
+
</strong>
|
15
|
+
</div>
|
16
|
+
{{/isWarning}}
|
17
|
+
{{#hint}}<div id="{{key}}-hint" class="govuk-hint">{{hint}}</div>{{/hint}}
|
18
|
+
{{#error}}
|
19
|
+
<p id="{{key}}-error" class="govuk-error-message">
|
20
|
+
<span class="govuk-visually-hidden">Error:</span> {{error.message}}
|
21
|
+
</span>
|
22
|
+
{{/error}}
|
23
|
+
{{{detail}}}
|
24
|
+
<div class="govuk-checkboxes" data-module="govuk-checkboxes">
|
25
|
+
{{#options}}
|
26
|
+
<div class="govuk-checkboxes__item">
|
27
|
+
<input
|
28
|
+
class="govuk-checkboxes__input"
|
29
|
+
type="{{type}}"
|
30
|
+
name="{{key}}"
|
31
|
+
id="{{key}}-{{value}}"
|
32
|
+
value="{{value}}"
|
33
|
+
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
34
|
+
{{#selected}} checked="checked"{{/selected}}
|
35
|
+
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
36
|
+
{{#error}} aria-describedby="{{key}}-error" aria-invalid="true"{{/error}}
|
37
|
+
>
|
38
|
+
<label class="govuk-label govuk-checkboxes__label" for="{{key}}-{{value}}">
|
39
|
+
{{{label}}}
|
40
|
+
{{#optionHint}}<div id="{{key}}-{{value}}-item-hint" class="govuk-hint">{{optionHint}}</div>{{/optionHint}}
|
41
|
+
</label>
|
42
|
+
</div>
|
43
|
+
{{#renderChild}}{{/renderChild}}
|
44
|
+
{{/options}}
|
45
|
+
</div>
|
46
|
+
</fieldset>
|
47
|
+
</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}} govuk-input--error{{/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,16 @@
|
|
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
|
+
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}<label for="{{id}}" class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
3
|
+
{{{label}}}
|
4
|
+
</label>
|
5
|
+
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
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">
|
13
|
+
{{#isPrefixOrSuffix}}<div class="govuk-input__wrapper">{{/isPrefixOrSuffix}}
|
9
14
|
{{#attributes}}
|
10
15
|
{{#prefix}}
|
11
16
|
<div class="govuk-input__prefix" aria-hidden="true">{{prefix}}</div>
|
@@ -15,7 +20,7 @@
|
|
15
20
|
type="{{type}}"
|
16
21
|
name="{{id}}"
|
17
22
|
id="{{id}}"
|
18
|
-
class="
|
23
|
+
class="{{^className}}govuk-input{{/className}}{{#className}}{{className}}{{/className}}{{#error}} govuk-input--error{{/error}}"
|
19
24
|
aria-required="{{required}}"
|
20
25
|
{{#value}} value="{{value}}"{{/value}}
|
21
26
|
{{#min}} min="{{min}}"{{/min}}
|
@@ -31,8 +36,8 @@
|
|
31
36
|
>
|
32
37
|
{{#attributes}}
|
33
38
|
{{#suffix}}
|
34
|
-
<div class="govuk-
|
39
|
+
<div class="govuk-input__suffix" aria-hidden="true">{{suffix}}</div>
|
35
40
|
{{/suffix}}
|
36
41
|
{{/attributes}}
|
37
|
-
</div>
|
42
|
+
{{#isPrefixOrSuffix}}</div>{{/isPrefixOrSuffix}}
|
38
43
|
</div>
|
@@ -1,27 +1,43 @@
|
|
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 {{#isPageHeading}}govuk-fieldset__legend--l{{/isPageHeading}}{{#legendClassName}} {{legendClassName}}{{/legendClassName}}">
|
4
|
+
{{#isPageHeading}}<h1 class="govuk-fieldset__heading">{{/isPageHeading}}
|
5
|
+
{{legend}}
|
6
|
+
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
7
|
+
</legend>
|
8
|
+
{{#isWarning}}
|
9
|
+
<div class="govuk-warning-text">
|
10
|
+
<span class="govuk-warning-text__icon" aria-hidden="true">!</span>
|
11
|
+
<strong class="govuk-warning-text__text">
|
12
|
+
<span class="govuk-warning-text__assistive">Warning</span>
|
13
|
+
{{warning}}
|
14
|
+
</strong>
|
15
|
+
</div>
|
16
|
+
{{/isWarning}}
|
17
|
+
{{#hint}}<div id="{{key}}-hint" class="govuk-hint">{{hint}}</div>{{/hint}}
|
18
|
+
{{#error}}<p id="{{key}}-error" class="govuk-error-message"><span class="govuk-visually-hidden">Error:</span> {{error.message}}</p>{{/error}}
|
19
|
+
{{{detail}}}
|
20
|
+
<div class="govuk-radios" data-module="govuk-radios">
|
21
|
+
{{#options}}
|
22
|
+
<div class="govuk-radios__item">
|
23
|
+
<input
|
24
|
+
class="govuk-radios__input"
|
25
|
+
type="{{type}}"
|
26
|
+
name="{{key}}"
|
27
|
+
id="{{key}}-{{value}}"
|
28
|
+
value="{{value}}"
|
29
|
+
{{#toggle}} data-toggle="{{toggle}}"{{/toggle}}
|
30
|
+
{{#selected}} checked="checked"{{/selected}}
|
31
|
+
{{^error}}{{#optionHint}} aria-describedby="{{key}}-{{value}}-item-hint"{{/optionHint}}{{^optionHint}}{{#hint}} aria-describedby="{{key}}-hint"{{/hint}}{{/optionHint}}{{/error}}
|
32
|
+
{{#error}} aria-describedby="{{key}}-error" aria-invalid="true"{{/error}}
|
33
|
+
>
|
34
|
+
<label class="govuk-label govuk-radios__label" for="{{key}}-{{value}}">
|
35
|
+
{{{label}}}
|
36
|
+
{{#optionHint}}<div id="{{key}}-{{value}}-item-hint" class="govuk-hint govuk-radios__hint">{{optionHint}}</div>{{/optionHint}}
|
37
|
+
</label>
|
38
|
+
</div>
|
39
|
+
{{#renderChild}}{{/renderChild}}
|
40
|
+
{{/options}}
|
41
|
+
</div>
|
42
|
+
</fieldset>
|
27
43
|
</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
|
+
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}<label for="{{id}}" class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
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
|
+
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
12
|
+
<select id="{{id}}" class="govuk-select{{#className}} {{className}}{{/className}}{{#error}} govuk-select--error{{/error}}" name="{{id}}" aria-required="{{required}}">
|
8
13
|
{{#options}}
|
9
14
|
<option value="{{value}}" {{#selected}}selected{{/selected}}>{{label}}</option>
|
10
15
|
{{/options}}
|
@@ -1,23 +1,37 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
{{#
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
{{/
|
17
|
-
{{
|
18
|
-
{{
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
1
|
+
{{#isMaxlengthOrMaxword}}<div class="govuk-character-count" data-module="govuk-character-count"
|
2
|
+
{{#maxlength}}data-maxlength="{{maxlength}}" {{/maxlength}} {{#maxword}}data-maxwords="{{maxword}}" {{/maxword}}>
|
3
|
+
{{/isMaxlengthOrMaxword}}
|
4
|
+
<div id="{{id}}-group" class="govuk-form-group {{#formGroupClassName}}{{formGroupClassName}}{{/formGroupClassName}}{{#error}} govuk-form-group--error{{/error}}">
|
5
|
+
{{#isPageHeading}}<h1 class="govuk-label-wrapper">{{/isPageHeading}}
|
6
|
+
<label for="{{id}}"
|
7
|
+
class="{{labelClassName}}{{#isPageHeading}}govuk-label--l{{/isPageHeading}}">
|
8
|
+
{{{label}}}
|
9
|
+
{{#error}}
|
10
|
+
<p id="{{id}}-error" class="govuk-error-message">
|
11
|
+
<span id="{{id}}-error" class="govuk-visually-hidden">Error:</span>{{error.message}}
|
12
|
+
</p>
|
13
|
+
{{/error}}
|
14
|
+
</label>
|
15
|
+
{{#isPageHeading}}</h1>{{/isPageHeading}}
|
16
|
+
{{#hint}}<div {{$hintId}}id="{{hintId}}" {{/hintId}}class="govuk-hint">{{hint}}</div>{{/hint}}
|
17
|
+
{{#renderChild}}{{/renderChild}}
|
18
|
+
<textarea name="{{id}}" id="{{id}}"
|
19
|
+
class="govuk-textarea {{#isMaxlengthOrMaxword}}govuk-js-character-count{{/isMaxlengthOrMaxword}} {{#className}}{{className}}{{/className}} {{#error}}govuk-input--error{{/error}}"
|
20
|
+
{{#isMaxlengthOrMaxword}}
|
21
|
+
aria-describedby="{{id}}-info"
|
22
|
+
{{/isMaxlengthOrMaxword}}
|
23
|
+
{{#attributes}}
|
24
|
+
{{attribute}}="{{value}}"
|
25
|
+
{{/attributes}}
|
26
|
+
{{^error}}{{#hintId}}{{#maxlength}} aria-describedby="{{id}}-maxlength-hint {{hintId}}"{{/maxlength}}{{/hintId}}{{/error}}
|
27
|
+
{{^error}}{{#hintId}}{{^maxlength}} aria-describedby="{{hintId}}"{{/maxlength}}{{/hintId}}{{/error}}
|
28
|
+
{{^error}}{{^hintId}}{{#maxlength}}aria-describedby="{{id}}-maxlength-hint" {{/maxlength}}{{/hintId}}{{/error}}
|
29
|
+
{{#error}} aria-invalid="true" aria-describedby="{{id}}-error" {{/error}}
|
30
|
+
>{{value}}</textarea>
|
31
|
+
{{#isMaxlengthOrMaxword}}
|
32
|
+
<div id="{{id}}-info" class=" govuk-hint govuk-character-count__message" aria-live="polite">You have {{#maxlength}}{{maxlength}} characters{{/maxlength}}{{#maxword}}{{maxword}}
|
33
|
+
words{{/maxword}} remaining
|
34
|
+
</div>
|
35
|
+
{{/isMaxlengthOrMaxword}}
|
36
|
+
</div>
|
37
|
+
{{#isMaxlengthOrMaxword}}</div>{{/isMaxlengthOrMaxword}}
|
@@ -1,5 +1,4 @@
|
|
1
|
-
<div id="{{toggle}}-panel" class="
|
2
|
-
|
3
|
-
|
4
|
-
</div>
|
1
|
+
<div id="{{toggle}}-panel" class="{{#radioOption}}govuk-radios__conditional{{/radioOption}}
|
2
|
+
{{^radioOption}}govuk-checkboxes__conditional{{/radioOption}}">
|
3
|
+
{{#renderMixin}}{{/renderMixin}}
|
5
4
|
</div>
|
@@ -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>
|
@@ -5,25 +5,32 @@
|
|
5
5
|
{{$pageTitle}}
|
6
6
|
{{#errorlist.length}}{{#t}}errorlist.prefix{{/t}}{{/errorlist.length}}{{$header}}{{/header}} – GOV.UK
|
7
7
|
{{/pageTitle}}
|
8
|
-
{{$
|
8
|
+
{{$bodyStart}}
|
9
|
+
<a href="#{{#skipToMain}}{{skipToMain}}{{/skipToMain}}{{^skipToMain}}main-content{{/skipToMain}}" class="govuk-skip-link" id="skip-to-main">Skip to main content</a>
|
10
|
+
{{/bodyStart}}
|
11
|
+
{{$headerClass}}govuk-header{{/headerClass}}
|
9
12
|
{{$insideHeader}}{{/insideHeader}}
|
10
13
|
{{$main}}
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
<div class="govuk-width-container ">
|
15
|
+
{{#feedbackUrl}}
|
16
|
+
<div class="govuk-phase-banner">
|
17
|
+
<p class="govuk-phase-banner__content">
|
18
|
+
<strong class="govuk-tag govuk-phase-banner__content__tag">{{#t}}journey.phase{{/t}}</strong>
|
19
|
+
<span class="govuk-phase-banner__text">This is a new service – your <a href="{{feedbackUrl}}{{^feedbackUrl}}https://eforms.homeoffice.gov.uk/outreach/feedback.ofml{{/feedbackUrl}}" class="govuk-link" id="feedback-link" target="_blank">feedback</a> will help us to improve it.</span>
|
20
|
+
</p>
|
21
|
+
</div>
|
22
|
+
{{/feedbackUrl}}
|
18
23
|
<span id="step">
|
19
24
|
{{> partials-back}} <span>{{$step}}{{/step}}</span>
|
20
25
|
</span>
|
21
|
-
|
22
|
-
|
23
|
-
|
26
|
+
<main class="govuk-main-wrapper govuk-main-wrapper--auto-spacing" id="main-content" role="main">
|
27
|
+
<div class="govuk-grid-row" id="gov-grid-row-content">
|
28
|
+
{{> partials-maincontent-left}}
|
29
|
+
</div>
|
30
|
+
</main>
|
24
31
|
{{> partials-continue}}
|
25
32
|
<script type="text/javascript" src="{{assetPath}}/js/bundle.js"></script>
|
26
|
-
|
33
|
+
</div>
|
27
34
|
{{/main}}
|
28
35
|
{{$cookieMessage}}
|
29
36
|
{{#gaTagId}}
|
@@ -37,14 +44,14 @@
|
|
37
44
|
{{/gaTagId}}
|
38
45
|
{{/cookieMessage}}
|
39
46
|
{{$footerSupportLinks}}
|
40
|
-
<ul>
|
47
|
+
<ul class="govuk-footer__inline-list">
|
41
48
|
{{#footerSupportLinks}}
|
42
|
-
<li><a href="{{path}}">{{#t}}{{property}}{{/t}}</a></li>
|
49
|
+
<li class="govuk-footer__inline-list-item"><a class="govuk-footer__link" href="{{path}}">{{#t}}{{property}}{{/t}}</a></li>
|
43
50
|
{{/footerSupportLinks}}
|
44
51
|
{{^footerSupportLinks}}
|
45
|
-
<li><a href="/cookies">{{#t}}base.cookies{{/t}}</a></li>
|
46
|
-
<li><a href="/terms-and-conditions">{{#t}}base.terms{{/t}}</a></li>
|
47
|
-
<li><a href="/accessibility">{{#t}}base.accessibility{{/t}}</a></li>
|
52
|
+
<li class="govuk-footer__inline-list-item"><a class="govuk-footer__link" href="/cookies">{{#t}}base.cookies{{/t}}</a></li>
|
53
|
+
<li class="govuk-footer__inline-list-item"><a class="govuk-footer__link" href="/terms-and-conditions">{{#t}}base.terms{{/t}}</a></li>
|
54
|
+
<li class="govuk-footer__inline-list-item"><a class="govuk-footer__link" href="/accessibility">{{#t}}base.accessibility{{/t}}</a></li>
|
48
55
|
{{/footerSupportLinks}}
|
49
56
|
</ul>
|
50
57
|
{{/footerSupportLinks}}
|