Skip to content

Commit

Permalink
Use error message property to replace error component
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-kirwan committed Feb 6, 2024
1 parent af54846 commit 6717629
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions app/views/content_items/service_sign_in/_choose_sign_in.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@
method: "post",
data: data_attrs) do %>
<% legend_text = render 'govuk_publishing_components/components/title', title: @content_item.title %>
<% description_text = render 'govuk_publishing_components/components/govspeak' do %>
<% raw(@content_item.description) %>
<% end %>

<%= render "govuk_publishing_components/components/fieldset", legend_text: legend_text do %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds">
<%= render 'govuk_publishing_components/components/govspeak', {} do %>
<%= raw(@content_item.description) %>
<% end %>
<% if @error %>
<%= render "components/error_message", text: t('service_sign_in.error.option') %>
<% end %>
<%= render "govuk_publishing_components/components/radio", id_prefix: @content_item.options_id, name: "option", items: @content_item.options %>
<%= render "govuk_publishing_components/components/radio",
id_prefix: @content_item.options_id,
name: "option",
error_message: (t('service_sign_in.error.option') if @error),
description: description_text,
items: @content_item.options %>
</div>
</div>
<% end %>
Expand Down

0 comments on commit 6717629

Please sign in to comment.