Bug 16726: Clear text in syspref searchbox after submitting

To test:
1) Go to Admin -> search for a system preference
2) Notice your search stays in the search box (this is inconsistent with
    search behaviour across Koha)
3) Apply patch and refresh page
4) Make another search
5) Confirm search still works as expected and search terms have been
cleared from search box
6) Confirm search terms show at the top of the results

Sponsored-by: Catalyst IT

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

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f10f6a19c5)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Aleisha Amohia 2017-06-07 02:09:36 +00:00 committed by Fridolin Somers
parent 354645ef30
commit e6fc2dfc80
2 changed files with 3 additions and 1 deletions

View File

@ -7,7 +7,7 @@
<form action="/cgi-bin/koha/admin/preferences.pl">
<input type="hidden" name="tab" value="[% last_tab %]" />
<input type="hidden" name="op" value="search" />
<input class="head-searchbox" type="text" size="40" name="searchfield" value="[% searchfield |html %]" />
<input class="head-searchbox" type="text" size="40" name="searchfield" value="">
<input type="submit" class="submit" value="Search" />
</form>
</div>

View File

@ -76,6 +76,8 @@
<div class="dialog alert">
No system preferences matched your search for: <strong>[% searchfield |html %]</strong>
</div>
[% ELSE %]
You searched for: <strong>[% searchfield | html %]</strong>
[% END %]
[% FOREACH TAB IN TABS %]
<div class="prefs-tab">