Bug 34106: Retain searchtype parameter in member-search-box

To test:

1. In the main search header switch to 'Search patrons'. Bring up the dropdown and look at 'Search type:'.
2. It defaults to 'Starts with'.
3. Go to '/cgi-bin/koha/members/members-home.pl' and look at the 'Search type:' on the left side.
4. It defaults to 'Contains'
5. Do a patron search from both these places, setting the 'Search type' to contains.
6. The search bar in the header always resets to 'Starts with'
7. Apply patch
8. Try everything again. By default both places should default to contain.
9. If you change the 'Search type' the search in the main header should always retain that value.

Signed-off-by: Ed Veal <eveal@mckinneytexas.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Lucas Gass 2023-06-22 21:59:35 +00:00 committed by Tomas Cohen Arazi
parent 3fc1f27524
commit 6f1d3883c8
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -37,11 +37,11 @@
<label for="searchtype" class="control-label">Search type</label> <label for="searchtype" class="control-label">Search type</label>
<select name="searchtype" id="searchtype" class="form-control"> <select name="searchtype" id="searchtype" class="form-control">
[% IF searchtype == 'start_with' %] [% IF searchtype == 'start_with' %]
<option value='start_with'>Starts with</option> <option value='start_with' selected='selected'>Starts with</option>
<option value='contain'>Contains</option> <option value='contain'>Contains</option>
[% ELSE %] [% ELSE %]
<option value='start_with'>Starts with</option> <option value='start_with'>Starts with</option>
<option value='contain'>Contains</option> <option value='contain' selected='selected'>Contains</option>
[% END %] [% END %]
</select> </select>
</div> </div>