From c638ce42a59cc575c78eb2e77baffaadbcede3ec Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 18 Jan 2023 15:41:51 +0000 Subject: [PATCH] Bug 32672: Incorrect CSS path to jquery-ui This patch removes links to jQueryUI assets which are not required in the self-checkout and self-checkin pages. The patch also adds missing JS to the self-checkin page related to internationalization. This prevents a JS error related to an undefined function, "__". To test, apply the patch and view the main pages in self-checkout and self-checkin, and the help page in self checkout. There should be no errors in the browser console related to missing files. Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 410b9ee35f29d9065425036dfd8099ba28911170) Signed-off-by: Jacob O'Mara --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt | 8 ++++++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt | 1 - koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 2 -- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt index da60d2d0ce..ea3a4aecf6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sci/sci-main.tt @@ -35,17 +35,21 @@ [% END %] [% IF ( bidi ) %] - [% Asset.css("lib/jquery/jquery-ui-rtl-1.13.1.min.css") | $raw %] [% Asset.css("css/sco-rtl.css") | $raw %] [% ELSE %] - [% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %] [% Asset.css("css/sco.css") | $raw %] [% END %] [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] [% IF ( Koha.Preference('SelfCheckInUserCSS') ) %][% 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 %] [% INCLUDE 'masthead-sci.inc' %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt index 2f2417fc5d..c47149f702 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt @@ -7,7 +7,6 @@ -[% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %] [% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %] [% Asset.css("css/sco.css") | $raw %] [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] 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 b5d3d6c900..6afd709a78 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 @@ -16,10 +16,8 @@ [% END %] [% Asset.css("lib/font-awesome/css/font-awesome.min.css") | $raw %] [% IF ( bidi ) %] - [% Asset.css("lib/jquery/jquery-ui-rtl-1.13.1.min.css") | $raw %] [% Asset.css("css/sco-rtl.css") | $raw %] [% ELSE %] - [% Asset.css("lib/jquery/jquery-ui-1.13.1.css") | $raw %] [% Asset.css("css/sco.css") | $raw %] [% END %] [% IF ( Koha.Preference('OPACUserCSS') ) %][% END %] -- 2.39.5