From 4c479d4fd3f799a5941005f1bc63c1f11cf47085 Mon Sep 17 00:00:00 2001 From: Daniel Baark <5101747+baarkerlounger@users.noreply.github.com> Date: Mon, 15 Nov 2021 12:25:00 +0000 Subject: [PATCH] Bug fixes (#89) * Check answers to tasklist * Fix status display * Fix case log status * Update footer * Update spec * Fix spec * Make form pages 2/3 width * Make spec failures less likely --- .../soft_validations_controller.js | 2 +- app/views/case_logs/edit.html.erb | 2 +- app/views/form/check_answers.html.erb | 2 +- app/views/form/page.html.erb | 41 ++++++++-------- app/views/layouts/_footer.html.erb | 48 +++++++++++++++++++ app/views/layouts/application.html.erb | 29 +---------- spec/features/case_log_spec.rb | 2 +- 7 files changed, 75 insertions(+), 51 deletions(-) create mode 100644 app/views/layouts/_footer.html.erb diff --git a/app/javascript/controllers/soft_validations_controller.js b/app/javascript/controllers/soft_validations_controller.js index a408e4460..2c223ce1c 100644 --- a/app/javascript/controllers/soft_validations_controller.js +++ b/app/javascript/controllers/soft_validations_controller.js @@ -5,7 +5,7 @@ export default class extends Controller { initialize() { let url = window.location.href + "/soft_validations" - this.fetch_retry(url, { headers: { accept: "application/json" } }, 2) + this.fetch_retry(url, { headers: { accept: "application/json" } }, 5) } fetch_retry(url, options, n) { diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index 551ce0cb5..83d442cb9 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -5,7 +5,7 @@ <%= @case_log.id %>
You've completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.
<% next_incomplete_section=get_next_incomplete_section(@form, @case_log) %> diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 49ebeda0f..26b153f8f 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -10,7 +10,7 @@ <%end %> <%end %> <% end %> - <%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> + <%= form_with model: @case_log, method: "get", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> <%= f.govuk_submit "Save and continue" %> <% end %> diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 188b16cda..d47e89e7b 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -3,25 +3,28 @@ <% end %> <%= turbo_frame_tag "case_log_form", target: "_top" do %> +