-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make personal details a partial, allowing for different heading sizes
- Loading branch information
Showing
3 changed files
with
72 additions
and
70 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,70 @@ | ||
<% content_for(:page_title, page_title(t("questions.personal_details"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h1 class="govuk-heading-<%= heading_size %>"> | ||
<%= t("questions.personal_details") %> | ||
</h1> | ||
|
||
<% if @form.show_name_section? %> | ||
<div class="govuk-form-group govuk-!-padding-bottom-6"> | ||
<%= f.govuk_fieldset legend: { | ||
text: "What is your full name?", | ||
tag: "h2", | ||
size: subheading_size | ||
} do %> | ||
<%= f.govuk_text_field :first_name, | ||
label: { text: "First name" }, | ||
autocomplete: "given-name" | ||
%> | ||
|
||
<%= f.govuk_text_field :middle_name, | ||
label: { text: "Middle names" }, | ||
autocomplete: "additional-name" | ||
%> | ||
|
||
<%= f.govuk_text_field :surname, | ||
label: { text: "Last name" }, | ||
autocomplete: "family-name" | ||
%> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<% if @form.show_date_of_birth_section? %> | ||
<div class="govuk-!-padding-bottom-6"> | ||
<%= f.govuk_date_field :date_of_birth, | ||
date_of_birth: true, | ||
legend: { | ||
text: "What is your date of birth?", | ||
tag: "h2", | ||
size: subheading_size | ||
}, | ||
hint: { text: "For example, 31 03 1980. We need this information to verify your identity." } %> | ||
</div> | ||
<% end %> | ||
|
||
<% if @form.show_nino_section? %> | ||
<div class="govuk-!-padding-bottom-6"> | ||
<%= f.govuk_text_field :national_insurance_number, | ||
width: 10, | ||
spellcheck: false, | ||
autocomplete: "off", | ||
label: { | ||
text: t("questions.national_insurance_number"), | ||
size: subheading_size, | ||
tag: "h2" | ||
}, | ||
hint: -> do %> | ||
It’s on your National Insurance card, benefit letter, payslip or P60. For example ‘QQ123456C’. | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> |
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 |
---|---|---|
@@ -1,70 +1 @@ | ||
<% content_for(:page_title, page_title(t("questions.personal_details"), journey: current_journey_routing_name, show_error: @form.errors.any?)) %> | ||
|
||
<div class="govuk-grid-row"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> | ||
<%= f.govuk_error_summary %> | ||
|
||
<h1 class="govuk-heading-xl"> | ||
<%= t("questions.personal_details") %> | ||
</h1> | ||
|
||
<% if @form.show_name_section? %> | ||
<div class="govuk-form-group govuk-!-padding-bottom-6"> | ||
<%= f.govuk_fieldset legend: { | ||
text: "What is your full name?", | ||
tag: "h2", | ||
size: "l" | ||
} do %> | ||
<%= f.govuk_text_field :first_name, | ||
label: { text: "First name" }, | ||
autocomplete: "given-name" | ||
%> | ||
|
||
<%= f.govuk_text_field :middle_name, | ||
label: { text: "Middle names" }, | ||
autocomplete: "additional-name" | ||
%> | ||
|
||
<%= f.govuk_text_field :surname, | ||
label: { text: "Last name" }, | ||
autocomplete: "family-name" | ||
%> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<% if @form.show_date_of_birth_section? %> | ||
<div class="govuk-!-padding-bottom-6"> | ||
<%= f.govuk_date_field :date_of_birth, | ||
date_of_birth: true, | ||
legend: { | ||
text: "What is your date of birth?", | ||
tag: "h2", | ||
size: "l" | ||
}, | ||
hint: { text: "For example, 31 03 1980. We need this information to verify your identity." } %> | ||
</div> | ||
<% end %> | ||
|
||
<% if @form.show_nino_section? %> | ||
<div class="govuk-!-padding-bottom-6"> | ||
<%= f.govuk_text_field :national_insurance_number, | ||
width: 10, | ||
spellcheck: false, | ||
autocomplete: "off", | ||
label: { | ||
text: t("questions.national_insurance_number"), | ||
size: "l", | ||
tag: "h2" | ||
}, | ||
hint: -> do %> | ||
It’s on your National Insurance card, benefit letter, payslip or P60. For example ‘QQ123456C’. | ||
<% end %> | ||
</div> | ||
<% end %> | ||
|
||
<%= f.govuk_submit "Continue" %> | ||
<% end %> | ||
</div> | ||
</div> | ||
<%= render "personal_details_page", heading_size: "xl", subheading_size: "l" %> |
1 change: 1 addition & 0 deletions
1
app/views/early_years_payment/practitioner/claims/personal_details.html.erb
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 @@ | ||
<%= render "personal_details_page", heading_size: "l", subheading_size: "m" %> |