@ons/design-system 70.0.8 → 70.0.9
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/components/access-code/_macro.njk +31 -25
- package/components/access-code/example-access-code-error.njk +49 -37
- package/components/access-code/example-access-code.njk +40 -30
- package/components/accordion/_macro.njk +7 -6
- package/components/accordion/example-accordion-open.njk +0 -1
- package/components/address-input/_macro.njk +23 -11
- package/components/address-input/autosuggest.address.js +0 -5
- package/components/address-input/example-address-input-editable.njk +52 -50
- package/components/address-input/example-address-input-manual.njk +23 -21
- package/components/address-input/example-address-input.njk +40 -38
- package/components/address-output/_macro.njk +6 -6
- package/components/autosuggest/_macro.njk +57 -37
- package/components/autosuggest/example-autosuggest-country-multiple.njk +26 -26
- package/components/autosuggest/example-autosuggest-country.njk +24 -24
- package/components/back-to-top/example-back-to-top.njk +183 -6
- package/components/back-to-top/example-full-page-back-to-top.njk +135 -123
- package/components/breadcrumbs/_macro.njk +12 -4
- package/components/browser-banner/_macro.njk +6 -3
- package/components/button/_button.scss +36 -1
- package/components/button/_macro.njk +63 -62
- package/components/button/example-button-ghost.njk +1 -0
- package/components/call-to-action/_macro.njk +7 -5
- package/components/call-to-action/example-call-to-action-default.njk +3 -2
- package/components/card/_macro.njk +26 -10
- package/components/card/example-card-set-with-images.njk +31 -29
- package/components/card/example-card-set-with-lists.njk +58 -56
- package/components/card/example-card-set.njk +28 -26
- package/components/card/example-card.njk +9 -7
- package/components/char-check-limit/_macro.njk +1 -3
- package/components/checkboxes/_checkbox-macro.njk +19 -15
- package/components/checkboxes/_macro.njk +81 -72
- package/components/checkboxes/example-checkboxes-disabled.njk +30 -30
- package/components/checkboxes/example-checkboxes-error.njk +0 -1
- package/components/checkboxes/example-checkboxes-with-descriptions.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-hidden-label.njk +162 -170
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes-expanded.njk +81 -81
- package/components/checkboxes/example-checkboxes-with-revealed-checkboxes.njk +79 -79
- package/components/checkboxes/example-checkboxes-with-revealed-select-expanded.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-select.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-text-input-expanded.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-revealed-text-input.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-select-all-button.njk +7 -5
- package/components/checkboxes/example-checkboxes-with-visible-text-input.njk +7 -5
- package/components/checkboxes/example-checkboxes.njk +7 -5
- package/components/content-pagination/_macro.njk +34 -32
- package/components/content-pagination/example-content-pagination.njk +17 -17
- package/components/cookies-banner/_macro.njk +19 -6
- package/components/cookies-banner/example-cookies-banner-cymraeg.njk +2 -1
- package/components/cookies-banner/example-cookies-banner.njk +3 -4
- package/components/date-input/_macro.njk +71 -63
- package/components/date-input/example-date-input-error-for-single-field.njk +0 -1
- package/components/date-input/example-date-input-error.njk +0 -1
- package/components/description-list/_macro.njk +20 -11
- package/components/details/_macro.njk +18 -11
- package/components/details/example-details-with-warning.njk +15 -10
- package/components/document-list/_macro.njk +102 -93
- package/components/document-list/example-document-list-article-featured.njk +27 -25
- package/components/document-list/example-document-list-articles.njk +55 -53
- package/components/document-list/example-document-list-downloads.njk +49 -47
- package/components/document-list/example-document-list-search-result-featured.njk +19 -17
- package/components/document-list/example-document-list-search-results.njk +60 -58
- package/components/duration/_macro.njk +61 -55
- package/components/duration/example-duration-error-for-single-field.njk +28 -26
- package/components/duration/example-duration-single-field.njk +23 -19
- package/components/duration/example-duration.njk +33 -29
- package/components/error/_macro.njk +8 -6
- package/components/external-link/_macro.njk +7 -5
- package/components/external-link/example-external-link.njk +9 -6
- package/components/feedback/_macro.njk +7 -5
- package/components/field/_macro.njk +2 -2
- package/components/fieldset/_macro.njk +23 -16
- package/components/footer/_macro.njk +28 -21
- package/components/footer/_macro.spec.js +1 -1
- package/components/footer/example-footer-cymraeg.njk +2 -1
- package/components/footer/example-footer-default.njk +3 -4
- package/components/footer/example-footer-transactional.njk +2 -1
- package/components/footer/example-footer-warning.njk +2 -1
- package/components/footer/example-footer-with-alternative-organisation.njk +2 -1
- package/components/footer/example-footer-with-coat-of-arms.njk +2 -1
- package/components/footer/example-footer-with-copyright.njk +2 -1
- package/components/footer/example-footer.njk +2 -1
- package/components/header/_header.scss +24 -19
- package/components/header/_macro.njk +183 -141
- package/components/header/example-header-default.njk +2 -1
- package/components/header/example-header-external-for-survey-with-description.njk +2 -1
- package/components/header/example-header-external-for-surveys.njk +2 -1
- package/components/header/example-header-external-welsh.njk +7 -7
- package/components/header/example-header-external-with-navigation-and-search.njk +3 -2
- package/components/header/example-header-external-with-navigation.njk +2 -1
- package/components/header/example-header-external-with-service-links.njk +2 -1
- package/components/header/example-header-external-with-sub-navigation-removed.njk +2 -1
- package/components/header/example-header-external-with-sub-navigation.njk +3 -2
- package/components/header/example-header-internal.njk +2 -1
- package/components/header/example-header-multiple-logos.njk +2 -1
- package/components/header/{example-header-neutral-for-multicoloured-logo.njk → example-header-neutral.njk} +2 -1
- package/components/helpers/grid.njk +17 -16
- package/components/hero/_macro.njk +6 -11
- package/components/hero/example-hero-dark.njk +2 -1
- package/components/hero/example-hero-default.njk +2 -1
- package/components/icon/_macro.njk +601 -168
- package/components/image/_macro.njk +7 -5
- package/components/input/_macro.njk +114 -95
- package/components/input/example-input-search-with-character-check.njk +1 -1
- package/components/input/example-input-search-with-placeholder.njk +1 -1
- package/components/input/example-input-search.njk +1 -1
- package/components/label/_macro.njk +32 -26
- package/components/language-selector/_macro.njk +11 -2
- package/components/list/_list.scss +13 -0
- package/components/list/_macro.njk +93 -73
- package/components/message/_macro.njk +20 -7
- package/components/message-list/_macro.njk +26 -20
- package/components/modal/_macro.njk +11 -12
- package/components/multiple-input-fields/_macro.njk +30 -28
- package/components/mutually-exclusive/_macro.njk +20 -13
- package/components/mutually-exclusive/example-mutually-exclusive-checkboxes.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-date.njk +7 -5
- package/components/mutually-exclusive/example-mutually-exclusive-duration.njk +44 -40
- package/components/mutually-exclusive/example-mutually-exclusive-email.njk +7 -5
- package/components/mutually-exclusive/example-mutually-exclusive-multiple-options.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-number.njk +6 -4
- package/components/mutually-exclusive/example-mutually-exclusive-textarea.njk +6 -4
- package/components/navigation/_macro.njk +133 -67
- package/components/navigation/_navigation.scss +0 -9
- package/components/pagination/_macro.njk +42 -20
- package/components/panel/_macro.njk +27 -16
- package/components/panel/example-panel-bare.njk +6 -4
- package/components/panel/example-panel-with-announcement.njk +7 -4
- package/components/panel/example-panel-with-error-summary.njk +6 -4
- package/components/panel/example-panel-with-warning.njk +5 -3
- package/components/password/_macro.njk +7 -5
- package/components/phase-banner/_macro.njk +3 -3
- package/components/phase-banner/example-phase-banner-alpha.njk +2 -1
- package/components/phase-banner/example-phase-banner-beta.njk +4 -3
- package/components/question/_macro.njk +62 -47
- package/components/question/example-question-ccs.njk +40 -35
- package/components/question/example-question-fieldset.njk +84 -80
- package/components/question/example-question-interviewer-note.njk +27 -24
- package/components/question/example-question-no-fieldset.njk +39 -33
- package/components/quote/_macro.njk +3 -1
- package/components/radios/_macro.njk +54 -36
- package/components/radios/_macro.spec.js +21 -0
- package/components/radios/example-radios-with-clear-button-expanded.njk +6 -4
- package/components/radios/example-radios-with-clear-button.njk +6 -4
- package/components/radios/example-radios-with-descriptions.njk +7 -5
- package/components/radios/example-radios-with-revealed-select-expanded.njk +6 -4
- package/components/radios/example-radios-with-revealed-select.njk +6 -4
- package/components/radios/example-radios-with-revealed-text-area-expanded.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-area.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-input-expanded.njk +7 -5
- package/components/radios/example-radios-with-revealed-text-input.njk +7 -5
- package/components/radios/example-radios-with-separator.njk +6 -4
- package/components/radios/example-radios-with-visible-text-input.njk +7 -5
- package/components/radios/example-radios-without-border.njk +0 -1
- package/components/radios/example-radios.njk +7 -5
- package/components/related-content/_macro.njk +10 -11
- package/components/related-content/_section-macro.njk +7 -7
- package/components/related-content/example-related-content-general.njk +5 -3
- package/components/related-content/example-related-content-multiple-rows-of-links.njk +51 -49
- package/components/related-content/example-related-content-social-media.njk +40 -38
- package/components/relationships/_macro.njk +10 -8
- package/components/relationships/example-relationships-error.njk +176 -168
- package/components/relationships/example-relationships-you.njk +169 -163
- package/components/relationships/example-relationships.njk +167 -161
- package/components/section-navigation/_macro.njk +34 -12
- package/components/select/_macro.njk +21 -18
- package/components/share-page/_macro.njk +10 -5
- package/components/skip-to-content/_macro.njk +1 -1
- package/components/skip-to-content/example-skip-to-content.njk +1 -0
- package/components/status/_macro.njk +1 -1
- package/components/summary/_macro.njk +53 -23
- package/components/summary/example-summary-household-no-rows.njk +18 -16
- package/components/summary/example-summary-household.njk +75 -73
- package/components/summary/example-summary-hub-minimal.njk +74 -72
- package/components/summary/example-summary-hub.njk +169 -167
- package/components/table/_macro.njk +72 -45
- package/components/table-of-contents/_macro.njk +34 -32
- package/components/table-of-contents/example-table-of-contents-grouped.njk +1 -1
- package/components/table-of-contents/example-table-of-contents-single.njk +1 -1
- package/components/table-of-contents/example-table-of-contents-sticky-full-page.njk +79 -38
- package/components/table-of-contents/example-table-of-contents-sticky.njk +50 -13
- package/components/tabs/_macro.njk +12 -6
- package/components/tabs/example-tabs-details.njk +5 -6
- package/components/text-indent/_macro.njk +1 -3
- package/components/textarea/_macro.njk +49 -46
- package/components/textarea/_macro.spec.js +0 -11
- package/components/timeline/_macro.njk +4 -6
- package/components/timeout-modal/_macro.njk +21 -19
- package/components/timeout-modal/example-timeout-modal.njk +16 -14
- package/components/timeout-panel/_macro.njk +19 -17
- package/components/timeout-panel/example-panel-with-timeout-warning.njk +13 -11
- package/components/upload/_macro.njk +20 -16
- package/components/video/_macro.njk +16 -2
- package/components/video/example-video.njk +2 -2
- package/css/main.css +1 -1
- package/layout/_dsTemplate.njk +22 -20
- package/layout/_template.njk +63 -49
- package/package.json +4 -3
- package/scripts/main.es5.js +1 -1
- package/scripts/main.js +1 -1
- package/scss/overrides/hcm.scss +1 -1
- package/scss/vars/_colors.scss +1 -1
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
{% from "components/fieldset/_macro.njk" import onsFieldset %}
|
|
3
3
|
{% from "components/button/_macro.njk" import onsButton %}
|
|
4
4
|
{% from "components/label/_macro.njk" import onsLabel %}
|
|
5
|
-
|
|
6
|
-
{%
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
|
|
6
|
+
{%
|
|
7
|
+
call onsFieldset({
|
|
8
|
+
"id": params.id,
|
|
9
|
+
"classes": params.classes,
|
|
10
|
+
"legend": params.legend,
|
|
11
|
+
"legendClasses": params.legendClasses,
|
|
12
|
+
"description": params.description,
|
|
13
|
+
"dontWrap": params.dontWrap,
|
|
14
|
+
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
15
|
+
"error": params.error
|
|
16
|
+
})
|
|
17
|
+
%}
|
|
16
18
|
<div class="ons-radios__items">
|
|
17
19
|
{% for radio in params.radios %}
|
|
18
20
|
{% if params.or and loop.revindex0 == 0 %}
|
|
@@ -20,7 +22,7 @@
|
|
|
20
22
|
{% endif %}
|
|
21
23
|
<span class="ons-radios__item{{ " ons-radios__item--no-border" if params.borderless }}">
|
|
22
24
|
<span class="ons-radio{{ " ons-radio--no-border" if params.borderless }}">
|
|
23
|
-
{%
|
|
25
|
+
{% if radio.other and radio.other.selectAllChildren == true %}
|
|
24
26
|
{% set selectAllClass = ' ons-js-select-all-children' %}
|
|
25
27
|
{% else %}
|
|
26
28
|
{% set selectAllClass = '' %}
|
|
@@ -28,24 +30,32 @@
|
|
|
28
30
|
<input
|
|
29
31
|
type="radio"
|
|
30
32
|
id="{{ radio.id }}"
|
|
31
|
-
class="ons-radio__input ons-js-radio{{ ' ' + params.inputClasses if params.inputClasses else '' }}{{ ' ' + radio.classes if radio.classes else '' }}{{ ' ons-js-other' if radio.other
|
|
33
|
+
class="ons-radio__input ons-js-radio{{ ' ' + params.inputClasses if params.inputClasses else '' }}{{ ' ' + radio.classes if radio.classes else '' }}{{ ' ons-js-other' if radio.other }}{{ selectAllClass }}"
|
|
32
34
|
value="{{ radio.value }}"
|
|
33
35
|
name="{{ params.name }}"
|
|
34
|
-
{% if radio.checked or (params.value is defined and params.value == radio.value) %} checked
|
|
35
|
-
{% if radio.other and not radio.other.open %}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
{% if radio.checked or (params.value is defined and params.value == radio.value) %}{{ ' ' }}checked{% endif %}
|
|
37
|
+
{% if radio.other and not radio.other.open %}
|
|
38
|
+
{{ ' ' }}aria-controls="{{ radio.id }}-other-wrap"
|
|
39
|
+
aria-haspopup="true"
|
|
40
|
+
{% endif %}
|
|
41
|
+
{% if radio.attributes %}{% for attribute, value in (radio.attributes.items() if radio.attributes is mapping and radio.attributes.items else radio.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
|
|
42
|
+
/>
|
|
43
|
+
{{
|
|
44
|
+
onsLabel({
|
|
45
|
+
"id": radio.id + "-label",
|
|
46
|
+
"for": radio.id,
|
|
47
|
+
"inputType": "radio",
|
|
48
|
+
"text": radio.label.text,
|
|
49
|
+
"classes": "ons-radio__label" + (" " + radio.label.classes if radio.label.classes else ""),
|
|
50
|
+
"description": radio.label.description
|
|
51
|
+
})
|
|
52
|
+
}}
|
|
46
53
|
{% if radio.other %}
|
|
47
54
|
{% set otherType = radio.other.otherType | default('input') %}
|
|
48
|
-
<span
|
|
55
|
+
<span
|
|
56
|
+
class="ons-radio__other{{ ' ' + 'ons-radio__other--open' if radio.other.open else '' }}"
|
|
57
|
+
id="{{ radio.id }}-other-wrap"
|
|
58
|
+
>
|
|
49
59
|
{% if otherType == "input" %}
|
|
50
60
|
{% from "components/input/_macro.njk" import onsInput %}
|
|
51
61
|
{{
|
|
@@ -119,6 +129,7 @@
|
|
|
119
129
|
onsTextarea({
|
|
120
130
|
"id": radio.other.id,
|
|
121
131
|
"name": radio.other.name,
|
|
132
|
+
"value": radio.other.value,
|
|
122
133
|
"label": {
|
|
123
134
|
"id": radio.other.id + "-label",
|
|
124
135
|
"text": radio.other.label.text,
|
|
@@ -138,20 +149,27 @@
|
|
|
138
149
|
</span>
|
|
139
150
|
</span>
|
|
140
151
|
{% if not loop.last %}
|
|
141
|
-
<br
|
|
152
|
+
<br />
|
|
142
153
|
{% endif %}
|
|
143
154
|
{% endfor %}
|
|
144
155
|
</div>
|
|
145
156
|
{% if params.clearRadios %}
|
|
146
|
-
{{
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
157
|
+
{{
|
|
158
|
+
onsButton({
|
|
159
|
+
"text": params.clearRadios.text,
|
|
160
|
+
"name": params.clearRadios.name,
|
|
161
|
+
"type": "submit",
|
|
162
|
+
"classes": "ons-js-clear-btn ons-u-mt-s ons-u-db-no-js_enabled",
|
|
163
|
+
"variants": ["secondary", "small"]
|
|
164
|
+
})
|
|
165
|
+
}}
|
|
166
|
+
<span
|
|
167
|
+
class="ons-js-clear-radio-alert ons-u-vh"
|
|
168
|
+
role="alert"
|
|
169
|
+
aria-live="polite"
|
|
170
|
+
data-clear="{{ params.clearRadios.ariaClearText }}"
|
|
171
|
+
data-cleared="{{ params.clearRadios.ariaClearedText }}"
|
|
172
|
+
></span>
|
|
154
173
|
{% endif %}
|
|
155
174
|
{% endcall %}
|
|
156
|
-
|
|
157
175
|
{% endmacro %}
|
|
@@ -122,6 +122,16 @@ const EXAMPLE_RADIO_ITEM_RADIOS = {
|
|
|
122
122
|
},
|
|
123
123
|
};
|
|
124
124
|
|
|
125
|
+
const EXAMPLE_RADIO_ITEM_TEXTAREA_WITH_PRESET_VALUE = {
|
|
126
|
+
other: {
|
|
127
|
+
otherType: 'textarea',
|
|
128
|
+
checked: true,
|
|
129
|
+
id: 'other-textarea-input',
|
|
130
|
+
name: 'other-answer',
|
|
131
|
+
value: 'other answer',
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
|
|
125
135
|
describe('macro: radios', () => {
|
|
126
136
|
it.each([
|
|
127
137
|
['plain', EXAMPLE_RADIO_ITEM],
|
|
@@ -537,6 +547,17 @@ describe('macro: radios', () => {
|
|
|
537
547
|
radios: EXAMPLE_RADIO_ITEM_RADIOS.other.radios,
|
|
538
548
|
});
|
|
539
549
|
});
|
|
550
|
+
|
|
551
|
+
it('renders "textarea" component with a preset value for item', () => {
|
|
552
|
+
const $ = cheerio.load(
|
|
553
|
+
renderComponent('radios', {
|
|
554
|
+
...EXAMPLE_RADIOS_MINIMAL,
|
|
555
|
+
radios: [EXAMPLE_RADIO_ITEM_TEXTAREA_WITH_PRESET_VALUE],
|
|
556
|
+
}),
|
|
557
|
+
);
|
|
558
|
+
|
|
559
|
+
expect($('.ons-input--textarea').text()).toBe('other answer');
|
|
560
|
+
});
|
|
540
561
|
});
|
|
541
562
|
|
|
542
563
|
describe('clear radios button', () => {
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
4
4
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
5
5
|
|
|
6
|
-
{%
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
{%
|
|
7
|
+
call onsQuestion({
|
|
8
|
+
"title": "What is your religion?",
|
|
9
|
+
"legendIsQuestionTitle": true
|
|
10
|
+
})
|
|
11
|
+
%}
|
|
10
12
|
{{
|
|
11
13
|
onsPanel({
|
|
12
14
|
"body": '<p>This question is <strong>voluntary</strong></p>',
|
|
@@ -3,10 +3,12 @@
|
|
|
3
3
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
4
4
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
5
5
|
|
|
6
|
-
{%
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
{%
|
|
7
|
+
call onsQuestion({
|
|
8
|
+
"title": "What is your religion?",
|
|
9
|
+
"legendIsQuestionTitle": true
|
|
10
|
+
})
|
|
11
|
+
%}
|
|
10
12
|
{{
|
|
11
13
|
onsPanel({
|
|
12
14
|
"body": '<p>This question is <strong>voluntary</strong></p>',
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "What is your ethnic group or background?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
2
2
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How would you like us to contact you?",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
})
|
|
9
|
+
%}
|
|
8
10
|
{{
|
|
9
11
|
onsRadios({
|
|
10
12
|
"dontWrap": true,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
2
2
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How would you like us to contact you?",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
})
|
|
9
|
+
%}
|
|
8
10
|
{{
|
|
9
11
|
onsRadios({
|
|
10
12
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How do you usually travel to work?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How do you usually travel to work?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How do you usually travel to work?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How do you usually travel to work?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
2
2
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "How satisfied are you with this service?",
|
|
7
|
+
"legendIsQuestionTitle": true
|
|
8
|
+
})
|
|
9
|
+
%}
|
|
8
10
|
{{
|
|
9
11
|
onsRadios({
|
|
10
12
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "Is the gender you identify with the same as your sex registered at birth?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"dontWrap": true,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
2
2
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
3
3
|
|
|
4
|
-
{%
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
{%
|
|
5
|
+
call onsQuestion({
|
|
6
|
+
"title": "What type of accommodation do you live in?",
|
|
7
|
+
"classes": "ons-u-mt-no",
|
|
8
|
+
"legendIsQuestionTitle": true
|
|
9
|
+
})
|
|
10
|
+
%}
|
|
9
11
|
{{
|
|
10
12
|
onsRadios({
|
|
11
13
|
"name": "property-type",
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{% macro onsRelatedContent(params) %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
{
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<aside class="ons-related-content{{ classes }}" aria-label="{{ params.ariaLabel | default("Related content") }}">
|
|
2
|
+
<aside
|
|
3
|
+
class="ons-related-content{{ ' ' + params.classes if params.classes else '' }}"
|
|
4
|
+
aria-label="{{ params.ariaLabel | default('Related content') }}"
|
|
5
|
+
>
|
|
8
6
|
{% if params.rows %}
|
|
9
7
|
{% from "components/related-content/_section-macro.njk" import onsRelatedContentSection %}
|
|
10
8
|
{% from "components/list/_macro.njk" import onsList %}
|
|
11
9
|
{% for row in params.rows %}
|
|
12
|
-
{%
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
{%
|
|
11
|
+
call onsRelatedContentSection({
|
|
12
|
+
"title": row.title,
|
|
13
|
+
"id": row.id
|
|
14
|
+
})
|
|
15
|
+
%}
|
|
16
16
|
<nav class="ons-related-content__navigation" aria-labelledby="{{ row.id }}">
|
|
17
17
|
{{
|
|
18
18
|
onsList({
|
|
@@ -30,5 +30,4 @@
|
|
|
30
30
|
{{ caller() if caller }}
|
|
31
31
|
{% endif %}
|
|
32
32
|
</aside>
|
|
33
|
-
|
|
34
33
|
{% endmacro %}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{% macro onsRelatedContentSection(params) %}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
<div class="ons-related-content__section">
|
|
3
|
+
{% if params.title %}
|
|
4
|
+
<h2 class="ons-related-content__title ons-u-fs-r--b ons-u-mb-xs" {% if params.id %}id="{{ params.id }}"{% endif %}>
|
|
5
|
+
{{ params.title }}
|
|
6
|
+
</h2>
|
|
7
|
+
{% endif %}
|
|
8
|
+
<div class="ons-related-content__content">{{ caller() if caller }}</div>
|
|
8
9
|
</div>
|
|
9
|
-
</div>
|
|
10
10
|
{% endmacro %}
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
{% from "components/related-content/_section-macro.njk" import onsRelatedContentSection %}
|
|
3
3
|
{% from "components/list/_macro.njk" import onsList %}
|
|
4
4
|
|
|
5
|
-
{%
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
{%
|
|
6
|
+
call onsRelatedContent({
|
|
7
|
+
"ariaLabel": 'Related content'
|
|
8
|
+
})
|
|
9
|
+
%}
|
|
8
10
|
{% call onsRelatedContentSection() %}
|
|
9
11
|
<p class="ons-u-mb-xs">Telephone: 0800 587 2021</p>
|
|
10
12
|
|
|
@@ -1,51 +1,53 @@
|
|
|
1
1
|
{% from "components/related-content/_macro.njk" import onsRelatedContent %}
|
|
2
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
3
|
+
{{
|
|
4
|
+
onsRelatedContent({
|
|
5
|
+
"ariaLabel": 'Related content',
|
|
6
|
+
"rows": [
|
|
7
|
+
{
|
|
8
|
+
"id": 'related-help-with-the-census',
|
|
9
|
+
"title": 'Help with the census',
|
|
10
|
+
"itemsList": [
|
|
11
|
+
{
|
|
12
|
+
"text": 'I’m moving house',
|
|
13
|
+
"url": '#0'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"text": 'What if I’m away or abroad on Census Day?',
|
|
17
|
+
"url": '#0'
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"text": 'Get an access code or paper census',
|
|
21
|
+
"url": '#0'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"text": 'Find a census support centre',
|
|
25
|
+
"url": '#0'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"text": 'Languages',
|
|
29
|
+
"url": '#0'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"text": 'Accessibility',
|
|
33
|
+
"url": '#0'
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": 'related-content',
|
|
39
|
+
"title": 'Related content',
|
|
40
|
+
"itemsList": [
|
|
41
|
+
{
|
|
42
|
+
"text": 'How we will contact or visit you',
|
|
43
|
+
"url": '#0'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"text": 'Media enquiries',
|
|
47
|
+
"url": '#0'
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
})
|
|
53
|
+
}}
|