From 3d6c5aa71ffc1236be3f5dcc00aeb1da358121f8 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 22 Nov 2016 09:35:07 +0000 Subject: [PATCH] Bug 16984: Do not clone the item block for standing orders If AcqCreateItem is set to ordering and the basket is marked as "standing orders", when ordering a JS error is raised: additem.js:176 Uncaught TypeError: window[events[i]] is not a function The item block should not be displayed in that case. Test plan: - Set AcqCreateItem to "ordering" - Create a basket and tick the "Standing orders" checkbox - Add an order to this basket => Without this patch you get the JS error => With this patch applied you will not get it Signed-off-by: Claire Gravely --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt index 7cd5e80..ddcda66 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/neworderempty.tt @@ -97,7 +97,7 @@ function Check(ff) { $(document).ready(function() { - [% IF (AcqCreateItemOrdering) %] + [% IF AcqCreateItemOrdering and not basket.is_standing %] cloneItemBlock(0, '[% UniqueItemFields %]'); [% END %] -- 2.1.4