Browse Source

Ensure error summary on question pages appears above page title

pull/278/head
Paul Robert Lloyd 3 years ago
parent
commit
ade5eb314f
  1. 9
      app/views/form/page.html.erb

9
app/views/form/page.html.erb

@ -14,8 +14,12 @@
<div data-controller="govukfrontend"></div>
<%= turbo_frame_tag "case_log_form", target: "_top" do %>
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %>
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
<% remove_other_page_errors(@case_log, @page) %>
<%= f.govuk_error_summary %>
<% if @page.header.present? %>
<h1 class="govuk-heading-l">
<% if !@page.hide_subsection_label %>
@ -29,9 +33,6 @@
<p class="govuk-body govuk-body-m"><%= @page.description.html_safe %></p>
<% end %>
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %>
<% remove_other_page_errors(@case_log, @page) %>
<%= f.govuk_error_summary %>
<% @page.non_conditional_questions.map do |question| %>
<div id=<%= question.id + "_div " %><%= display_question_key_div(@page, question) %> >
<% if question.read_only? %>
@ -47,7 +48,7 @@
<%= f.hidden_field :page, value: @page.id %>
<%= f.govuk_submit "Save and continue" %>
<% end %>
</div>
</div>
<% end %>
<% end %>

Loading…
Cancel
Save