From 3f1b17441ea6037ed50aa55895184494445be16a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 5 Apr 2016 09:13:05 +0100 Subject: [PATCH] Bug 16055: Do not allow basketgroup deletion unless empty If a basketgroup has basket attached, it should not be deletable. This patch just removes the Delete button from the interface if it cannot be deleted. When editing a basketgroup, the "Delete basket group" button is no longer displayed. Test plan: 1/ Create a basketgroup 2/ Attach 1+ baskets to this basketgroup 3/ Confirm you are not able to delete it 4/ Remove the baskets from this basketgroup 5/ Confirm you are able to delete it Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher (cherry picked from commit be33e1b46537d85b3d49abc076348916dd50004b) Signed-off-by: Julian Maurice --- .../intranet-tmpl/prog/en/modules/acqui/basketgroup.tt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt index 0bdd830291..3a0713298e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -145,8 +145,6 @@ function submitForm(form) { - [% ELSE %] - [% END %] [% IF (name && closedbg) %]

Basket group [% name %] ([% basketgroupid %]) for [% booksellername |html %]

@@ -340,7 +338,9 @@ function submitForm(form) {
-
+ [% UNLESS basketgroup.basketsqty %] +
+ [% END %] [% END %] -- 2.39.5