|
|
|
@ -1,6 +1,7 @@ |
|
|
|
<%= f.govuk_select(category.to_sym, |
|
|
|
<%= f.govuk_select(category.to_sym, |
|
|
|
label: { text: label, hidden: secondary }, |
|
|
|
label: { text: label, hidden: secondary }, |
|
|
|
"data-controller": "search conditional-filter", |
|
|
|
"data-controller": "search conditional-filter", |
|
|
|
|
|
|
|
"hidden": true, |
|
|
|
"data-info": { search_url: filter_search_url(category.to_sym) }.to_json) do %> |
|
|
|
"data-info": { search_url: filter_search_url(category.to_sym) }.to_json) do %> |
|
|
|
<% collection.each do |answer| %> |
|
|
|
<% collection.each do |answer| %> |
|
|
|
<option value="<%= answer.id %>" |
|
|
|
<option value="<%= answer.id %>" |
|
|
|
@ -9,3 +10,9 @@ |
|
|
|
<%= answer.id == "" ? "disabled" : "" %>><%= answer.name %></option> |
|
|
|
<%= answer.id == "" ? "disabled" : "" %>><%= answer.name %></option> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<%= f.govuk_text_field "#{category}_text_search".to_sym, |
|
|
|
|
|
|
|
label: { text: label, hidden: secondary }, |
|
|
|
|
|
|
|
"data-controller": "search conditional-filter", |
|
|
|
|
|
|
|
"data-info": { search_url: filter_search_url(category.to_sym) }.to_json, |
|
|
|
|
|
|
|
value: selected_option("#{category}_text_search", @filter_type) %> |
|
|
|
|