From 3a2d8ea912f875fd897b368d4804b9802296b0ef Mon Sep 17 00:00:00 2001 From: Kat Date: Thu, 27 Apr 2023 08:58:33 +0100 Subject: [PATCH] Update styling --- .../_interruption_screen_question.html.erb | 74 ++++++++++--------- 1 file changed, 41 insertions(+), 33 deletions(-) diff --git a/app/views/form/_interruption_screen_question.html.erb b/app/views/form/_interruption_screen_question.html.erb index 338cfb6dc..713e5ef97 100644 --- a/app/views/form/_interruption_screen_question.html.erb +++ b/app/views/form/_interruption_screen_question.html.erb @@ -3,48 +3,56 @@ classes: "app-panel--interruption", ) do %>

<%= display_title_text(title_text, lettings_log) %>

-

<%= display_informative_text(informative_text, lettings_log) %>

-

<%= question.hint_text&.html_safe %>

+ <% if informative_text.present? %> +

<%= display_informative_text(informative_text, lettings_log) %>

+ <% end %> + <% if question.hint_text.present? %> +

<%= question.hint_text&.html_safe %>

+ <% end %> <% end %> <% end %> -

+

Make sure these answers are all correct

-<%= govuk_summary_list do |summary_list| %> - <% soft_validation_affected_questions(question, @log).each do |affected_question| %> - <% if affected_question.page.routed_to?(@log, current_user) %> - <% summary_list.row do |row| %> - <% row.key { get_question_label(affected_question) } %> - <% row.value do %> - <%= simple_format( - get_answer_label(affected_question, @log), - wrapper_tag: "span", - class: "govuk-!-margin-right-4", - ) %> - <% extra_value = affected_question.get_extra_check_answer_value(@log) %> - <% if extra_value && affected_question.answer_label(@log, current_user).present? %> - <%= simple_format( - extra_value, - wrapper_tag: "span", - class: "govuk-!-font-weight-regular app-!-colour-muted", - ) %> +
+
+ <%= govuk_summary_list do |summary_list| %> + <% soft_validation_affected_questions(question, @log).each do |affected_question| %> + <% if affected_question.page.routed_to?(@log, current_user) %> + <% summary_list.row do |row| %> + <% row.key { get_question_label(affected_question) } %> + <% row.value do %> + <%= simple_format( + get_answer_label(affected_question, @log), + wrapper_tag: "span", + class: "govuk-!-margin-right-4", + ) %> + <% extra_value = affected_question.get_extra_check_answer_value(@log) %> + <% if extra_value && affected_question.answer_label(@log, current_user).present? %> + <%= simple_format( + extra_value, + wrapper_tag: "span", + class: "govuk-!-font-weight-regular app-!-colour-muted", + ) %> + <% end %> + <% affected_question.get_inferred_answers(@log).each do |inferred_answer| %> + <%= inferred_answer %> + <% end %> + <% end %> + <% if @log.collection_period_open? %> + <% row.action( + text: affected_question.action_text(@log), + href: interruption_action_href(@log, affected_question.page.id), + visually_hidden_text: affected_question.check_answer_label.to_s.downcase, + ) %> + <% end %> <% end %> - <% affected_question.get_inferred_answers(@log).each do |inferred_answer| %> - <%= inferred_answer %> - <% end %> - <% end %> - <% if @log.collection_period_open? %> - <% row.action( - text: affected_question.action_text(@log), - href: interruption_action_href(@log, affected_question.page.id), - visually_hidden_text: affected_question.check_answer_label.to_s.downcase, - ) %> <% end %> <% end %> <% end %> - <% end %> -<% end %> +
+
<%= f.hidden_field question.id, value: "0" %>