Bugzilla – Attachment 21246 Details for
Bug 7791
Deleting basket should not delete all existing orders without warning
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7791 Followup: delete warns, add missing curly braket and make a simpler message if basket is void
Bug-7791-Followup-delete-warns-add-missing-curly-b.patch (text/plain), 6.19 KB, created by
Jonathan Druart
on 2013-09-19 14:33:38 UTC
(
hide
)
Description:
Bug 7791 Followup: delete warns, add missing curly braket and make a simpler message if basket is void
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-09-19 14:33:38 UTC
Size:
6.19 KB
patch
obsolete
>From c6c9a47d70710bc597b68cb38c6f022ea0ba0903 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Thu, 19 Sep 2013 10:57:44 +0200 >Subject: [PATCH] Bug 7791 Followup: delete warns, add missing curly braket > and make a simpler message if basket is void > >This patch >- delete warns >- add a missing } >- add a condition in template of avoiding asking to suppress orders or records if the basket is void > >To test : >1. Make the same tests as defined in test plan of main patch. It should behave the same way >2. Try to delete a basket with no records inside. You will only have a "Delete basket" button, with less warnings > >Signed-off-by: Cedric Vita <cedric.vita@dracenie.com> >--- > acqui/basket.pl | 4 +- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 40 ++++++++++++-------- > 2 files changed, 26 insertions(+), 18 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 6385b21..02a36a7 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -102,7 +102,6 @@ if ( $op eq 'delete_confirm' ) { > #Delete all orders included in that basket, and all items received. > foreach my $myorder (@orders){ > DelOrder($myorder->{biblionumber},$myorder->{ordernumber}); >- warn "suppression de ".$myorder->{biblionumber}.' '.$myorder->{ordernumber}; > } > # if $delbiblio = 1, delete the records if possible > if ((defined $delbiblio)and ($delbiblio ==1)){ >@@ -113,9 +112,8 @@ if ( $op eq 'delete_confirm' ) { > my @subscriptions = GetSubscriptionsId ($biblionumber); > my $itemcount = GetItemsCount($biblionumber); > DelBiblio($myorder->{biblionumber}) if ($countbiblio == 0 && $itemcount == 0 && !(@subscriptions)); >- warn "suppression de la notice ".$myorder->{biblionumber}}; >+ } > } >- > # delete the basket > DelBasket($basketno,); > $template->param( delete_confirmed => 1 ); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index 091e881..41bd6e9 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -153,26 +153,36 @@ > [% END %] > <div class="btn-group"><a href="[% script_name %]?op=export&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="btn btn-small" id="exportbutton"><i class="icon-download"></i> Export this basket as CSV</a></div> > </div> >- <!-- Modal for confirm deletion box--> >+<!-- Modal for confirm deletion box--> > <div class="modal hide" id="deleteBasketModal" tabindex="-1" role="dialog" aria-labelledby="delbasketModalLabel" aria-hidden="true"> > <div class="modal-header"> > <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> > <h3>Confirm deletion</h3> >- </div> >- <div class="modal-body"> >- <p>Are you sure you want to delete this basket?</p> >- <p>Warning:</p> >- <p>All orders of this basket will be cancelled and used funds will be refunded.</p> >- <p>If items have been created at ordering or receipt stage, they will be deleted.</p> >- <p>You can choose to delete records if possible (if they don't have any item attached, any subscription and any other order).</p> >- </div> >- <div class="modal-footer"> >- <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> >- <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button> >- <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button> >- </div> >+ </div> >+ [% UNLESS book_foot_loop.size > 0 %] >+ <div class="modal-body"> >+ <p>Are you sure you want to delete this basket?</p> >+ </div> >+ <div class="modal-footer"> >+ <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> >+ <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket</button> >+ </div> >+ [% ELSE %] >+ <div class="modal-body"> >+ <p>Are you sure you want to delete this basket?</p> >+ <p>Warning:</p> >+ <p>All orders of this basket will be cancelled and used funds will be refunded.</p> >+ <p>If items have been created when ordering or receiving, they will be deleted.</p> >+ <p>You can choose to delete records if possible (if they don't have any item attached, any subscription and are not used in any other order).</p> >+ </div> >+ <div class="modal-footer"> >+ <button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button> >+ <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],0); return false;" >Delete basket and orders</button> >+ <button type="submit" class="btn btn-default" onclick="delete_basket([% basketno %],[% booksellerid %],1); return false;">Delete basket, orders and records</button> >+ </div> >+ [% END %] > </div> >- <!-- End of Modal--> >+<!-- End of Modal--> > [% ELSE %] > [% UNLESS ( grouped ) %] > <div id="toolbar" class="btn-toolbar"> >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7791
:
21224
|
21225
|
21245
|
21246
|
21684
|
21969
|
22046
|
22091
|
22092
|
22093
|
22764
|
22765
|
22766