|
Lines 426-480
function filterByFirstLetterSurname(letter) {
Link Here
|
| 426 |
<li> |
426 |
<li> |
| 427 |
<label for="searchfieldstype_filter">Search fields:</label> |
427 |
<label for="searchfieldstype_filter">Search fields:</label> |
| 428 |
<select name="searchfieldstype" id="searchfieldstype_filter"> |
428 |
<select name="searchfieldstype" id="searchfieldstype_filter"> |
| 429 |
[% IF searchfieldstype == "standard" %] |
429 |
[% pref_fields = Koha.Preference('DefaultPatronSearchFields').split(',') %] |
| 430 |
<option selected="selected" value='standard'>Standard</option> |
430 |
[% default_fields = [ 'standard', 'surname', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] |
| 431 |
[% ELSE %] |
431 |
[% search_options = default_fields.merge(pref_fields).unique %] |
| 432 |
<option value='standard'>Standard</option> |
432 |
[% FOREACH s_o IN search_options %] |
| 433 |
[% END %] |
433 |
[% display_name = PROCESS patron_fields name=s_o %] |
| 434 |
[% IF searchfieldstype == "surname" %] |
434 |
[% NEXT IF display_name.length == 5 %] |
| 435 |
<option selected="selected" value='surname'>Surname</option> |
435 |
[% IF searchfieldstype == s_o %] |
| 436 |
[% ELSE %] |
436 |
<option selected="selected" value=[% s_o %]>[% display_name %]</option> |
| 437 |
<option value='surname'>Surname</option> |
437 |
[% ELSE %] |
| 438 |
[% END %] |
438 |
<option value=[% s_o %]>[% display_name %]</option> |
| 439 |
[% IF searchfieldstype == "email" %] |
439 |
[% END %] |
| 440 |
<option selected="selected" value='email'>Email</option> |
|
|
| 441 |
[% ELSE %] |
| 442 |
<option value='email'>Email</option> |
| 443 |
[% END %] |
| 444 |
[% IF searchfieldstype == "borrowernumber" %] |
| 445 |
<option selected="selected" value='borrowernumber'>Borrower number</option> |
| 446 |
[% ELSE %] |
| 447 |
<option value='borrowernumber'>Borrower number</option> |
| 448 |
[% END %] |
| 449 |
[% IF searchfieldstype == "userid" %] |
| 450 |
<option selected="selected" value='userid'>Username</option> |
| 451 |
[% ELSE %] |
| 452 |
<option value='userid'>Username</option> |
| 453 |
[% END %] |
| 454 |
[% IF searchfieldstype == "phone" %] |
| 455 |
<option selected="selected" value='phone'>Phone number</option> |
| 456 |
[% ELSE %] |
| 457 |
<option value='phone'>Phone number</option> |
| 458 |
[% END %] |
| 459 |
[% IF searchfieldstype == "address" %] |
| 460 |
<option selected="selected" value='address'>Street address</option> |
| 461 |
[% ELSE %] |
| 462 |
<option value='address'>Street address</option> |
| 463 |
[% END %] |
| 464 |
[% IF searchfieldstype == "dateofbirth" %] |
| 465 |
<option selected="selected" value='dateofbirth'>Date of birth</option> |
| 466 |
[% ELSE %] |
| 467 |
<option value='dateofbirth'>Date of birth</option> |
| 468 |
[% END %] |
| 469 |
[% IF searchfieldstype == "sort1" %] |
| 470 |
<option selected="selected" value='sort1'>Sort field 1</option> |
| 471 |
[% ELSE %] |
| 472 |
<option value='sort1'>Sort field 1</option> |
| 473 |
[% END %] |
| 474 |
[% IF searchfieldstype == "sort2" %] |
| 475 |
<option selected="selected" value='sort2'>Sort field 2</option> |
| 476 |
[% ELSE %] |
| 477 |
<option value='sort2'>Sort field 2</option> |
| 478 |
[% END %] |
440 |
[% END %] |
| 479 |
</select> |
441 |
</select> |
| 480 |
</li> |
442 |
</li> |
| 481 |
- |
|
|