Skip to content

Commit

Permalink
Merge pull request #2920 from DFE-Digital/CAPT-1736/form-fixes
Browse files Browse the repository at this point in the history
CAPT 1736/form fixes
  • Loading branch information
rjlynch authored Jun 27, 2024
2 parents dd535d1 + cbff836 commit 636cbfc
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_collection_radio_buttons(
:application_route,
Expand All @@ -27,7 +25,11 @@
t("get_a_teacher_relocation_payment.forms.application_route.answers.#{option}.hint")
end
end,
legend: { text: t("get_a_teacher_relocation_payment.forms.application_route.question") },
legend: {
text: t("get_a_teacher_relocation_payment.forms.application_route.question"),
size: "l",
tag: "h1"
},
hint: { text: t("get_a_teacher_relocation_payment.forms.application_route.hint") }
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_collection_radio_buttons(
:one_year,
f.object.available_options,
-> (option) { option },
-> (option) { t("get_a_teacher_relocation_payment.forms.contract_details.answers.#{option}.answer") },
legend: { text: t("get_a_teacher_relocation_payment.forms.contract_details.question") },
legend: {
text: t("get_a_teacher_relocation_payment.forms.contract_details.question"),
size: "l",
tag: "h1"
},
hint: { text: t("get_a_teacher_relocation_payment.forms.contract_details.hint") }
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_date_field(
:date_of_entry,
legend: {
text: t("get_a_teacher_relocation_payment.forms.entry_date.question")
text: t("get_a_teacher_relocation_payment.forms.entry_date.question"),
size: "l",
tag: "h1"
},
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
:to_s,
label: {
text: t("get_a_teacher_relocation_payment.forms.nationality.question"),
size: "l"
size: "l",
tag: "h1"
},
options: {
include_blank: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
:passport_number,
label: {
text: t("get_a_teacher_relocation_payment.forms.passport_number.question"),
size: "l"
size: "l",
tag: "h1"
},
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_date_field(
:start_date,
legend: { text: t("get_a_teacher_relocation_payment.forms.start_date.question") },
legend: {
text: t("get_a_teacher_relocation_payment.forms.start_date.question"),
size: "l",
tag: "h1"
},
) %>

<%= f.govuk_submit %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_collection_radio_buttons(
:state_funded_secondary_school,
f.object.available_options,
-> (option) { option },
-> (option) { t("get_a_teacher_relocation_payment.forms.state_funded_secondary_school.answers.#{option}.answer") },
legend: { text: t("get_a_teacher_relocation_payment.forms.state_funded_secondary_school.question") },
legend: {
text: t("get_a_teacher_relocation_payment.forms.state_funded_secondary_school.question"),
size: "l",
tag: "h1"
},
hint: { text: t("get_a_teacher_relocation_payment.forms.state_funded_secondary_school.hint") }
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_collection_radio_buttons(
:subject,
f.object.available_options,
-> (option) { option },
-> (option) { t("get_a_teacher_relocation_payment.forms.subject.answers.#{option}") },
legend: { text: t("get_a_teacher_relocation_payment.forms.subject.question") },
legend: {
text: t("get_a_teacher_relocation_payment.forms.subject.question"),
size: "l",
tag: "h1"
},
hint: { text: t("get_a_teacher_relocation_payment.forms.subject.hint") }
) %>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
url: claim_path(current_journey_routing_name),
builder: GOVUKDesignSystemFormBuilder::FormBuilder
) do |f| %>
<% if f.object.errors.any? %>
<%= render("shared/error_summary", instance: f.object) %>
<% end %>
<%= f.govuk_error_summary %>

<%= f.govuk_collection_select(
:visa_type,
Expand All @@ -24,7 +22,8 @@
:to_s,
label: {
text: t("get_a_teacher_relocation_payment.forms.visa.question"),
size: "m"
size: "l",
tag: "h1"
},
options: {
include_blank: true
Expand Down

0 comments on commit 636cbfc

Please sign in to comment.