From a9b551a5cdb6b85a1ca62b0fbbae4f3d41ace0f6 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 13 May 2025 11:36:12 +0100 Subject: [PATCH] Bug 39888: Prevent load of superflous JS when table is not present We shouldn't attempt to load the JS block for dealing with the budgets table if there is no budgets defined and thus no budgets table. Test plan 1) Remove all budgets 2) Load acqui-home.pl and note an error in the browser console 3) Apply the patch 4) Reload acqui-home.pl and note the errors have gone Signed-off-by: Martin Renvoize Amended-by: Jonathan Druart Tidy Signed-off-by: Jonathan Druart --- .../prog/en/modules/acqui/acqui-home.tt | 136 +++++++++--------- 1 file changed, 69 insertions(+), 67 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt index ecdefbb0a4c..1951395a132 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -206,81 +206,83 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] [% Asset.js("js/acquisitions-menu.js") | $raw %] - + }); + + [% END %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.34.1