Skip to content

Commit

Permalink
Merge pull request #1258 from colinrotherham/old-macro-params-etc
Browse files Browse the repository at this point in the history
Removed macro params unused since v0.0.29-alpha
  • Loading branch information
aliuk2012 authored Apr 5, 2019
2 parents 5dc0c1c + 24d80f8 commit 86533e9
Show file tree
Hide file tree
Showing 11 changed files with 225 additions and 186 deletions.
63 changes: 43 additions & 20 deletions app/views/examples/error-messages/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@

{{ govukInput({
label: {
text: "National Insurance Number",
hintText: "It’s on your National Insurance card, benefit letter,
payslip or P60. For example, ‘QQ 12 34 56 C’."
text: "National Insurance Number"
},
hint: {
text: 'It’s on your National Insurance card, benefit letter,
payslip or P60. For example, ‘QQ 12 34 56 C’.'
},
id: "input-1",
name: "test-name",
errorMessage: {
text: "National Insurance Number"
text: "Enter your National Insurance Number"
}
}) }}

Expand Down Expand Up @@ -103,7 +105,9 @@

{{ govukRadios({
fieldset: {
legendHtml: "<h3 class=\"govuk-heading-m\">How do you want to be contacted?</h3>"
legend: {
text: "How do you want to be contacted?"
}
},
errorMessage: {
text: "Please select an option"
Expand All @@ -130,7 +134,9 @@

{{ govukCheckboxes({
fieldset: {
legendHtml: "<h3 class=\"govuk-heading-m\">What type of waste do you want to dispose of?</h3>"
legend: {
text: "What type of waste do you want to dispose of?"
}
},
errorMessage: {
text: "Please select an option"
Expand All @@ -157,23 +163,30 @@

{{- govukDateInput({
fieldset: {
legendText: 'What is your date of birth?',
legendHintText: 'For example, 31 3 1980'
legend: {
text: "What is your date of birth?"
}
},
hint: {
text: 'For example, 31 3 1980'
},
errorMessage: {
text: 'Error message goes here'
text: 'Date of birth must be in the past'
},
id: 'dob',
name: 'dob',
items:[
{
name: 'day'
name: 'day',
classes: 'govuk-input--width-2 govuk-input--error'
},
{
name: 'month'
name: 'month',
classes: 'govuk-input--width-2 govuk-input--error'
},
{
name: 'year'
name: 'year',
classes: 'govuk-input--width-4 govuk-input--error'
}
]
})
Expand All @@ -183,24 +196,32 @@

{{- govukDateInput({
fieldset: {
legendText: 'What is your date of birth?',
legendHintText: 'For example, 31 3 1980'
legend: {
text: "What is your date of birth?"
}
},
hint: {
text: 'For example, 31 3 1980'
},
errorMessage: {
text: 'Day not valid'
text: 'Date of birth must include a day'
},
id: 'dob',
name: 'dob',
items:[
{
name: 'day',
classes: 'govuk-input--error'
classes: 'govuk-input--width-2 govuk-input--error'
},
{
name: 'month'
name: 'month',
value: '10',
classes: 'govuk-input--width-2'
},
{
name: 'year'
name: 'year',
value: '1985',
classes: 'govuk-input--width-4'
}
]
})
Expand Down Expand Up @@ -240,8 +261,10 @@
id: "more-detail",
name: "more-detail",
label: {
text: "Can you provide more detail?",
hintText: "Don't include personal or financial information, eg your National Insurance number or credit card details."
text: "Can you provide more detail?"
},
hint: {
text: 'Don’t include personal or financial information, for example your National Insurance number or credit card details.'
},
"errorMessage": {
text: "Error message goes here"
Expand Down
18 changes: 13 additions & 5 deletions app/views/examples/error-summary-with-messages/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,11 @@

{{ govukInput({
label: {
"html": '<h3 class="govuk-heading-m govuk-!-margin-bottom-1">Passport number</h3>',
"hintText": "For example, 502135326"
text: "Passport number",
classes: "govuk-label--m"
},
hint: {
text: "For example, 502135326"
},
id: "passport-number",
name: "passport-number",
Expand All @@ -47,8 +50,13 @@

{{ govukDateInput({
fieldset: {
legendHtml: '<h3 class="govuk-heading-m">Expiry date</h3>',
legendHintText: 'For example, 08 2014'
legend: {
text: 'Expiry date',
classes: 'govuk-fieldset__legend--m'
}
},
hint: {
text: 'For example, 08 2014'
},
id: 'expiry',
name: 'expiry',
Expand All @@ -63,7 +71,7 @@
}
],
errorMessage: {
"text": "You must provide your expiry date"
"text": "Enter your expiry date"
}
})
}}
Expand Down
22 changes: 15 additions & 7 deletions app/views/examples/form-elements/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
<span id="radio-stacked"></span>
{{ govukRadios({
"fieldset": {
"legendHtml": "<h2 class=\"govuk-heading-l\">How do you want to be contacted?</h2>"
"legend": {
text: "How do you want to be contacted?",
classes: "govuk-fieldset__legend--m"
}
},
"idPrefix": "radio-stacked",
"name": "radio-stacked",
Expand All @@ -83,7 +86,7 @@
<span id="radio-inline"></span>
{{ govukRadios({
"fieldset": {},
"classes": "govuk-radio--inline",
"classes": "govuk-radios--inline",
"idPrefix": "radio-inline",
"name": "radio-inline",
"items": [
Expand Down Expand Up @@ -121,12 +124,17 @@

<span id="date"></span>
{{- govukDateInput({
fieldset: {
legendText: 'What is your date of birth?',
legendHintText: 'For example, 31 3 1980'
"fieldset": {
"legend": {
"text": "What is your date of birth?",
"classes": "govuk-fieldset__legend--m"
}
},
"hint": {
"text": "For example, 31 3 1980"
},
id: 'dob',
name: 'dob'
"id": "dob",
"name": "dob"
}) -}}

{% call govukFieldset() %}
Expand Down
20 changes: 10 additions & 10 deletions app/views/full-page-examples/bank-holidays/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
text: "Monday"
},
{
text: " Summer bank holiday"
text: "Summer bank holiday"
}
],
[
Expand Down Expand Up @@ -1209,7 +1209,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1327,7 +1327,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1448,7 +1448,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1569,7 +1569,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1690,7 +1690,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1811,7 +1811,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -1932,7 +1932,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -2053,7 +2053,7 @@
text: "Monday"
},
{
text: " St Andrew’s Day"
text: "St Andrew’s Day"
}
],
[
Expand Down Expand Up @@ -2206,7 +2206,7 @@
text: "Monday"
},
{
text: " Early May bank holiday"
text: "Early May bank holiday"
}
],
[
Expand Down
Loading

0 comments on commit 86533e9

Please sign in to comment.