generated from companieshouse/node-review-web-starter-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into IDVA5-582-unicorporated-whats-is-the-busines…
…s-name
- Loading branch information
Showing
11 changed files
with
155 additions
and
171 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
{ | ||
"whereDoYouLiveTitle" : "What is your date of birth? welsh", | ||
"whereDoYouLiveHint" : "For example, 31 3 1980 welsh", | ||
"day": "Day welsh", | ||
"month": "Month welsh", | ||
"year": "Year welsh", | ||
"error-default" : "Your request contains validation errors welsh", | ||
"error-invalid" : "Date of birth must be a real date welsh", | ||
"error-dateInFuture" : "The date of birth must be in the past welsh", | ||
"error-noData" : "Enter your date of birth welsh", | ||
"error-noDayMonth" : "Date of birth must include a day and a month welsh", | ||
"error-noDayYear" : "Date of birth must include a day and a year welsh", | ||
"error-noMonthYear" : "Date of birth must include a month and a year welsh", | ||
"error-noDay" : "Date of birth must include a day welsh", | ||
"error-noYear" : "Date of birth must include a year welsh", | ||
"error-tooOld" : "You must be less than 110 years old welsh", | ||
"error-tooYoung" : "You must be at least 16 years old welsh", | ||
"error-nonNumeric" : "Date of birth must only include numbers welsh" | ||
} |
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,19 @@ | ||
{ | ||
"whereDoYouLiveTitle" : "What is your date of birth?", | ||
"whereDoYouLiveHint" : "For example, 31 3 1980", | ||
"day": "Day", | ||
"month": "Month", | ||
"year": "Year", | ||
"error-default" : "Your request contains validation errors", | ||
"error-invalid" : "Date of birth must be a real date", | ||
"error-dateInFuture" : "The date of birth must be in the past", | ||
"error-noData" : "Enter your date of birth", | ||
"error-noDayMonth" : "Date of birth must include a day and a month", | ||
"error-noDayYear" : "Date of birth must include a day and a year", | ||
"error-noMonthYear" : "Date of birth must include a month and a year", | ||
"error-noDay" : "Date of birth must include a day", | ||
"error-noYear" : "Date of birth must include a year", | ||
"error-tooOld" : "You must be less than 110 years old", | ||
"error-tooYoung" : "You must be at least 16 years old", | ||
"error-nonNumeric" : "Date of birth must only include numbers" | ||
} |
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
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
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
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
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
68 changes: 0 additions & 68 deletions
68
src/main/views/features/sole-trader/date-of-birth/capture-date-of-birth.njk
This file was deleted.
Oops, something went wrong.
70 changes: 70 additions & 0 deletions
70
...main/views/features/sole-trader/what-is-your-date-of-birth/what-is-your-date-of-birth.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,70 @@ | ||
{% from "govuk/components/date-input/macro.njk" import govukDateInput %} | ||
{% from "govuk/components/button/macro.njk" import govukButton %} | ||
|
||
{% set errors = pageProperties.errors %} | ||
|
||
{% extends "layouts/default.njk" %} | ||
|
||
{% block main_content %} | ||
|
||
{% if errors["dob-day"] %} | ||
{% set errorMessageText = errors["dob-day"].text %} | ||
{% elif errors["dob-month"] %} | ||
{% set errorMessageText = errors["dob-month"].text %} | ||
{% elif errors["dob-year"] %} | ||
{% set errorMessageText = errors["dob-year"].text %} | ||
{% endif %} | ||
|
||
<div> | ||
<form action="" method="POST"> | ||
{% include "partials/user_name.njk" %} | ||
|
||
{{ govukDateInput({ | ||
id: "dob", | ||
namePrefix: "dob", | ||
fieldset: { | ||
legend: { | ||
text: i18n.whereDoYouLiveTitle, | ||
isPageHeading: true, | ||
classes: "govuk-fieldset__legend--l" | ||
} | ||
}, | ||
hint: { | ||
text: "For example, 31 3 1980" | ||
}, | ||
errorMessage: { | ||
text: errorMessageText | ||
} if errors | length, | ||
|
||
items: [ | ||
{ | ||
name: i18n.day, | ||
classes: "govuk-input--error govuk-input--width-2" if errors else "govuk-input--width-2", | ||
autocomplete: "bday-day", | ||
id: "dob-day", | ||
value: payload["dob-day"] | ||
}, | ||
{ | ||
name: i18n.month, | ||
classes: "govuk-input--error govuk-input--width-2" if errors else "govuk-input--width-2", | ||
autocomplete: "bday-month", | ||
id: "dob-month", | ||
value: payload["dob-month"] | ||
}, | ||
{ | ||
name: i18n.year, | ||
classes: "govuk-input--error govuk-input--width-4" if errors else "govuk-input--width-4", | ||
autocomplete: "bday-year", | ||
id: "dob-year", | ||
value: payload["dob-year"] | ||
} | ||
] | ||
}) }} | ||
|
||
{{ govukButton({ | ||
text: i18n.Continue | ||
}) }} | ||
</form> | ||
</div> | ||
|
||
{% endblock main_content %} |
Oops, something went wrong.