From efc39ed8ef583258a8cf8ea7f6da142995d0bc4b 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 | 138 +++++++++--------- 1 file changed, 70 insertions(+), 68 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 ecdefbb0a4..1951395a13 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' %]