@@ -, +, @@ rename it in basketgroup.pl - removes code related to 'attachbasket' in basket.pl - rename 'attachbasket' to 'save' in basketgroup.pl and basketgroup.tt - fixes some comments related to 'attachbasket' and 'mod_basket' in basketgroup.pl --- acqui/basket.pl | 3 --- acqui/basketgroup.pl | 15 ++++++--------- .../prog/en/modules/acqui/basketgroup.tt | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) --- a/acqui/basket.pl +++ a/acqui/basket.pl @@ -189,9 +189,6 @@ if ( $op eq 'delete_confirm' ) { address3 => $bookseller->{'address3'}, address4 => $bookseller->{'address4'}, ); -} elsif ($op eq 'attachbasket' && $template->{'VARS'}->{'CAN_user_acquisition_group_manage'} == 1) { - print $query->redirect('/cgi-bin/koha/acqui/basketgroup.pl?basketno=' . $basket->{'basketno'} . '&op=attachbasket&booksellerid=' . $booksellerid); - # check if we have to "close" a basket before building page } elsif ($op eq 'export') { print $query->header( -type => 'text/csv', --- a/acqui/basketgroup.pl +++ a/acqui/basketgroup.pl @@ -233,13 +233,13 @@ sub printbasketgrouppdf{ my $op = $input->param('op') || 'display'; # possible values of $op : # - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup -# - mod_basket : modify an individual basket of the basketgroup +# - mod_basket : puts a basket in the basketgroup and redirect to basket page (called from basket page) # - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list # - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list # - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list # - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list # - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list -# - attachbasket : save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page +# - save : saves a modified or newly created basketgroup # - display : display the list of all basketgroups for a vendor my $booksellerid = $input->param('booksellerid'); $template->param(booksellerid => $booksellerid); @@ -316,7 +316,7 @@ if ( $op eq "add" ) { displaybasketgroups($basketgroups, $bookseller, $baskets); } elsif ($op eq 'mod_basket') { # -# edit an individual basket contained in this basketgroup +# put a basket in the basketgroup and redirect to basket page (called from basket page) # my $basketno=$input->param('basketno'); my $basketgroupid=$input->param('basketgroupid'); @@ -365,9 +365,9 @@ if ( $op eq "add" ) { ReOpenBasketgroup($basketgroupid); my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1'; print $input->redirect($redirectpath); -} elsif ( $op eq 'attachbasket') { +} elsif ( $op eq 'save') { # -# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page +# saves a modified or newly created basketgroup # # Getting parameters my $basketgroup = {}; @@ -393,11 +393,8 @@ if ( $op eq "add" ) { closed => $closedbg, }; ModBasketgroup($basketgroup); - if($closedbg){ -# FIXME - } }else{ - # we create a new basketgroup (whith a closed basket) + # we create a new basketgroup $basketgroup = { name => $basketgroupname, booksellerid => $booksellerid, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt @@ -292,7 +292,7 @@ function submitForm(form) { [% IF ( basketgroupid ) %] [% END %] - + Cancel [% END %] --