<% content_for :head do %> <% end %> <% content_for :title, @page.header.present? ? @page.header : @page.questions.first().header.html_safe %> <% content_for :before_content do %> <%= govuk_back_link( text: 'Back', href: 'javascript:history.back()', ) %> <% end %> <%= turbo_frame_tag "case_log_form", target: "_top" do %>
<% if @page.header.present? %>

<% if !@page.hide_subsection_label %> <%= @subsection.label %> <% end %> <%= @page.header %>

<% end %> <% if @page.description.present? %>

<%= @page.description.html_safe %>

<% end %> <%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %> <%= f.govuk_error_summary %> <% @page.questions.map do |question| %>
<%= display_question_key_div(@page, question) %> > <% if question.read_only? %>
<% end %> <%= render partial: "form/#{question.type}_question", locals: { question: question, caption: @subsection.label, page_header: @page.header, f: f } %>
<% end %> <% if @page.has_soft_validations? %> <%= render partial: "form/validation_override_question", locals: { f: f, page: @page } %> <% end %> <%= f.hidden_field :page, value: @page.id %> <%= f.govuk_submit "Save and continue" %> <% end %>
<% end %>