From a593d28ff2dc5cf08f6d0b5bfc60a37df3621128 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 16 Feb 2021 13:27:34 +0000 Subject: [PATCH] Bug 27703: Make ID of category select field unique Duplicate element IDs on the authorized values page are invalid and cause a problem with the JavaScript intended to submit the form when the category select field changes. This patch changes the ID of the label and the field and makes the corresponding change to the JavaScript. To test, apply the patch and go to Administration -> Authorized values. - Click an authorized value category to view its contents. - Using mouse or keyboard, make a selection from the "Show category" dropdown menu. - The form should submit automatically and direct you to the corresponding category. - Validate the HTML of the page and confirm that there are no errors. --- koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt index 3edb239e9c..8182c07dab 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt @@ -195,8 +195,8 @@

- - [% FOR c IN categories %] [% IF c == searchfield %] @@ -330,7 +330,7 @@ return confirm(_("Are you sure you want to delete this authorized value?")); }); $('#category').find("input:submit").hide(); - $('#searchfield').change(function() { + $('#category_search').change(function() { $('#category').submit(); }); $(".library_limitation").tooltip(); -- 2.11.0