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 %> |
<%= 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| %> |
<% options.map do |key, option| %> |
||||||
<%= f.govuk_radio_button category, key.to_s, |
<%= f.govuk_radio_button category, key.to_s, |
||||||
label: { text: option }, |
label: { text: option[:label] }, |
||||||
checked: filter_selected?(category, key), |
checked: filter_selected?(category, key), |
||||||
size: "s" |
size: "s" do %> |
||||||
%> |
|
||||||
<% if option[:conditional_filter] %> |
<% if option[:conditional_filter] %> |
||||||
<%= render partial: "filters/#{option[:conditional_filter][:type]}_filter", locals: { |
<%= render partial: "filters/#{option[:conditional_filter][:type]}_filter", locals: { |
||||||
f:, |
f:, |
||||||
collection: Organisation.all, |
collection: option[:conditional_filter][:options], |
||||||
category: "organisation", |
category: option[:conditional_filter][:category], |
||||||
|
label: option[:conditional_filter][:label], |
||||||
secondary: true, |
secondary: true, |
||||||
} %> |
} %> |
||||||
<% end %> |
<% end %> |
||||||
<% end %> |
<% end %> |
||||||
|
<% end %> |
||||||
<% end %> |
<% end %> |
||||||
|
Loading…
Reference in new issue