|
Lines 1-6
Link Here
|
| 1 |
[%- BLOCK patron_fields -%] |
1 |
[%- BLOCK patron_fields -%] |
| 2 |
[%- SWITCH name -%] |
2 |
[%- SWITCH name -%] |
| 3 |
[%- CASE standard -%]<span>Standard</span> |
3 |
[%- CASE standard -%]<span>Standard</span> |
|
|
4 |
[%- CASE full_address -%]<span>Full address</span> |
| 5 |
[%- CASE all_emails -%]<span>All emails</span> |
| 6 |
[%- CASE all_phones -%]<span>All phones</span> |
| 4 |
[%- CASE 'borrowernumber' -%]<span>Borrowernumber</span> |
7 |
[%- CASE 'borrowernumber' -%]<span>Borrowernumber</span> |
| 5 |
[%- CASE 'cardnumber' -%]<span>Card number</span> |
8 |
[%- CASE 'cardnumber' -%]<span>Card number</span> |
| 6 |
[%- CASE 'surname' -%]<span>Surname</span> |
9 |
[%- CASE 'surname' -%]<span>Surname</span> |
|
Lines 75-77
Link Here
|
| 75 |
[%- CASE DEFAULT -%] |
78 |
[%- CASE DEFAULT -%] |
| 76 |
[%- END -%] |
79 |
[%- END -%] |
| 77 |
[%- END -%] |
80 |
[%- END -%] |
| 78 |
- |
81 |
[%- BLOCK patron_fields_dropdown -%] |
|
|
82 |
[% IF search_box %] |
| 83 |
<label for="searchfieldstype" class="control-label">Search field:</label> |
| 84 |
<select name="searchfieldstype" id="searchfieldstype" class="form-control"> |
| 85 |
[% ELSE %] |
| 86 |
<label for="searchfieldstype_filter">Search field:</label> |
| 87 |
<select name="searchfieldstype" id="searchfieldstype_filter"> |
| 88 |
[% END %] |
| 89 |
[% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' %] |
| 90 |
[% SET full_address = 'streetnumber,streettype,address,address2,city,state,zipcode,country' %] |
| 91 |
[% SET all_emails = 'email,emailpro,B_email' %] |
| 92 |
[% SET all_phones = 'phone,phonepro,B_phone,altcontactphone,mobile' %] |
| 93 |
[% default_fields = [ standard, 'surname', 'cardnumber', all_emails, 'borrowernumber', 'userid', all_phone, full_address, 'dateofbirth', 'sort1', 'sort2' ] %] |
| 94 |
[% search_options = default_fields.merge(standard.split(',')).unique %] |
| 95 |
[% FOREACH s_o IN search_options %] |
| 96 |
[% display_name = PROCESS patron_fields name=s_o %] |
| 97 |
[% NEXT IF !display_name %] |
| 98 |
[% IF searchfieldstype == s_o %] |
| 99 |
<option selected="selected" value=[% s_o | html %]>[% display_name | $raw %]</option> |
| 100 |
[% ELSE %] |
| 101 |
<option value=[% s_o | html %]>[% display_name | $raw %]</option> |
| 102 |
[% END %] |
| 103 |
[% END %] |
| 104 |
</select> |
| 105 |
[%- END -%] |