|
5 | 5 | method: 'GET' do |f| %> |
6 | 6 | <%= f.hidden_field :locale, value: params[:locale] %> |
7 | 7 | <%= f.text_field :search, |
8 | | - placeholder: t('accountants.search_placeholder'), |
9 | | - hide_label: true, |
10 | | - value: params[:search], |
11 | | - class: 'search_form_input accountant mr-4' %> |
12 | | - |
13 | | - <%= f.select :clinic_id, |
14 | | - options_for_select(clinic_options.reject{ |x| x.blank? }, |
15 | | - params[:clinic_id]), |
| 8 | + placeholder: t("accountants.search_placeholder"), |
16 | 9 | hide_label: true, |
17 | | - include_blank: t('accountants.search_all_clinics'), |
18 | | - class: 'search_form_input accountant' %> |
| 10 | + value: params[:search], |
| 11 | + class: "search_form_input accountant mr-4" %> |
| 12 | + |
| 13 | + <div class="dropdown"> |
| 14 | + <button |
| 15 | + href="#" |
| 16 | + data-toggle="dropdown" |
| 17 | + class="btn dropdown-toggle navbar-text" |
| 18 | + id="clinic-dropdown" |
| 19 | + data-bs-auto-close="outside" |
| 20 | + aria-haspopup="true" |
| 21 | + aria-expanded="false" |
| 22 | + > |
| 23 | + Select a Clinic |
| 24 | + </button> |
19 | 25 |
|
| 26 | + <div class="dropdown-menu" aria-labelledby="clinic-dropdown"> |
| 27 | + <% @clinics.each do |clinic| %> |
| 28 | + <li class="flex dropdown-item"> |
| 29 | + <%= label_tag "clinic_#{clinic.id}", clinic.name %> |
| 30 | + <%= check_box_tag "clinic_id[]", clinic.id, @selected_clinics.include?(clinic.id) %> |
| 31 | + </li> |
| 32 | + <% end %> |
| 33 | + </div> |
| 34 | + </div> |
20 | 35 | <%= f.button title: t('common.search'), class: 'btn btn-primary ml-4' do %> |
21 | 36 | <i class="fas fa-search"></i> |
22 | 37 | <% end %> |
|
0 commit comments