Skip to content

Commit

Permalink
Merge pull request #6028 from ministryofjustice/ap-4629/policy-disreg…
Browse files Browse the repository at this point in the history
…ards-error-display

AP-4629: Update policy-disregards error handling
  • Loading branch information
colinbruce authored Nov 23, 2023
2 parents 204beb9 + 2fa81a8 commit 2724b03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/views/providers/means/policy_disregards/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

<%= form.govuk_check_boxes_fieldset :policy_disregards,
legend: { text: page_title, size: "xl", tag: "h1" },
hint: { text: t("generic.select_all_that_apply") } do %>

hint: { text: t("generic.select_all_that_apply") },
form_group: { class: @form.errors[:england_infected_blood_support].any? ? "govuk-form-group--error" : "" } do %>
<% if @form.errors[:england_infected_blood_support].any? %>
<p class="govuk-error-message" id="savings-amount-cash-error">
<span class="govuk-visually-hidden">Error: </span><%= @form.errors[:england_infected_blood_support].first %></p>
<% end %>
<div class="deselect-group" data-deselect-ctrl="#policy-disregards-none-selected-true-field">
<% Providers::PolicyDisregardsForm::SINGLE_VALUE_ATTRIBUTES.each do |checkbox| %>
<%= form.govuk_check_box checkbox, true, "", multiple: false, link_errors: true, label: { text: t(".#{checkbox}") } %>
Expand Down

0 comments on commit 2724b03

Please sign in to comment.