Bug 10155: Patron search should remember search type options selected
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 15 Jul 2014 08:28:14 +0000 (10:28 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Wed, 30 Jul 2014 17:18:55 +0000 (14:18 -0300)
The search type reset to the default.

Test plan:
1/ go on the patrons home page
2/ Launch a search in the header and select the second value for "search
type" ("contains").
3/ Verify the search type is set to "contains" on the results page.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc

index a1f400c..47cd2ad 100644 (file)
 
       <label for="searchtype">Search type:</label>
       <select name="searchtype" id="searchtype">
-          <option selected="selected" value='start_with'>Starts with</option>
-          <option value='contain'>Contains</option>
+          [% IF searchtype != 'start_with' %]
+              <option value='start_with'>Starts with</option>
+              <option selected="selected" value='contain'>Contains</option>
+          [% ELSE %]
+              <option selected="selected" value='start_with'>Starts with</option>
+              <option value='contain'>Contains</option>
+          [% END %]
       </select>
 
     <input value="Search" class="submit" type="submit" />