From 2f577ab6026f9d4527a4554b8454629319963572 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Tue, 12 Jul 2022 11:04:03 +1200 Subject: [PATCH] Bug 31132: Add button to clear the cataloguing auth finder form This enhancement adds a 'Clear form' link to empty all of the input fields on the authority finder plugin form when cataloguing bibliographic records. To test: 1) Search for a bibliographic record in the staff interface 2) Edit a record 3) Go to tabs 1, 6 or 7 to find a tag linked to the authority finder plugin 4) Launch the authority finder plugin by clicking the Tag editor icon at the end of the field 5) If the fields are empty, add some text in the text fields 6) Click the 'Clear form' link at the bottom of the form 7) Confirm the text is cleared from the input fields and the form is empty Sponsored-by: Education Services Australia SCIS Signed-off-by: David Nind Signed-off-by: nicolas Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/includes/auth-finder-search.inc | 2 +- koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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 4f742e2b92..36415537d5 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 %] -
Cancel +
Clear form Cancel
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 2f47c29f86..9144b979bf 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js +++ b/koha-tmpl/intranet-tmpl/prog/js/auth-finder-search.js @@ -93,6 +93,9 @@ $(document).ready(function(){ }, minLength: 3, }); + $("#clear-form").click(function(){ + $(":input[type='text']").val(''); + }); }); function finderjump(page, full){ -- 2.30.2