8 changed files with 106 additions and 8 deletions
@ -0,0 +1,40 @@
|
||||
<%= govuk_panel( |
||||
title_text: title_text, |
||||
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 %> |
||||
|
||||
<% question.answer_options.map do |key, options| %> |
||||
<% 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 %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
@ -0,0 +1,34 @@
|
||||
.app-panel--informational { |
||||
background-color: govuk-colour("blue"); |
||||
color: govuk-colour("white"); |
||||
text-align: left; |
||||
|
||||
.app-panel__body { |
||||
@include govuk-font($size: 19); |
||||
margin: 0; |
||||
} |
||||
} |
||||
|
||||
.app-panel--interruption { |
||||
background-color: govuk-colour("blue"); |
||||
color: govuk-colour("white"); |
||||
text-align: left; |
||||
|
||||
.govuk-body, |
||||
.govuk-label, |
||||
.govuk-fieldset__legend, |
||||
.govuk-hint { |
||||
color: govuk-colour("white"); |
||||
} |
||||
|
||||
*:last-child { |
||||
margin-bottom: 0; |
||||
} |
||||
|
||||
.govuk-radios__label::before, |
||||
& ::after { |
||||
color: govuk-colour("black"); |
||||
border-color: govuk-colour("black"); |
||||
background-color: govuk-colour("white"); |
||||
} |
||||
} |
Loading…
Reference in new issue