Skip to content

Commit

Permalink
Merge pull request #685 from bitzesty/add-filter
Browse files Browse the repository at this point in the history
Set Select all by default
  • Loading branch information
saenom authored Apr 22, 2024
2 parents 65ebc73 + 169cc89 commit 99f421e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/admin/lieutenants/index.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
.govuk-grid-column-two-third
.form-group.search-input
= f.simple_fields_for [:filters, @search.filters] do |g|
= render "shared/form_answers/filters/assigned_lieutenancy_filter", g: g, options: LieutenantSearch.ceremonial_county_options
= render "shared/form_answers/filters/assigned_lieutenancy_filter", g: g, options: LieutenantSearch.ceremonial_county_options, selected_ids: LieutenantSearch.ceremonial_county_options.map(&:second)
.govuk-button-group
= f.submit "Search", class: 'govuk-button'
= link_to "Clear search",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.govuk-grid-column-one-quarter.applications-filter.assigned-lieutenancy-filter
- additional_options = defined?(selected_ids) && selected_ids.present? ? { selected: selected_ids } : { }

= g.input :assigned_ceremonial_county,
include_blank: true,
collection: options,
label: 'Lord Lieutenancy assigned',
input_html: { multiple: true, class: 'js-admin-filter-option' }
input_html: { multiple: true, class: 'js-admin-filter-option' },
**additional_options

0 comments on commit 99f421e

Please sign in to comment.