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.
31 lines
1.1 KiB
31 lines
1.1 KiB
<% previous_page = form.previous_page(page_key) %> |
|
<% content_for :before_content do %> |
|
<%= govuk_back_link href: "/case_logs/#{case_log_id}/#{previous_page}" do %> |
|
Back |
|
<% end %> |
|
<% end %> |
|
|
|
<%= turbo_frame_tag "case_log_form", target: "_top" do %> |
|
|
|
<% if page_info["header"].present? %> |
|
<h1 class="govuk-heading-xl"> |
|
<%= page_info["header"] %> |
|
</h1> |
|
<% end %> |
|
<%= form_with action: '/case_logs', method: "next_page", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %> |
|
<% if params[:errors].present? %> |
|
<%= params[:errors] %> |
|
<%= f.govuk_error_summary 'Uh-oh, spaghettios' %> |
|
<% end %> |
|
|
|
<% page_info["questions"].map do |question_key, question| %> |
|
<%= display_question_key_div(page_info, question_key)%> |
|
<%= render partial: "form/#{question["type"]}_question", locals: { question_key: question_key, question: question, f: f } %> |
|
</div> |
|
<% end %> |
|
|
|
<%= f.hidden_field :previous_page, value: page_key %> |
|
<%= f.hidden_field :case_log_id, value: case_log_id %> |
|
<%= f.govuk_submit "Save and continue" %> |
|
<% end %> |
|
<% end %>
|
|
|