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 <lucas@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2026-04-03 10:54:21 +02:00 committed by Lucas Gass
parent 7cdba6ba02
commit 08e559e207
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 2 additions and 2 deletions

View File

@ -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", "");