From 08e559e207aed379730bddaa85bf107cc6737103 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 3 Apr 2026 10:54:21 +0200 Subject: [PATCH] Bug 41582: Fix tags - OPAC TagsInputEnabled is not a syspref but a TT var defined at the top of the template Without this patch the "Add tag(s)" link on the opac-detail page is not working Signed-off-by: Lucas Gass --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 3414f4aa77..fc2434b956 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1636,13 +1636,13 @@ OPACPopupAuthorsSearch: [% Koha.Preference('OPACPopupAuthorsSearch') ? 1 : 0 | html %], OPACDetailQRCode: [% Koha.Preference('OPACDetailQRCode') ? 1 : 0 | html %], OpacBrowseResults: [% Koha.Preference('OpacBrowseResults') ? 1 : 0 | html %], - TagsInputEnabled: [% Koha.Preference('TagsInputEnabled') ? 1 : 0 | html %], OPACURLOpenInNewWindow: [% Koha.Preference('OPACURLOpenInNewWindow') ? 1 : 0 | html %], OPACShelfBrowser: [% Koha.Preference('OPACShelfBrowser') ? 1 : 0 | html %], OPACTableColExpandedByDefault: [% Koha.Preference('OPACTableColExpandedByDefault') ? 1 : 0 | html %], }); const busc = "[% busc | html %]"; const loggedinusername = "[% loggedinusername | html %]"; + const TagsInputEnabled = [% TagsInputEnabled ? 1 : 0 | html %]; var holdingst_table_settings = [% TablesSettings.GetTableSettings( 'opac', 'biblio-detail', 'holdingst', 'json' ) | $raw %]; [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %] @@ -2000,7 +2000,7 @@ dTables.DataTable().responsive.recalc(); }); - if (prefs.TagsInputEnabled && loggedinusername) { + if (TagsInputEnabled && loggedinusername) { $(".tag_add").click(function () { var thisid = $(this).attr("id"); thisid = thisid.replace("tag_add", "");