From c02249ae6a62a93349409ff0b177db024e8ba0db Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Fri, 1 Oct 2021 14:30:46 +0100 Subject: [PATCH] layout changes --- app/controllers/case_logs_controller.rb | 2 +- app/views/form/check_answers.html.erb | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/controllers/case_logs_controller.rb b/app/controllers/case_logs_controller.rb index 39a0dac55..1a7282bb1 100644 --- a/app/controllers/case_logs_controller.rb +++ b/app/controllers/case_logs_controller.rb @@ -44,7 +44,7 @@ class CaseLogsController < ApplicationController current_url = request.env["PATH_INFO"] subsection = current_url.split("/")[-2] 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 form = Form.new(2021, 2022) diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 4ef25a0bf..69b39e33f 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -1,12 +1,16 @@ <%= turbo_frame_tag "case_log_form", target: "_top" do %> -

Check the answers you gave for household characteristics

- <%= display_answered_questions_summary(subsection_pages, case_log) %> - <% subsection_pages.each do |page, page_info| %> - <% page_info["questions"].each do |question_title, question_info| %> - <%= render partial: 'form/check_answers_table', locals: { question_title: question_title, question_info: question_info, case_log: case_log } %> - <%end %> - <% end %> - <%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> - <%= f.govuk_submit "Save and continue" %> - <% end %> +
+
+

Check the answers you gave for <%= subsection %>

+ <%= display_answered_questions_summary(subsection_pages, case_log) %> + <% subsection_pages.each do |page, page_info| %> + <% page_info["questions"].each do |question_title, question_info| %> + <%= render partial: 'form/check_answers_table', locals: { question_title: question_title, question_info: question_info, case_log: case_log } %> + <%end %> + <% end %> + <%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> + <%= f.govuk_submit "Save and continue" %> + <% end %> +
+
<% end %>