Bug 14782: Add possibility to search patrons using the username (userid)
This patch makes it possible to search for users using the username (userid / login name).
To test:
- Apply patch
- Do searches from Home > Patrons
- Search after a full username or parts of a username with Search fields = Standard and Search fields = Userid
- Perform the searches from the top bar (expand with [+]) and from the "Filters" part at the left
- Make sure that other searches behave as before
Signed-off-by: Joonas Kylmälä <j.kylmala@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
(cherry picked from commit a71cc14a52)
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
This commit is contained in:
parent
b609ddc5db
commit
04319600c3
|
|
@ -61,9 +61,10 @@ sub search {
|
|||
# split on coma
|
||||
$searchmember =~ s/,/ /g if $searchmember;
|
||||
my $searchfields = {
|
||||
standard => 'surname,firstname,othernames,cardnumber',
|
||||
standard => 'surname,firstname,othernames,cardnumber,userid',
|
||||
email => 'email,emailpro,B_email',
|
||||
borrowernumber => 'borrowernumber',
|
||||
userid => 'userid',
|
||||
phone => 'phone,phonepro,B_phone,altcontactphone,mobile',
|
||||
address => 'streettype,address,address2,city,state,zipcode,country',
|
||||
dateofbirth => 'dateofbirth',
|
||||
|
|
|
|||
|
|
@ -32,6 +32,11 @@
|
|||
[% ELSE %]
|
||||
<option value='borrowernumber'>Borrower number</option>
|
||||
[% END %]
|
||||
[% IF searchfieldstype == "userid" %]
|
||||
<option selected="selected" value='userid'>Username</option>
|
||||
[% ELSE %]
|
||||
<option value='userid'>Username</option>
|
||||
[% END %]
|
||||
[% IF searchfieldstype == "phone" %]
|
||||
<option selected="selected" value='phone'>Phone number</option>
|
||||
[% ELSE %]
|
||||
|
|
|
|||
|
|
@ -424,6 +424,11 @@ function filterByFirstLetterSurname(letter) {
|
|||
[% ELSE %]
|
||||
<option value='borrowernumber'>Borrower number</option>
|
||||
[% END %]
|
||||
[% IF searchfieldstype == "userid" %]
|
||||
<option selected="selected" value='userid'>Username</option>
|
||||
[% ELSE %]
|
||||
<option value='userid'>Username</option>
|
||||
[% END %]
|
||||
[% IF searchfieldstype == "phone" %]
|
||||
<option selected="selected" value='phone'>Phone number</option>
|
||||
[% ELSE %]
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ All following params are optional:
|
|||
firstletter => search patrons with surname begins with this pattern (currently only used for 1 letter)
|
||||
categorycode and branchcode => search patrons belong to a given categorycode or a branchcode
|
||||
searchtype: can be 'contain' or 'start_with'
|
||||
searchfieldstype: Can be 'standard', 'email', 'borrowernumber', 'phone' or 'address'
|
||||
searchfieldstype: Can be 'standard', 'email', 'borrowernumber', 'userid', 'phone' or 'address'
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue