From 40924b2a64032c02282edf4c6af51b1335507074 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 --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt | 2 ++ 1 file changed, 2 insertions(+) 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..bf445300c54 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,6 +206,7 @@ [% INCLUDE 'datatables.inc' %] [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %] [% Asset.js("js/acquisitions-menu.js") | $raw %] + [% IF loop_budget %] + [% END %] [% END %] [% INCLUDE 'intranet-bottom.inc' %] -- 2.49.0