@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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
2
|
+
'fullWidth': true
|
|
3
3
|
---
|
|
4
|
+
|
|
4
5
|
{% from "components/phase-banner/_macro.njk" import onsPhaseBanner %}
|
|
5
6
|
{% from "components/external-link/_macro.njk" import onsExternalLink %}
|
|
6
7
|
|
|
@@ -15,6 +16,6 @@
|
|
|
15
16
|
|
|
16
17
|
{{
|
|
17
18
|
onsPhaseBanner({
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
"html": "This is a new service. To help us improve it, " + feedbackLink
|
|
20
|
+
})
|
|
20
21
|
}}
|
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
{% macro onsQuestion(params) %}
|
|
2
2
|
|
|
3
|
-
{%- set titleHtml -%}
|
|
4
|
-
|
|
3
|
+
{%- set titleHtml -%}
|
|
4
|
+
{%- if params.readDescriptionFirst == true and params.description -%}
|
|
5
|
+
<div class="ons-question__description ons-u-vh">{{- params.description | safe -}}</div>
|
|
6
|
+
{{- ' ' -}}
|
|
7
|
+
{%- endif -%}{{- params.title | safe -}}
|
|
5
8
|
{%- endset -%}
|
|
6
9
|
|
|
7
|
-
{%- set descHtml -%}
|
|
8
|
-
|
|
10
|
+
{%- set descHtml -%}
|
|
11
|
+
{%- if params.readDescriptionFirst == true -%}
|
|
12
|
+
<div
|
|
13
|
+
aria-hidden="true"
|
|
14
|
+
{% if params.legendIsQuestionTitle is not defined %}class="ons-question__description ons-question__description--aria-hidden"{% endif %}
|
|
15
|
+
>
|
|
16
|
+
{{- params.description | safe -}}
|
|
17
|
+
</div>
|
|
9
18
|
{% elif params.legendIsQuestionTitle is not defined %}
|
|
10
19
|
<div class="ons-question__description ons-u-mb-m">{{- params.description | safe -}}</div>
|
|
11
20
|
{% else %}
|
|
12
21
|
{{- params.description | safe -}}
|
|
13
|
-
{
|
|
22
|
+
{%- endif -%}
|
|
23
|
+
{%- endset -%}
|
|
14
24
|
|
|
15
25
|
{% set instHtml %}
|
|
16
26
|
<div class="ons-question__instruction ons-u-mb-m">{{ params.instruction | safe }}</div>
|
|
@@ -19,13 +29,15 @@
|
|
|
19
29
|
{% if params.definition %}
|
|
20
30
|
{% set questionDefinition %}
|
|
21
31
|
{% from "components/details/_macro.njk" import onsDetails %}
|
|
22
|
-
{%
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
32
|
+
{%
|
|
33
|
+
call onsDetails({
|
|
34
|
+
"id": params.definition.id,
|
|
35
|
+
"classes": 'ons-u-mb-m',
|
|
36
|
+
"title": params.definition.title,
|
|
37
|
+
"headingAttributes": params.definition.headingAttributes,
|
|
38
|
+
"contentAttributes": params.definition.contentAttributes
|
|
39
|
+
})
|
|
40
|
+
%}
|
|
29
41
|
{% if params.definition.content %}
|
|
30
42
|
{{ params.definition.content | safe }}
|
|
31
43
|
{% endif %}
|
|
@@ -36,11 +48,13 @@
|
|
|
36
48
|
{% if params.guidance %}
|
|
37
49
|
{% set questionGuidance %}
|
|
38
50
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
39
|
-
{%
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
51
|
+
{%
|
|
52
|
+
call onsPanel({
|
|
53
|
+
"id": params.guidance.id,
|
|
54
|
+
"classes": "ons-question-guidance ons-u-mb-m",
|
|
55
|
+
"attributes": params.guidance.attributes
|
|
56
|
+
})
|
|
57
|
+
%}
|
|
44
58
|
{% if params.guidance.content %}
|
|
45
59
|
{{ params.guidance.content | safe }}
|
|
46
60
|
{% endif %}
|
|
@@ -58,24 +72,26 @@
|
|
|
58
72
|
"itemsList": item.itemsList
|
|
59
73
|
})
|
|
60
74
|
}}
|
|
61
|
-
{
|
|
62
|
-
{
|
|
75
|
+
{%- endfor -%}
|
|
76
|
+
{%- endif -%}
|
|
63
77
|
{% endcall %}
|
|
64
78
|
{% endset %}
|
|
65
79
|
{% endif %}
|
|
66
80
|
|
|
67
81
|
<div
|
|
68
|
-
{% if params.id %}
|
|
69
|
-
class="ons-question ons-u-mb-l{
|
|
70
|
-
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ attribute }}{% if value %}="{{ value }}"{% endif %}
|
|
82
|
+
{% if params.id %}id="{{ params.id }}"{% endif %}
|
|
83
|
+
class="ons-question ons-u-mb-l{{ ' ' + params.classes if params.classes else '' }}"
|
|
84
|
+
{% if params.attributes %}{% for attribute, value in (params.attributes.items() if params.attributes is mapping and params.attributes.items else params.attributes) %}{{ ' ' }}{{ attribute }}{% if value %}="{{ value }}"{% endif %}{% endfor %}{% endif %}
|
|
71
85
|
>
|
|
72
86
|
{% set additionalContent %}
|
|
73
87
|
{% if params.warning %}
|
|
74
88
|
{% from "components/panel/_macro.njk" import onsPanel %}
|
|
75
|
-
{%
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
{%
|
|
90
|
+
call onsPanel({
|
|
91
|
+
"id": params.warning.id,
|
|
92
|
+
"variant": "warn"
|
|
93
|
+
})
|
|
94
|
+
%}
|
|
79
95
|
<p>{{ params.warning.body }}</p>
|
|
80
96
|
{% endcall %}
|
|
81
97
|
{% endif %}
|
|
@@ -99,22 +115,21 @@
|
|
|
99
115
|
{# Resolves caller issue in Jinja: https://github.com/pallets/jinja/issues/371 #}
|
|
100
116
|
{% set content = caller() if caller %}
|
|
101
117
|
<div class="ons-question__answer ons-u-mb-m">
|
|
102
|
-
{%
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
118
|
+
{%
|
|
119
|
+
call onsFieldset({
|
|
120
|
+
"legendIsQuestionTitle": params.legendIsQuestionTitle,
|
|
121
|
+
"legend": titleHtml,
|
|
122
|
+
"description": descHtml if params.description,
|
|
123
|
+
"legendClasses": params.legendClasses,
|
|
124
|
+
"legendTitleClasses": params.legendTitleClasses
|
|
125
|
+
})
|
|
126
|
+
%}
|
|
109
127
|
{{- additionalContent | safe -}}
|
|
110
128
|
{{ content }}
|
|
111
129
|
{% endcall %}
|
|
112
130
|
</div>
|
|
113
|
-
|
|
114
131
|
{% else %}
|
|
115
|
-
<h1 id="question-title" class="ons-question__title">
|
|
116
|
-
{{- titleHtml | safe -}}
|
|
117
|
-
</h1>
|
|
132
|
+
<h1 id="question-title" class="ons-question__title">{{- titleHtml | safe -}}</h1>
|
|
118
133
|
|
|
119
134
|
{% if params.description %}
|
|
120
135
|
{{- descHtml | safe -}}
|
|
@@ -122,20 +137,20 @@
|
|
|
122
137
|
|
|
123
138
|
{{- additionalContent | safe -}}
|
|
124
139
|
|
|
125
|
-
<div class="ons-question__answer ons-u-mb-m">
|
|
126
|
-
{{ caller() if caller }}
|
|
127
|
-
</div>
|
|
140
|
+
<div class="ons-question__answer ons-u-mb-m">{{ caller() if caller }}</div>
|
|
128
141
|
{% endif %}
|
|
129
142
|
|
|
130
143
|
{% if params.justification %}
|
|
131
144
|
{% from "components/details/_macro.njk" import onsDetails %}
|
|
132
|
-
{%
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
145
|
+
{%
|
|
146
|
+
call onsDetails({
|
|
147
|
+
"id": params.justification.id,
|
|
148
|
+
"classes": 'ons-u-mb-m',
|
|
149
|
+
"title": params.justification.title | default('Why we ask this question'),
|
|
150
|
+
"headingAttributes": params.justification.headingAttributes,
|
|
151
|
+
"contentAttributes": params.justification.contentAttributes
|
|
152
|
+
})
|
|
153
|
+
%}
|
|
139
154
|
{{ params.justification.content | safe }}
|
|
140
155
|
{% endcall %}
|
|
141
156
|
{% endif %}
|
|
@@ -1,47 +1,52 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Question with an interviewer instruction'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
{% extends "layout/_template.njk" %}
|
|
6
7
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
7
8
|
{% from "components/input/_macro.njk" import onsInput %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
{%
|
|
10
|
+
set pageConfig = {
|
|
11
|
+
"header": {
|
|
12
|
+
"title": "Interviewer led question example"
|
|
13
|
+
},
|
|
14
|
+
"breadcrumbs": {
|
|
15
|
+
"ariaLabel": 'Breadcrumbs',
|
|
16
|
+
"itemsList": [
|
|
17
|
+
{
|
|
18
|
+
"url": '#0',
|
|
19
|
+
"text": 'Previous'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
%}
|
|
23
25
|
|
|
24
26
|
{% block main %}
|
|
25
|
-
{%
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"id": "number-of-visitors",
|
|
38
|
-
"name": "number-of-visitors",
|
|
39
|
-
"type": "number",
|
|
40
|
-
"width": "2",
|
|
41
|
-
"label": {
|
|
42
|
-
"text": "Number of visitors"
|
|
43
|
-
}
|
|
44
|
-
}) }}
|
|
27
|
+
{%
|
|
28
|
+
call onsQuestion({
|
|
29
|
+
"title": "How many visitors do you have staying overnight at 3 Severn Road on Sunday 21 March 2021?",
|
|
30
|
+
"description": "<p>A visitor is anyone aged <strong>16 years or over</strong> who usually lives at another address. Enter “0” if there are no visitors staying overnight.</p>",
|
|
31
|
+
"instruction": "<p>Tell respondent to turn to <strong>Showcard 2</strong> or show them the following Electronic Showcard</p>",
|
|
32
|
+
"definition": {
|
|
33
|
+
"title": "Electronic Showcard",
|
|
34
|
+
"content": "<p>Visitor information is collected to ensure that everyone is counted, in order to produce accurate estimates of the population, to facilitate effective planning and funding decisions</p>"
|
|
35
|
+
},
|
|
36
|
+
"submitButton": true
|
|
37
|
+
})
|
|
38
|
+
%}
|
|
45
39
|
|
|
40
|
+
{{
|
|
41
|
+
onsInput({
|
|
42
|
+
"id": "number-of-visitors",
|
|
43
|
+
"name": "number-of-visitors",
|
|
44
|
+
"type": "number",
|
|
45
|
+
"width": "2",
|
|
46
|
+
"label": {
|
|
47
|
+
"text": "Number of visitors"
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
}}
|
|
46
51
|
{% endcall %}
|
|
47
52
|
{% endblock %}
|
|
@@ -1,96 +1,100 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Question as a fieldset'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
{% extends "layout/_template.njk" %}
|
|
6
7
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
7
8
|
{% from "components/radios/_macro.njk" import onsRadios %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
"breadcrumbs": {
|
|
14
|
-
"ariaLabel": 'Breadcrumbs',
|
|
15
|
-
"itemsList": [
|
|
16
|
-
{
|
|
17
|
-
"url": '#0',
|
|
18
|
-
"text": 'Previous'
|
|
19
|
-
}
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
} %}
|
|
23
|
-
|
|
24
|
-
{% set questionTitle = "On 1 May 2016, what was the number of employees for Bolt and Ratchet?" %}
|
|
25
|
-
|
|
26
|
-
{% block main %}
|
|
27
|
-
{% call onsQuestion({
|
|
28
|
-
"title": questionTitle,
|
|
29
|
-
"description": "<p>This is all employees aged 16 years or over that your organisation employs</p>",
|
|
30
|
-
"definition": {
|
|
31
|
-
"title": "What we mean by “employee”",
|
|
32
|
-
"content": "<p>An employee is a person that your organisation directly pays from its payroll(s), in return for carrying out a full-time or part-time job</p>"
|
|
9
|
+
{%
|
|
10
|
+
set pageConfig = {
|
|
11
|
+
"header": {
|
|
12
|
+
"title": "Question example"
|
|
33
13
|
},
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"listHeading": "Include:",
|
|
38
|
-
"itemsList": [
|
|
39
|
-
{
|
|
40
|
-
"text": "all employees in Great Britain (England, Scotland and Wales), both full and part-time, who received pay in the relevant period"
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
14
|
+
"breadcrumbs": {
|
|
15
|
+
"ariaLabel": 'Breadcrumbs',
|
|
16
|
+
"itemsList": [
|
|
44
17
|
{
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
{
|
|
48
|
-
"text": "trainees on government schemes"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"text": "employees working abroad unless paid directly from this business’s GB payroll"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
18
|
+
"url": '#0',
|
|
19
|
+
"text": 'Previous'
|
|
54
20
|
}
|
|
55
21
|
]
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
"submitButton": true
|
|
62
|
-
}) %}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
%}
|
|
25
|
+
{% set questionTitle = "On 1 May 2016, what was the number of employees for Bolt and Ratchet?" %}
|
|
63
26
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
27
|
+
{% block main %}
|
|
28
|
+
{%
|
|
29
|
+
call onsQuestion({
|
|
30
|
+
"title": questionTitle,
|
|
31
|
+
"description": "<p>This is all employees aged 16 years or over that your organisation employs</p>",
|
|
32
|
+
"definition": {
|
|
33
|
+
"title": "What we mean by “employee”",
|
|
34
|
+
"content": "<p>An employee is a person that your organisation directly pays from its payroll(s), in return for carrying out a full-time or part-time job</p>"
|
|
35
|
+
},
|
|
36
|
+
"guidance": {
|
|
37
|
+
"lists": [
|
|
38
|
+
{
|
|
39
|
+
"listHeading": "Include:",
|
|
40
|
+
"itemsList": [
|
|
41
|
+
{
|
|
42
|
+
"text": "all employees in Great Britain (England, Scotland and Wales), both full and part-time, who received pay in the relevant period"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
74
45
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
46
|
+
{
|
|
47
|
+
"listHeading": "Exclude:",
|
|
48
|
+
"itemsList": [
|
|
49
|
+
{
|
|
50
|
+
"text": "trainees on government schemes"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"text": "employees working abroad unless paid directly from this business’s GB payroll"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"justification": {
|
|
60
|
+
"title": "Why we ask this question",
|
|
61
|
+
"content": "<p>We ask this question in order to understand the size of organisations in the UK</p>"
|
|
62
|
+
},
|
|
63
|
+
"submitButton": true
|
|
64
|
+
})
|
|
65
|
+
%}
|
|
66
|
+
|
|
67
|
+
{{
|
|
68
|
+
onsRadios({
|
|
69
|
+
"id": "number-of-employees",
|
|
70
|
+
"name": "number-of-employees",
|
|
71
|
+
"legend": questionTitle,
|
|
72
|
+
"legendClasses": "ons-u-vh",
|
|
73
|
+
"radios": [
|
|
74
|
+
{
|
|
75
|
+
"id": "number-of-employees-1-9",
|
|
76
|
+
"label": {
|
|
77
|
+
"text": "1 – 9 employees"
|
|
78
|
+
},
|
|
79
|
+
"value": "1-9"
|
|
81
80
|
},
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"
|
|
88
|
-
"description": "Include multi-corporations"
|
|
81
|
+
{
|
|
82
|
+
"id": "number-of-employees-10-49",
|
|
83
|
+
"label": {
|
|
84
|
+
"text": "10 – 49 employees"
|
|
85
|
+
},
|
|
86
|
+
"value": "10-49"
|
|
89
87
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
88
|
+
{
|
|
89
|
+
"id": "number-of-employees-50-100",
|
|
90
|
+
"label": {
|
|
91
|
+
"text": "50 – 100+ employees",
|
|
92
|
+
"description": "Include multi-corporations"
|
|
93
|
+
},
|
|
94
|
+
"value": "50-100"
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
})
|
|
98
|
+
}}
|
|
95
99
|
{% endcall %}
|
|
96
100
|
{% endblock %}
|
|
@@ -1,35 +1,38 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Interstitial page with interviewer note'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
-
{# TO DO: To be used in a new 'Interstitial' page pattern #}
|
|
6
5
|
|
|
6
|
+
{# TO DO: To be used in a new 'Interstitial' page pattern #}
|
|
7
7
|
{% extends "layout/_template.njk" %}
|
|
8
8
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
{%
|
|
10
|
+
set pageConfig = {
|
|
11
|
+
"header": {
|
|
12
|
+
"title": "Interviewer led interstitial"
|
|
13
|
+
},
|
|
14
|
+
"breadcrumbs": {
|
|
15
|
+
"ariaLabel": 'Breadcrumbs',
|
|
16
|
+
"itemsList": [
|
|
17
|
+
{
|
|
18
|
+
"url": '#0',
|
|
19
|
+
"text": 'Previous'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
%}
|
|
24
25
|
|
|
25
26
|
{% block main %}
|
|
26
|
-
{%
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
"
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
{%
|
|
28
|
+
call onsQuestion({
|
|
29
|
+
"title": "<mark>Interviewer note:</mark>Who to interview",
|
|
30
|
+
"instruction": "<p>Only interview a person who was usually living at the property on <strong>Sunday 21 March 2021</strong>.</p><p>If none of those house members are available, you must save and sign out and return to the address to interview one of them at a later date.</p>",
|
|
31
|
+
"submitButton": {
|
|
32
|
+
"variants": "timer",
|
|
33
|
+
"text": "Continue"
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
%}
|
|
34
37
|
{% endcall %}
|
|
35
38
|
{% endblock %}
|
|
@@ -1,44 +1,50 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: 'Example: Question without a fieldset'
|
|
3
3
|
layout: ~
|
|
4
4
|
---
|
|
5
|
+
|
|
5
6
|
{% extends "layout/_template.njk" %}
|
|
6
7
|
{% from "components/question/_macro.njk" import onsQuestion %}
|
|
7
8
|
{% from "components/input/_macro.njk" import onsInput %}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
{%
|
|
10
|
+
set pageConfig = {
|
|
11
|
+
"header": {
|
|
12
|
+
"title": "Question example"
|
|
13
|
+
},
|
|
14
|
+
"breadcrumbs": {
|
|
15
|
+
"ariaLabel": 'Breadcrumbs',
|
|
16
|
+
"itemsList": [
|
|
17
|
+
{
|
|
18
|
+
"url": '#0',
|
|
19
|
+
"text": 'Previous'
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
21
23
|
}
|
|
22
|
-
|
|
24
|
+
%}
|
|
23
25
|
|
|
24
26
|
{% block main %}
|
|
25
|
-
{%
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
{%
|
|
28
|
+
call onsQuestion({
|
|
29
|
+
"title": "How many visitors are staying overnight at 3 Severn Road on 13 May 2019?",
|
|
30
|
+
"description": "<p>Enter “0” if there are no visitors staying overnight</p>",
|
|
31
|
+
"justification": {
|
|
32
|
+
"title": "Why we ask this question",
|
|
33
|
+
"content": "<p>Visitor information is collected to ensure that everyone is counted, in order to produce accurate estimates of the population, to facilitate effective planning and funding decisions.</p>"
|
|
34
|
+
},
|
|
35
|
+
"submitButton": true
|
|
36
|
+
})
|
|
37
|
+
%}
|
|
38
|
+
{{
|
|
39
|
+
onsInput({
|
|
40
|
+
"id": "number-of-visitors",
|
|
41
|
+
"name": "number-of-visitors",
|
|
42
|
+
"type": "number",
|
|
43
|
+
"width": "2",
|
|
44
|
+
"label": {
|
|
45
|
+
"text": "Number of visitors"
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
}}
|
|
43
49
|
{% endcall %}
|
|
44
50
|
{% endblock %}
|
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
"iconType": 'quote'
|
|
7
7
|
})
|
|
8
8
|
-}}
|
|
9
|
-
<span class="ons-quote__text ons-u-fs-{{ params.textFontSize if params.textFontSize else 'l' }}"
|
|
9
|
+
<span class="ons-quote__text ons-u-fs-{{ params.textFontSize if params.textFontSize else 'l' }}"
|
|
10
|
+
>{{ caller() if caller else params.text | safe }}</span
|
|
11
|
+
>
|
|
10
12
|
{% if params.ref %}<span class="ons-quote__ref">— {{ params.ref | safe }}</span>{% endif %}
|
|
11
13
|
</blockquote>
|
|
12
14
|
{% endmacro %}
|