-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new equalities information pattern
- Loading branch information
Vanita Barrett
committed
Mar 25, 2021
1 parent
0692a58
commit 88ddae6
Showing
17 changed files
with
1,105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
title: Asian ethnicity equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
{% from "govuk/components/input/macro.njk" import govukInput %} | ||
|
||
{% set ethnicityHtml %} | ||
{{ govukInput({ | ||
id: "other-description", | ||
name: "other-description", | ||
type: "text", | ||
classes: "govuk-!-width-one-half", | ||
label: { | ||
text: "How would you describe your background? (optional)" | ||
} | ||
}) }} | ||
{% endset -%} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "ethnicity-detail", | ||
name: "ethnicity-detail", | ||
fieldset: { | ||
legend: { | ||
text: "Which of the following best describes your Asian or Asian British background?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
items: [ | ||
{ | ||
value: "indian", | ||
text: "Indian" | ||
}, | ||
{ | ||
value: "pakistani", | ||
text: "Pakistani" | ||
}, | ||
{ | ||
value: "bangladeshi", | ||
text: "Bangladeshi" | ||
}, | ||
{ | ||
value: "chinese", | ||
text: "Chinese" | ||
}, | ||
{ | ||
value: "other", | ||
text: "Any other Asian background", | ||
conditional: { | ||
html: ethnicityHtml | ||
} | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Black ethnicity equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
{% from "govuk/components/input/macro.njk" import govukInput %} | ||
|
||
{% set ethnicityHtml %} | ||
{{ govukInput({ | ||
id: "other-description", | ||
name: "other-description", | ||
type: "text", | ||
classes: "govuk-!-width-one-half", | ||
label: { | ||
text: "How would you describe your background? (optional)" | ||
} | ||
}) }} | ||
{% endset -%} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "ethnicity-detail", | ||
name: "ethnicity-detail", | ||
fieldset: { | ||
legend: { | ||
text: "Which of the following best describes your Black, African, Caribbean or Black British background?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
items: [ | ||
{ | ||
value: "african", | ||
text: "African" | ||
}, | ||
{ | ||
value: "caribbean", | ||
text: "Caribbean" | ||
}, | ||
{ | ||
value: "other", | ||
text: "Any other Black, African or Caribbean background", | ||
conditional: { | ||
html: ethnicityHtml | ||
} | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
title: Date of birth equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/date-input/macro.njk" import govukDateInput %} | ||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
|
||
{{ govukDateInput({ | ||
id: "date-of-birth", | ||
namePrefix: "date-of-birth", | ||
fieldset: { | ||
legend: { | ||
text: "What is your date of birth?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
hint: { | ||
text: "For example, 31 3 1980" | ||
} | ||
}) }} | ||
|
||
<p class="govuk-body">If you prefer not to say, continue without entering any information.</p> | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
47 changes: 47 additions & 0 deletions
47
src/patterns/equality-information/disability-impact/index.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: Disability impact equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "disability", | ||
name: "disability", | ||
fieldset: { | ||
legend: { | ||
text: "Do any of your conditions or illnesses reduce your ability to carry out day to day activities?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
hint: { | ||
text: "For example eating, washing, walking or going shopping." | ||
}, | ||
items: [ | ||
{ | ||
value: "little", | ||
text: "Yes, a little" | ||
}, | ||
{ | ||
value: "lot", | ||
text: "Yes, a lot" | ||
}, | ||
{ | ||
value: "No", | ||
text: "Not at all" | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: Disability equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "disability", | ||
name: "disability", | ||
fieldset: { | ||
legend: { | ||
text: "Do you have any physical or mental health conditions or illness lasting or expected to last 12 months or more?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
items: [ | ||
{ | ||
value: "yes", | ||
text: "Yes" | ||
}, | ||
{ | ||
value: "no", | ||
text: "No" | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
31 changes: 31 additions & 0 deletions
31
src/patterns/equality-information/error-date-of-birth/index.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
title: Date of birth equality question with error | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/date-input/macro.njk" import govukDateInput %} | ||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
|
||
{{ govukDateInput({ | ||
id: "date-of-birth", | ||
namePrefix: "date-of-birth", | ||
fieldset: { | ||
legend: { | ||
text: "What is your date of birth?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
errorMessage: { | ||
text: "Enter a real date of birth, or leave it blank" | ||
}, | ||
hint: { | ||
text: "For example, 31 3 1980" | ||
} | ||
}) }} | ||
|
||
<p class="govuk-body">If you prefer not to say, continue without entering any information.</p> | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
55 changes: 55 additions & 0 deletions
55
src/patterns/equality-information/error-ethnicity/index.njk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
title: Ethnicity question with error | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "ethnicity", | ||
name: "ethnicity", | ||
fieldset: { | ||
legend: { | ||
text: "What is your ethnic group?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
errorMessage: { | ||
text: "Select an ethnic group or ‘Prefer not to say’" | ||
}, | ||
items: [ | ||
{ | ||
value: "white", | ||
text: "White" | ||
}, | ||
{ | ||
value: "multiple", | ||
text: "Mixed or multiple ethnic groups" | ||
}, | ||
{ | ||
value: "asian", | ||
text: "Asian or Asian British" | ||
}, | ||
{ | ||
value: "black", | ||
text: "Black, African, Carribean or Black British" | ||
}, | ||
{ | ||
value: "other", | ||
text: "Other ethnic group" | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
title: Ethnic group equality question | ||
layout: layout-example.njk | ||
--- | ||
|
||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
{% from "govuk/components/radios/macro.njk" import govukRadios %} | ||
|
||
{{ govukRadios({ | ||
idPrefix: "ethnicity", | ||
name: "ethnicity", | ||
fieldset: { | ||
legend: { | ||
text: "What is your ethnic group?", | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
items: [ | ||
{ | ||
value: "white", | ||
text: "White" | ||
}, | ||
{ | ||
value: "multiple", | ||
text: "Mixed or multiple ethnic groups" | ||
}, | ||
{ | ||
value: "asian", | ||
text: "Asian or Asian British" | ||
}, | ||
{ | ||
value: "black", | ||
text: "Black, African, Carribean or Black British" | ||
}, | ||
{ | ||
value: "other", | ||
text: "Other ethnic group" | ||
}, | ||
{ | ||
divider: "or" | ||
}, | ||
{ | ||
value: "skip", | ||
text: "Prefer not to say" | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: "Continue" | ||
}) }} |
Oops, something went wrong.