From 2d4c85ab1002c5d4f7c7a8823cace0c5c938412c Mon Sep 17 00:00:00 2001 From: Marius Mandrescu Date: Tue, 28 Mar 2023 12:04:49 -0400 Subject: [PATCH] Bug 33335: fix marc overlay rules accept '-' --- .../en/modules/admin/marc-overlay-rules.tt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt index 348686ddad..ea588a743d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/marc-overlay-rules.tt @@ -453,8 +453,14 @@ } }); + var $category = {}; + + [% FOR categorycode IN categorycodes %] + $category["[% categorycode.categorycode %]"] = "[% categorycode.description | html %]"; + [% END %] + var module_filter_options = { - source: { + source: { '*': '*', batchmod: _("Batch record modification"), intranet: _("Staff client MARC editor"), @@ -462,13 +468,9 @@ z3950: _("Z39.50"), /* bulkmarcimport: _("bulkmarcimport.pl"), */ import_lexile: _("import_lexile.pl") - }, - categorycode: { - '*': '*', - [% FOREACH categorycode IN categorycodes %] - [% categorycode.categorycode | html %]: "[% categorycode.description | html %]", - [% END %] - } + }, + + categorycode: $category }; //Kind of hack: Replace filter value with label when one exist -- 2.34.1