Browse Source

layout changes

pull/25/head
MadeTech Dushan 3 years ago
parent
commit
c02249ae6a
  1. 2
      app/controllers/case_logs_controller.rb
  2. 6
      app/views/form/check_answers.html.erb

2
app/controllers/case_logs_controller.rb

@ -44,7 +44,7 @@ class CaseLogsController < ApplicationController
current_url = request.env["PATH_INFO"] current_url = request.env["PATH_INFO"]
subsection = current_url.split("/")[-2] subsection = current_url.split("/")[-2]
subsection_pages = form.pages_for_subsection(subsection) subsection_pages = form.pages_for_subsection(subsection)
render "form/check_answers", locals: { case_log: @case_log, subsection_pages: subsection_pages } render "form/check_answers", locals: { case_log: @case_log, subsection_pages: subsection_pages, subsection: subsection }
end end
form = Form.new(2021, 2022) form = Form.new(2021, 2022)

6
app/views/form/check_answers.html.erb

@ -1,5 +1,7 @@
<%= turbo_frame_tag "case_log_form", target: "_top" do %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<h1 class="govuk-heading-l">Check the answers you gave for household characteristics</h1> <div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
<h1 class="govuk-heading-l">Check the answers you gave for <%= subsection %></h1>
<%= display_answered_questions_summary(subsection_pages, case_log) %> <%= display_answered_questions_summary(subsection_pages, case_log) %>
<% subsection_pages.each do |page, page_info| %> <% subsection_pages.each do |page, page_info| %>
<% page_info["questions"].each do |question_title, question_info| %> <% page_info["questions"].each do |question_title, question_info| %>
@ -9,4 +11,6 @@
<%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> <%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
<%= f.govuk_submit "Save and continue" %> <%= f.govuk_submit "Save and continue" %>
<% end %> <% end %>
</div>
</div>
<% end %> <% end %>

Loading…
Cancel
Save