Bug 15930: Make patron searches defaulting on 'contain'

The default patron search types has changed from 'contain' to
start_with. Users consider it as a bug.
This patch revert the previous changes to default on 'contain'.

Test plan:
Search for patrons in different places (guarantor, checkout, patron
module, acquisition module, etc.) and confirm that the default is always
'contain'

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>

Signed-off-by: Brendan Gallagher <bredan@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-04-06 11:33:11 +01:00 committed by Brendan Gallagher
parent 2e7df30450
commit a8491dc156
4 changed files with 10 additions and 9 deletions

View file

@ -13,7 +13,7 @@ sub search {
my $firstletter = $params->{firstletter};
my $categorycode = $params->{categorycode};
my $branchcode = $params->{branchcode};
my $searchtype = $params->{searchtype} || 'start_with';
my $searchtype = $params->{searchtype} || 'contain';
my $searchfieldstype = $params->{searchfieldstype} || 'standard';
my $dt_params = $params->{dt_params};

View file

@ -68,12 +68,12 @@
<p>
<label for="searchtype">Search type:</label>
<select name="searchtype" id="searchtype">
[% IF searchtype != 'start_with' %]
<option value='start_with'>Starts with</option>
<option selected="selected" value='contain'>Contains</option>
[% ELSE %]
[% IF searchtype == 'start_with' %]
<option selected="selected" value='start_with'>Starts with</option>
<option value='contain'>Contains</option>
[% ELSE %]
<option value='start_with'>Starts with</option>
<option selected="selected" value='contain'>Contains</option>
[% END %]
</select>
</p>

View file

@ -468,10 +468,11 @@ function filterByFirstLetterSurname(letter) {
<li>
<label for="searchtype_filter">Search type:</label>
<select name="searchtype" id="searchtype_filter">
<option value='start_with'>Starts with</option>
[% IF searchtype == "contain" %]
<option value="contain" selected="selected">Contains</option>
[% IF searchtype == "start_with" %]
<option value='start_with' selected="selected">Starts with</option>
<option value="contain">Contains</option>
[% ELSE %]
<option value='start_with'>Starts with</option>
<option value="contain" selected="selected">Contains</option>
[% END %]
</select>

View file

@ -79,7 +79,7 @@ $template->param(
searchmember => $searchmember,
branchcode_filter => $input->param('branchcode_filter'),
categorycode_filter => $input->param('categorycode_filter'),
searchtype => $input->param('searchtype') || 'start_with',
searchtype => $input->param('searchtype') || 'contain',
searchfieldstype => $searchfieldstype,
PatronsPerPage => C4::Context->preference("PatronsPerPage") || 20,
view => $view,