Browse Source

remove unneeded code from interruption screen view

pull/372/head
MadeTech Dushan 3 years ago committed by baarkerlounger
parent
commit
19bbcbb6e0
  1. 30
      app/views/form/_interruption_screen_question.html.erb

30
app/views/form/_interruption_screen_question.html.erb

@ -3,7 +3,6 @@
classes: 'app-panel--interruption', classes: 'app-panel--interruption',
) do %> ) do %>
<%= f.govuk_radio_buttons_fieldset question.id.to_sym, <%= f.govuk_radio_buttons_fieldset question.id.to_sym,
caption: caption(caption_text, page_header, conditional),
legend: legend(question, page_header, conditional), legend: legend(question, page_header, conditional),
hint: { text: question.hint_text&.html_safe } do %> hint: { text: question.hint_text&.html_safe } do %>
@ -11,29 +10,12 @@
<% if key.starts_with?("divider") %> <% if key.starts_with?("divider") %>
<%= f.govuk_radio_divider %> <%= f.govuk_radio_divider %>
<% else %> <% else %>
<% conditional_question = find_conditional_question(@page, question, key) %> <%= f.govuk_radio_button question.id,
<% if conditional_question.nil? %> key,
<%= f.govuk_radio_button question.id, label: { text: options['value'] },
key, hint: { text: options['hint'] },
label: { text: options['value'] }, **stimulus_html_attributes(question)
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 %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>

Loading…
Cancel
Save