1 [%- BLOCK patron_fields -%]
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>
7 [%- CASE 'borrowernumber' -%]<span>Borrowernumber</span>
8 [%- CASE 'cardnumber' -%]<span>Card number</span>
9 [%- CASE 'surname' -%]<span>Surname</span>
10 [%- CASE 'firstname' -%]<span>First name</span>
11 [%- CASE 'middle_name' -%]<span>Middle name</span>
12 [%- CASE 'title' -%]<span>Salutation</span>
13 [%- CASE 'othernames' -%]<span>Other name</span>
14 [%- CASE 'initials' -%]<span>Initials</span>
15 [%- CASE 'pronouns' -%]<span>Pronouns</span>
16 [%- CASE 'streetnumber' -%]<span>Street number</span>
17 [%- CASE 'streettype' -%]<span>Street type</span>
18 [%- CASE 'address' -%]<span>Address</span>
19 [%- CASE 'address2' -%]<span>Address 2</span>
20 [%- CASE 'city' -%]<span>City</span>
21 [%- CASE 'state' -%]<span>State</span>
22 [%- CASE 'zipcode' -%]<span>ZIP/Postal code</span>
23 [%- CASE 'country' -%]<span>Country</span>
24 [%- CASE 'email' -%]<span>Primary email</span>
25 [%- CASE 'phone' -%]<span>Primary phone</span>
26 [%- CASE 'mobile' -%]<span>Mobile phone</span>
27 [%- CASE 'fax' -%]<span>Fax</span>
28 [%- CASE 'emailpro' -%]<span>Secondary email</span>
29 [%- CASE 'phonepro' -%]<span>Secondary phone</span>
30 [%- CASE 'B_streetnumber' -%]<span>Alternate street number</span>
31 [%- CASE 'B_streettype' -%]<span>Alternate street type</span>
32 [%- CASE 'B_address' -%]<span>Alternate address</span>
33 [%- CASE 'B_address2' -%]<span>Alternate address line 2</span>
34 [%- CASE 'B_city' -%]<span>Alternate city</span>
35 [%- CASE 'B_state' -%]<span>Alternate state</span>
36 [%- CASE 'B_zipcode' -%]<span>Alternate zip code</span>
37 [%- CASE 'B_country' -%]<span>Alternate country</span>
38 [%- CASE 'B_email' -%]<span>Alternate email</span>
39 [%- CASE 'B_phone' -%]<span>Alternate phone</span>
40 [%- CASE 'dateofbirth' -%]<span>Date of birth</span>
41 [%- CASE 'branchcode' -%]<span>Library (code)</span>
42 [%- CASE 'categorycode' -%]<span>Category (code)</span>
43 [%- CASE 'dateenrolled' -%]<span>Registration date</span>
44 [%- CASE 'dateexpiry' -%]<span>Expiry date</span>
45 [%- CASE 'gonenoaddress' -%]<span>Gone no address</span>
46 [%- CASE 'lost' -%]<span>Lost card</span>
47 [%- CASE 'debarred' -%]<span>Restricted</span>
48 [%- CASE 'debarredcomment' -%]<span>Restriction reason</span>
49 [%- CASE 'contactname' -%]<span>Guarantor surname</span>
50 [%- CASE 'contactfirstname' -%]<span>Guarantor firstname</span>
51 [%- CASE 'contacttitle' -%]<span>Guarantor title</span>
52 [%- CASE 'guarantorid' -%]<span>Guarantor ID</span>
53 [%- CASE 'borrowernotes' -%]<span>Circulation note</span>
54 [%- CASE 'relationship' -%]<span>Guarantor relationship</span>
55 [%- CASE 'sex' -%]<span>Gender</span>
56 [%- CASE 'flags' -%]<span>Permissions (code)</span>
57 [%- CASE 'userid' -%]<span>Username</span>
58 [%- CASE 'opacnote' -%]<span>OPAC note</span>
59 [%- CASE 'contactnote' -%]<span>Contact note</span>
60 [%- CASE 'sort1' -%]<span>Sort 1</span>
61 [%- CASE 'sort2' -%]<span>Sort 2</span>
62 [%- CASE 'altcontactfirstname' -%]<span>Alternate contact first name</span>
63 [%- CASE 'altcontactsurname' -%]<span>Alternate contact surname</span>
64 [%- CASE 'altcontactaddress1' -%]<span>Alternate contact address</span>
65 [%- CASE 'altcontactaddress2' -%]<span>Alternate contact address 2</span>
66 [%- CASE 'altcontactaddress3' -%]<span>Alternate contact city</span>
67 [%- CASE 'altcontactstate' -%]<span>Alternate contact state</span>
68 [%- CASE 'altcontactzipcode' -%]<span>Alternate contact ZIP/postal code</span>
69 [%- CASE 'altcontactcountry' -%]<span>Alternate contact country</span>
70 [%- CASE 'altcontactphone' -%]<span>Alternate contact phone</span>
71 [%- CASE 'smsalertnumber' -%]<span>SMS alert number</span>
72 [%- CASE 'sms_provider_id' -%]<span>SMS provider</span>
73 [%- CASE 'privacy' -%]<span>Privacy (code)</span>
74 [%- CASE 'privacy_guarantor_checkouts' -%]<span>Guarantor can view checkouts</span>
75 [%- CASE 'updated_on' -%]<span>Last updated</span>
76 [%- CASE 'lastseen' -%]<span>Last seen</span>
77 [%- CASE 'checkprevcheckout' -%]<span>Check previous checkout</span>
81 [%- BLOCK patron_fields_dropdown -%]
83 <label for="searchfieldstype" class="control-label">Search field:</label>
84 <select name="searchfieldstype" id="searchfieldstype" class="form-control">
86 <label for="searchfieldstype_filter">Search field:</label>
87 <select name="searchfieldstype" id="searchfieldstype_filter">
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_phones, 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>
101 <option value=[% s_o | html %]>[% display_name | $raw %]</option>