You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1.3 KiB
30 lines
1.3 KiB
<% content_for :before_content do %> |
|
<%= link_to 'Back', 'javascript:history.back()', class: "govuk-back-link" %> |
|
<% end %> |
|
|
|
<%= turbo_frame_tag "case_log_form", target: "_top" do %> |
|
<div class="govuk-grid-row"> |
|
<div class="govuk-grid-column-two-thirds-from-desktop"> |
|
<% if page_info["header"].present? %> |
|
<h1 class="govuk-heading-xl"> |
|
<%= page_info["header"] %> |
|
</h1> |
|
<% end %> |
|
<%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> |
|
<%= f.govuk_error_summary %> |
|
<% page_info["questions"].map do |question_key, question| %> |
|
<div id=<%= question_key + "_div " %><%= display_question_key_div(page_info, question_key) %> > |
|
<%= render partial: "form/#{question["type"]}_question", locals: { question_key: question_key.to_sym, question: question, f: f } %> |
|
</div> |
|
<% end %> |
|
|
|
<% if page_info["soft_validations"]&.keys&.first %> |
|
<%= render partial: "form/validation_override_question", locals: { f: f, page_key: page_key, page_info: page_info } %> |
|
<% end %> |
|
|
|
<%= f.hidden_field :page, value: page_key %> |
|
<%= f.govuk_submit "Save and continue" %> |
|
<% end %> |
|
</div> |
|
</div> |
|
<% end %>
|
|
|