From a9731a2d17138567cb262ecdb8850bc687d885eb 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 Signed-off-by: Tomas Cohen Arazi --- .../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 7546e21456..d3a01235b1 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.39.5