Lines 60-66
Link Here
|
60 |
<li> |
60 |
<li> |
61 |
<label for="searchfieldstype_filter">Search field:</label> |
61 |
<label for="searchfieldstype_filter">Search field:</label> |
62 |
<select name="searchfieldstype" id="searchfieldstype_filter"> |
62 |
<select name="searchfieldstype" id="searchfieldstype_filter"> |
63 |
[% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname,surname,othernames,cardnumber,userid' %] |
63 |
[% SET standard = Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' %] |
64 |
[% SET search_options = [ standard, 'surname', 'cardnumber', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] |
64 |
[% SET search_options = [ standard, 'surname', 'cardnumber', 'email', 'borrowernumber', 'userid', 'phone', 'address', 'dateofbirth', 'sort1', 'sort2' ] %] |
65 |
[% FOREACH s_o IN search_options %] |
65 |
[% FOREACH s_o IN search_options %] |
66 |
[% display_name = PROCESS patron_fields name=s_o %] |
66 |
[% display_name = PROCESS patron_fields name=s_o %] |
Lines 302-308
Link Here
|
302 |
let search_type = $("#searchtype_filter").val() || "contain"; |
302 |
let search_type = $("#searchtype_filter").val() || "contain"; |
303 |
let search_fields = $("#searchfieldstype_filter").val(); |
303 |
let search_fields = $("#searchfieldstype_filter").val(); |
304 |
if ( !search_fields ) { |
304 |
if ( !search_fields ) { |
305 |
search_fields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,surname,othernames,cardnumber,userid' | html %]"; |
305 |
search_fields = "[% Koha.Preference('DefaultPatronSearchFields') || 'firstname,middle_name,surname,othernames,cardnumber,userid' | html %]"; |
306 |
} |
306 |
} |
307 |
search_fields.split(',').forEach(function(e,i){ |
307 |
search_fields.split(',').forEach(function(e,i){ |
308 |
filters.push({["me."+e]:{"like":(search_type == "contain" ? "%" : "" ) + filter + "%"}}); |
308 |
filters.push({["me."+e]:{"like":(search_type == "contain" ? "%" : "" ) + filter + "%"}}); |
Lines 439-445
Link Here
|
439 |
} |
439 |
} |
440 |
[% CASE 'name-address' %] |
440 |
[% CASE 'name-address' %] |
441 |
{ |
441 |
{ |
442 |
"data": "me.surname:me.firstname:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country", |
442 |
"data": "me.surname:me.firstname:me.middle_name:me.othernames:me.street_number:me.address:me.address2:me.city:me.state:me.postal_code:me.country", |
443 |
"searchable": true, |
443 |
"searchable": true, |
444 |
"orderable": true, |
444 |
"orderable": true, |
445 |
"render": function( data, type, row, meta ) { |
445 |
"render": function( data, type, row, meta ) { |
Lines 489-495
Link Here
|
489 |
} |
489 |
} |
490 |
[% CASE 'name' %] |
490 |
[% CASE 'name' %] |
491 |
{ |
491 |
{ |
492 |
"data": "me.surname:me.firstname:me.othernames", |
492 |
"data": "me.surname:me.firstname:me.middle_name:me.othernames", |
493 |
"searchable": true, |
493 |
"searchable": true, |
494 |
"orderable": true, |
494 |
"orderable": true, |
495 |
"render": function( data, type, row, meta ) { |
495 |
"render": function( data, type, row, meta ) { |