From 241eaa1967f0933b286779b813368850e9b0286b Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 12 Jul 2022 16:48:44 +1200 Subject: [PATCH] Bug 31132: (follow-up) Reset dropdown values and style button This follow-up patch resets the dropdown values of the form alongside the text inputs. It styles the button to look like a link so it doesn't distract the user and get 'accidentally' clicked when attempting to submit. Test that the button looks and behaves as expected after submitting a search. Signed-off-by: nicolas Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/includes/auth-finder-search.inc | 2 +- .../prog/en/modules/authorities/auth_finder.tt | 11 +++++++++++ .../en/modules/authorities/searchresultlist-auth.tt | 9 +++++++++ koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js | 10 +++++++++- 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc index d3a01235b1..28775c9977 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/auth-finder-search.inc @@ -179,6 +179,6 @@ [% END %] -
Clear form Cancel +
Cancel
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt index 14d5b8db3c..b1ac1b538f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/auth_finder.tt @@ -4,6 +4,17 @@ [% INCLUDE 'doc-head-open.inc' %] Cataloging authority plugin › Koha [% INCLUDE 'doc-head-close.inc' %] + diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt index c8972222a2..42413b5113 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/searchresultlist-auth.tt @@ -15,6 +15,15 @@ .usefor li { list-style-type: none; } +#clear-form { + border:0; + background:none; + color:#004d99; + padding-left:1em; +} +#clear-form:hover { + color:#538200; +} diff --git a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js index 9144b979bf..d986723664 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js +++ b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js @@ -94,7 +94,15 @@ $(document).ready(function(){ minLength: 3, }); $("#clear-form").click(function(){ - $(":input[type='text']").val(''); + setTimeout(function(){ + $(":input[type='text']").val(''); + $("#mainmainentry").val("contains"); + $("#mainentry").val("contains"); + $("#marclistheading").val("contains"); + $("#marclistanywhere").val("contains"); + $("#orderby").val("HeadingAsc"); + }, 50); + return true; }); }); -- 2.39.5