From 19bbcbb6e078790b9b4d28202eacf5819fb74e80 Mon Sep 17 00:00:00 2001 From: MadeTech Dushan Date: Thu, 3 Mar 2022 10:53:00 +0000 Subject: [PATCH] remove unneeded code from interruption screen view --- .../_interruption_screen_question.html.erb | 30 ++++--------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/app/views/form/_interruption_screen_question.html.erb b/app/views/form/_interruption_screen_question.html.erb index 0ed405034..8cdcbd991 100644 --- a/app/views/form/_interruption_screen_question.html.erb +++ b/app/views/form/_interruption_screen_question.html.erb @@ -3,7 +3,6 @@ classes: 'app-panel--interruption', ) do %> <%= f.govuk_radio_buttons_fieldset question.id.to_sym, - caption: caption(caption_text, page_header, conditional), legend: legend(question, page_header, conditional), hint: { text: question.hint_text&.html_safe } do %> @@ -11,29 +10,12 @@ <% if key.starts_with?("divider") %> <%= f.govuk_radio_divider %> <% else %> - <% conditional_question = find_conditional_question(@page, question, key) %> - <% if conditional_question.nil? %> - <%= f.govuk_radio_button question.id, - key, - label: { text: options['value'] }, - hint: { text: options['hint'] }, - **stimulus_html_attributes(question) - %> - <% else %> - <%= f.govuk_radio_button question.id, - key, - label: { text: options['value'] }, - hint: { text: options['hint'] }, - **stimulus_html_attributes(question) do %> - <%= render partial: "#{conditional_question.type}_question", locals: { - question: conditional_question, - caption_text: caption_text, - page_header: page_header, - f: f, - conditional: true - } %> - <% end %> - <% end %> + <%= f.govuk_radio_button question.id, + key, + label: { text: options['value'] }, + hint: { text: options['hint'] }, + **stimulus_html_attributes(question) + %> <% end %> <% end %> <% end %>