From ed70fdc2a87eb12083b26b77717f3ef164b782b6 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 19 Jan 2024 16:39:37 +0000 Subject: [PATCH] Bug 34478: Manual fix - basketgroups Signed-off-by: Jonathan Druart --- acqui/basketgroup.pl | 6 +++--- .../prog/en/modules/acqui/basketgroup.tt | 18 ++++++++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl index 58fdb57630..c667b3605c 100755 --- a/acqui/basketgroup.pl +++ b/acqui/basketgroup.pl @@ -252,7 +252,7 @@ my $rs = $schema->resultset('VendorEdiAccount')->search( { vendor_id => $booksellerid, } ); $template->param( ediaccount => ($rs->count > 0)); -if ( $op eq "cud-add" ) { +if ( $op eq "add_form" ) { # # if no param('basketgroupid') is not defined, adds a new basketgroup # else, edit (if it is open) or display (if it is close) the basketgroup basketgroupid @@ -343,7 +343,7 @@ if ( $op eq "cud-add" ) { my $basketgroupid = $input->param('basketgroupid'); DelBasketgroup($basketgroupid); print $input->redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' . $booksellerid.'&listclosed=1'); -}elsif ( $op eq 'reopen'){ +}elsif ( $op eq 'cud-reopen'){ # # reopen a closed basketgroup # @@ -401,7 +401,7 @@ if ( $op eq "cud-add" ) { $redirectpath .= "&listclosed=1" if $closedbg ; print $input->redirect($redirectpath ); -} elsif ( $op eq 'ediprint') { +} elsif ( $op eq 'cud-ediprint') { my $basketgroupid = $input->param('basketgroupid'); if ($template->param( 'ediaccount' )) { generate_edifact_orders( $basketgroupid ); 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 91a7e34001..64100384e5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -242,7 +242,7 @@ [% ELSE %]

Basket grouping for [% booksellername | html %]

[% IF (NoEDIMessage && Koha.Preference('EDIFACT')) %]
No EDIFACT configuration for [% booksellername | html %]
[% END %] @@ -281,9 +281,11 @@ [% basketgroup.basketsqty | html %] -
+
[% UNLESS basketgroup.basketsqty %] -
+
+ [% INCLUDE 'csrf-token.inc' %] +
[% END %] @@ -321,13 +323,17 @@ [% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %] [% basketgroup.basketsqty | html %] -
-
+
+
+ [% INCLUDE 'csrf-token.inc' %] +
[% IF Koha.Preference('EDIFACT') %] [% IF (ediaccount) %] -
+
+ [% INCLUDE 'csrf-token.inc' %] +
[% ELSE %]
No EDIFACT configuration for [% booksellername | html %]
[% END %] -- 2.39.5