From 0e9b3edb0c9c08646e6ace66af4209ee46739028 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 24 Apr 2026 07:08:18 -0400 Subject: [PATCH] Bug 42467: Remove event attributes from MARC modification templates template This patch removes several "onChange" event attributes from marc_modification_templates.tt and moves the event handlers into marc_modification_templates.js. The patch also corrects a view minor zxlinting errors in the JS file. To test, apply the patch and clear your browser cache if necessary. - Go to Cataloging -> MARC modification templates. - Create a new template if necessary. - Click "New action." - Test the behavior of dropdowns and checkboxes in the new action form. - Fields should be correctly shown or hidden based on the selected actions - Fields should be correctly shown or hidden based on the "RegEx" checkbox. - Text the conditional dropdown along with the "matches" dropdown. - Test that the "matches" regex fields are correctly displayed according to the checkbox. - The browser developer console should show no "Content-Security-Policy" errors. Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda Signed-off-by: Lucas Gass (cherry picked from commit 561e8180cea388da3ce1ad8025c206eaa7d6ec34) Signed-off-by: Jacob O'Mara --- .../tools/marc_modification_templates.tt | 15 +++--- .../prog/js/marc_modification_templates.js | 46 ++++++++++++++----- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt index 8a7406c6a6..059e4a19c1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/marc_modification_templates.tt @@ -242,7 +242,7 @@ >
- @@ -268,7 +268,7 @@ - +