2 changed files with 22 additions and 13 deletions
@ -1,17 +1,18 @@
|
||||
<%= f.govuk_radio_buttons_fieldset category.to_sym, legend: { text: label, size: "s" }, small: true, form_group: { classes: "app-filter__group" } do %> |
||||
<% options.map do |key, option| %> |
||||
<%= f.govuk_radio_button category, key.to_s, |
||||
label: { text: option }, |
||||
label: { text: option[:label] }, |
||||
checked: filter_selected?(category, key), |
||||
size: "s" |
||||
%> |
||||
<% if option[:conditional_filter] %> |
||||
<%= render partial: "filters/#{option[:conditional_filter][:type]}_filter", locals: { |
||||
f:, |
||||
collection: Organisation.all, |
||||
category: "organisation", |
||||
secondary: true, |
||||
} %> |
||||
size: "s" do %> |
||||
<% if option[:conditional_filter] %> |
||||
<%= render partial: "filters/#{option[:conditional_filter][:type]}_filter", locals: { |
||||
f:, |
||||
collection: option[:conditional_filter][:options], |
||||
category: option[:conditional_filter][:category], |
||||
label: option[:conditional_filter][:label], |
||||
secondary: true, |
||||
} %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
<% end %> |
||||
|
Loading…
Reference in new issue