@ -1,4 +1,8 @@
<% content_for :title, page.header.present? ? page.header : page.questions.first().header.html_safe %>
<% content_for :head do %>
<meta name="turbo-cache-control" content="no-cache">
<% end %>
<% content_for :title, @page.header.present? ? @page.header : @page.questions.first().header.html_safe %>
<% content_for :before_content do %>
<% content_for :before_content do %>
<%= govuk_back_link(
<%= govuk_back_link(
@ -10,26 +14,26 @@
<%= turbo_frame_tag "case_log_form", target: "_top" do %>
<%= turbo_frame_tag "case_log_form", target: "_top" do %>
<div class="govuk-grid-row">
<div class="govuk-grid-row">
<div class="govuk-grid-column-two-thirds-from-desktop">
<div class="govuk-grid-column-two-thirds-from-desktop">
<% if page.header.present? %>
<% if @ page.header.present? %>
<h1 class="govuk-heading-l">
<h1 class="govuk-heading-l">
<span class="govuk-caption-l"><%= subsection %></span>
<span class="govuk-caption-l"><%= @ subsection.label %></span>
<%= page.header %>
<%= @ page.header %>
</h1>
</h1>
<% end %>
<% end %>
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %>
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %>
<%= f.govuk_error_summary %>
<%= f.govuk_error_summary %>
<% page.questions.map do |question| %>
<% @ page.questions.map do |question| %>
<div id=<%= question.id + "_div " %><%= display_question_key_div(page, question) %> >
<div id=<%= question.id + "_div " %><%= display_question_key_div(@ page, question) %> >
<%= render partial: "form/#{question.type}_question", locals: { question: question, caption: subsection, page_header: page.header, f: f } %>
<%= render partial: "form/#{question.type}_question", locals: { question: question, caption: @ subsection.label , page_header: @ page.header, f: f } %>
</div>
</div>
<% end %>
<% end %>
<% if page.has_soft_validations? %>
<% if @ page.has_soft_validations? %>
<%= render partial: "form/validation_override_question", locals: { f: f, page: page } %>
<%= render partial: "form/validation_override_question", locals: { f: f, page: @ page } %>
<% end %>
<% end %>
<%= f.hidden_field :page, value: page.id %>
<%= f.hidden_field :page, value: @ page.id %>
<%= f.govuk_submit "Save and continue" %>
<%= f.govuk_submit "Save and continue" %>
<% end %>
<% end %>
</div>
</div>