Browse Source

Check answers should be a single summary list (#100)

pull/81/head
Daniel Baark 3 years ago committed by GitHub
parent
commit
f947b0f74e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/views/form/_check_answers_table.html.erb
  2. 2
      app/views/form/check_answers.html.erb

2
app/views/form/_check_answers_table.html.erb

@ -1,4 +1,3 @@
<dl class="govuk-summary-list govuk-!-margin-bottom-9">
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key">
<%= question_info["check_answer_label"].to_s.present? ? question_info["check_answer_label"].to_s : question_info["header"].to_s%>
@ -10,4 +9,3 @@
<%= create_update_answer_link(question_title, question_info, @case_log, form) %>
</dd>
</div>
</dl>

2
app/views/form/check_answers.html.erb

@ -3,9 +3,11 @@
<div class="govuk-grid-column-three-quarters-from-desktop">
<h1 class="govuk-heading-l">Check the answers you gave for <%= subsection.humanize(capitalize: false) %></h1>
<%= display_answered_questions_summary(subsection, @case_log, form) %>
<dl class="govuk-summary-list govuk-!-margin-bottom-9">
<% total_questions(subsection, @case_log, form).each do |question_title, question_info| %>
<%= render partial: 'form/check_answers_table', locals: { question_title: question_title, question_info: question_info, case_log: @case_log, form: form } %>
<% end %>
</dl>
<%= form_with model: @case_log, method: "get", builder: GOVUKDesignSystemFormBuilder::FormBuilder do |f| %>
<%= f.govuk_submit "Save and continue" %>
<% end %>

Loading…
Cancel
Save