From 191a63111a6aa3d8a219dd5102fe80e68b5ff0ca Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Mon, 7 Jun 2021 16:02:35 +0000 Subject: [PATCH] Bug 28488: Javascript error in self-checkout (__ is not defined) This patch adds inclusion of the internationalization JavaScript which is required by the newest version of the DataTables include. It references the double-underscore function provided by i18n.js. To test, apply the patch and log into the self-checkout system as a user with checkouts. The table of checkouts should display correctly and there should be no JavaScript errors in the console. Signed-off-by: David Nind Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 339a0818e7..33d1d90b3e 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -25,8 +25,14 @@ [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] [% IF ( Koha.Preference('SCOUserCSS') ) %][% END %] +[% IF lang && lang != 'en' %] + [% Asset.js(lang _ '/js/locale_data.js') | $raw %] +[% END %] +[% Asset.js('js/Gettext.js') | $raw %] +[% Asset.js('js/i18n.js') | $raw %] [% Asset.js("lib/modernizr.min.js") | $raw %] -- 2.39.5