Skip to content

Commit

Permalink
Merge pull request #3327 from DFE-Digital/fe-legend-questions
Browse files Browse the repository at this point in the history
[LUPEYALPHA-1201] Use visible legends for FE questions
  • Loading branch information
asmega authored Oct 28, 2024
2 parents ad1daeb + dc35dbe commit f4d6a2e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
<%= f.govuk_error_summary %>

<h1 class="govuk-heading-l">
<%= @form.t(:question) %>
</h1>
<%= f.govuk_collection_radio_buttons :half_teaching_hours,
@form.radio_options,
:id,
:name,
legend: {
tag: "h1",
size: "l",
text: @form.t(:question)
},
hint: -> { %>
<p class="govuk-body">
To apply, at least 50% of your timetabled teaching hours must include either:
</p>

<p class="govuk-body">
To apply, at least 50% of your timetabled teaching hours must include either:
</p>

<%= govuk_list [
"a student aged 16 to 19",
"a person up to age 25 with an #{govuk_link_to("Education, Health and Care Plan (EHCP)", "https://www.gov.uk/children-with-special-educational-needs/extra-SEN-help", target: "_blank")}".html_safe
], type: :bullet %>

<%= f.govuk_collection_radio_buttons :half_teaching_hours, @form.radio_options, :id, :name, legend: { hidden: true } %>
<%= govuk_list [
"a student aged 16 to 19",
"a person up to age 25 with an #{govuk_link_to("Education, Health and Care Plan (EHCP)", "https://www.gov.uk/children-with-special-educational-needs/extra-SEN-help", target: "_blank")}".html_safe
], type: :bullet %>
<% } %>

<%= f.govuk_submit %>
<% end %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,22 @@
<%= form_with model: @form, url: claim_path(current_journey_routing_name), method: :patch, builder: GOVUKDesignSystemFormBuilder::FormBuilder, html: { novalidate: false } do |f| %>
<%= f.govuk_error_summary %>

<h1 class="govuk-heading-l">
<%= @form.t(:question) %>
</h1>
<%= f.govuk_collection_radio_buttons :hours_teaching_eligible_subjects,
@form.radio_options,
:id,
:name,
legend: {
tag: "h1",
size: "l",
text: @form.t(:question)
},
hint: -> { %>
<p class="govuk-body">
At least 50% of your timetabled teaching hours must be spent teaching students of all ages in the following courses:
</p>

<p class="govuk-body">
At least 50% of your timetabled teaching hours must be spent teaching students of all ages in the following courses:
</p>

<%= govuk_list @form.courses, type: :bullet %>

<%= f.govuk_collection_radio_buttons :hours_teaching_eligible_subjects, @form.radio_options, :id, :name, legend: { hidden: true } %>
<%= govuk_list @form.courses, type: :bullet %>
<% } %>

<%= f.govuk_submit %>
<% end %>
Expand Down

0 comments on commit f4d6a2e

Please sign in to comment.