Nick Clemens
96488dfec1
Prior to bug 30063 we had "Email", "Phone", and "Address" in the search field list that allowed a search on all email, phone, or address attributes. This patron restores these and makes sure the search box and the patron search filters use the same block to keep them consistent The fields are now labelled 'All emails', 'All phones', and 'Full address' to make it clear that they search multiple - including any single field in the DefaultPatronSearchFields will additionally add that to the dropdowns To test: 1 - define 'test@email.pro' as 'Secondary email' for a patron 2 - Search from 'Search patrons' address bar (visible at top of moremember.pl) 3 - Nothing is found using 'Standard' or 'Email fields' 4 - Apply patch 5 - Refresh page and repeat 6 - Nothing is found for standard, Patron is found for 'All emails' 7 - Define a unique value for patron in 'Address 2' 8 - Confirm 'Full address' search returns the patron 9 - Test with 'Secondary phone' and 'All phones' as well 10 - Repeat test from 'Patrons' module using the search on the left Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
72 lines
3.5 KiB
HTML
72 lines
3.5 KiB
HTML
[% USE Branches %]
|
|
[% USE Categories %]
|
|
[% USE Koha %]
|
|
[% PROCESS 'patronfields.inc' %]
|
|
[% IF CAN_user_borrowers_edit_borrowers %]
|
|
<div id="patron_search" class="residentsearch">
|
|
<form method="post" action="/cgi-bin/koha/members/member.pl">
|
|
<input type="hidden" name="quicksearch" value="1" />
|
|
|
|
<span class="form-title">
|
|
<label class="control-label">Search patrons</label>
|
|
</span>
|
|
|
|
<span class="form-content">
|
|
[% IF ( Koha.Preference('RetainPatronsSearchTerms') ) %]
|
|
<input name="searchmember" id="searchmember" class="head-searchbox form-control" type="text" placeholder="Enter patron card number or partial name" size="25" value="[% searchmember | html %]"/>
|
|
[% ELSE %]
|
|
<input name="searchmember" id="searchmember" class="head-searchbox form-control" type="text" placeholder="Enter patron card number or partial name" size="25"/>
|
|
[% END %]
|
|
|
|
<button type="button" class="form-extra-content-toggle"><i class="fa fa-sliders"></i></button>
|
|
</span>
|
|
|
|
<button type="submit"><i class="fa fa-arrow-right"></i></button>
|
|
|
|
<div class="form-extra-content">
|
|
<div>
|
|
[% INCLUDE patron_fields_dropdown search_box=1 %]
|
|
</div>
|
|
|
|
<div>
|
|
<label for="searchtype" class="control-label">Search type</label>
|
|
<select name="searchtype" id="searchtype" class="form-control">
|
|
[% IF searchtype == 'start_with' %]
|
|
<option value='start_with'>Starts with</option>
|
|
<option value='contain'>Contains</option>
|
|
[% ELSE %]
|
|
<option value='start_with'>Starts with</option>
|
|
<option value='contain'>Contains</option>
|
|
[% END %]
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
[% SET branches = Branches.all( selected => branchcode_filter, only_from_group => 1 ) %]
|
|
<label for="branchcode" class="control-label">Library</label>
|
|
<select name="branchcode_filter" id="branchcode" class="form-control">
|
|
[% IF branches.size != 1 %]
|
|
<option value="">Any</option>
|
|
[% END %]
|
|
[% PROCESS options_for_libraries libraries => branches %]
|
|
</select>
|
|
</div>
|
|
|
|
<div>
|
|
[% SET categories = Categories.all() %]
|
|
<label for="categorycode" class="control-label">Category</label>
|
|
<select name="categorycode_filter" id="categorycode" class="form-control">
|
|
<option value="">Any</option>
|
|
[% FOREACH category IN categories %]
|
|
[% IF category.categorycode == categorycode_filter %]
|
|
<option value="[% category.categorycode | html %]" selected="selected">[% category.description | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% category.categorycode | html %]">[% category.description | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
[% END %]
|