From 3e3708f65b3b0e1320bed634df219437597e98d8 Mon Sep 17 00:00:00 2001 From: Paul Derscheid Date: Fri, 17 Apr 2026 12:53:58 +0200 Subject: [PATCH] Bug 42284: (follow-up) Restore hide_marc polarity for marc tag visibility The original UNLESS/ELSE block kept MARC tag links visible by default and hid them only when the hide_marc syspref was enabled: [% UNLESS Koha.Preference("hide_marc") %] toggleMARCTagLinks(true) [% ELSE %] toggleMARCTagLinks(false); [% END %] The JS port inverted the test without swapping the branches, so when hide_marc was off the tag links were hidden and when it was on they were shown -- the opposite of the pref's intent. Flip the condition back (!Koha.prefs.hide_marc). To test: - Set hide_marc = 0: open addbiblio.pl, MARC tag numbers and subfield codes are visible on first load. - Set hide_marc = 1 and clear the marctags cookie (devtools -> Application -> Cookies): reload addbiblio.pl, tag numbers and subfield codes are hidden on first load. Signed-off-by: Paul Derscheid Signed-off-by: Jan Kissig Signed-off-by: Pedro Amorim --- .../intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt index 4759614b5c..6ca7923b9a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt @@ -168,7 +168,7 @@ } else if (marctags_cookie == "show") { toggleMARCTagLinks(true); } else { - if (Koha.prefs.hide_marc) { + if (!Koha.prefs.hide_marc) { toggleMARCTagLinks(true); } else { toggleMARCTagLinks(false);