From f4824b5a27e32fdf126febc542b1af8727448474 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 21 May 2021 17:11:09 +0000 Subject: [PATCH] Bug 28423: JavaScript error on MARC modifications page This patch makes a minor change to the MARC modifications template so that the "mmtas" variable isn't defined if there is no JSON to be assigned as its value. To test, apply the patch and go to Administration -> MARC modification templates. - If necessary, add a template with at least one action. - Check the browser console, there should be no errors. - Click the "Edit" button corresponding to one of the template actions. - The details of the action should load correctly in the edit form and there should be no errors in the console. Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 2454b2f58a99b59a51849aa9edbf6295bfa0c31b) Signed-off-by: Fridolin Somers --- .../prog/en/modules/tools/marc_modification_templates.tt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 6c826d4f50..951e3a3bb0 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 @@ -337,7 +337,9 @@ [% Asset.js("js/tools-menu.js") | $raw %] [% Asset.js("js/marc_modification_templates.js") | $raw %] [% END %] -- 2.39.5