From 0495089783e7b69622df6beebc2faa82c3c00c04 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. --- .../intranet-tmpl/prog/en/includes/auth-finder-search.inc | 2 +- .../intranet-tmpl/prog/en/modules/authorities/auth_finder.tt | 11 +++++++++++ koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js | 5 ++++- 3 files changed, 16 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 befdbae8c0..11f0841ae0 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 @@ -158,6 +158,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/js/auth-finder-search.js b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js index 9144b979bf..e439c8bbfc 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,10 @@ $(document).ready(function(){ minLength: 3, }); $("#clear-form").click(function(){ - $(":input[type='text']").val(''); + setTimeout(function(){ + $(":input[type='text']").val(''); + }, 50); + return true; }); }); -- 2.11.0