Avoid applying two onchange() handlers to a single element, since only
one will ever fire. In this case, the extra handler prevented the
automatic form submission from running a new search.
Signed-off-by: Bill Erickson <berickxx@gmail.com>
<!-- Onchange below is part of a hack to keep the Sort Results order selector persistent across multiple searches in single tab
see templates_kcls/opac/parts/search.tt2 and simple.js-->
-<select class="results_header_sel" id='opac.result.sort' name="sort" onchange="setPersistentSort();"
- [% IF submit_on_change %]onchange='this.form.submit()'[% END %]>
+<select class="results_header_sel" id='opac.result.sort' name="sort"
+ [% IF submit_on_change %]onchange="setPersistentSort();this.form.submit()"
+ [% ELSE %]onchange="setPersistentSort()"[% END %]>
<option value=''>[% l("Sort by Relevance") %]</option>
<optgroup label='[% l("Sort by Title") %]'>
<option value='titlesort'[% value == 'titlesort' ? ' selected="selected"' : '' %]>[% l("Title: A to Z") %]</option>