Bugzilla – Attachment 38712 Details for
Bug 10913
non executed code in acqui/basket.pl ?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10913: The delete basket confirmation page is never displayed
Bug-10913-The-delete-basket-confirmation-page-is-n.patch (text/plain), 7.79 KB, created by
Mark Tompsett
on 2015-04-30 02:33:17 UTC
(
hide
)
Description:
Bug 10913: The delete basket confirmation page is never displayed
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2015-04-30 02:33:17 UTC
Size:
7.79 KB
patch
obsolete
>From e3ca9bf25ef9f5d19322affec7a3e115c0779d44 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 22 Apr 2015 11:46:29 +0200 >Subject: [PATCH] Bug 10913: The delete basket confirmation page is never > displayed > >This condition is never reached, the confirmation to delete a basket is >done with a popup in the template. > >Test plan: >Confirm you don't find any regression when creation/editing and deleting >a basket. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> > >NOTE: I didn't create or edit. However, the only perl script that uses > the template is acqui/basket.pl and the only place delete_confirm > is set in acqui/basket.pl is in that code which is only called if > del_basket actually existed anywhere else, which it doesn't. > I did have two baskets, one with two transfers from the first, so > I transferred one back, and then proceeded to test the two delete > buttons in the modal. No issues. Cancel (to close the modal) works > too. >--- > acqui/basket.pl | 41 ---------------------- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 23 +++--------- > 2 files changed, 4 insertions(+), 60 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 04ab8bc..cfa803b 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -150,47 +150,6 @@ if ( $op eq 'delete_confirm' ) { > $template->param( delete_confirmed => 1 ); > } elsif ( !$bookseller ) { > $template->param( NO_BOOKSELLER => 1 ); >-} elsif ( $op eq 'del_basket') { >- $template->param( delete_confirm => 1 ); >- if ( C4::Context->preference("IndependentBranches") ) { >- my $userenv = C4::Context->userenv; >- unless ( C4::Context->IsSuperLibrarian() ) { >- my $validtest = ( $basket->{creationdate} eq '' ) >- || ( $userenv->{branch} eq $basket->{branch} ) >- || ( $userenv->{branch} eq '' ) >- || ( $basket->{branch} eq '' ); >- unless ($validtest) { >- print $query->redirect("../mainpage.pl"); >- exit 1; >- } >- } >- } >- $basket->{creationdate} = "" unless ( $basket->{creationdate} ); >- $basket->{authorisedby} = $loggedinuser unless ( $basket->{authorisedby} ); >- my $contract = GetContract({ >- contractnumber => $basket->{contractnumber} >- }); >- $template->param( >- basketno => $basketno, >- basketname => $basket->{'basketname'}, >- basketnote => $basket->{note}, >- basketbooksellernote => $basket->{booksellernote}, >- basketcontractno => $basket->{contractnumber}, >- basketcontractname => $contract->{contractname}, >- creationdate => $basket->{creationdate}, >- authorisedby => $basket->{authorisedby}, >- authorisedbyname => $basket->{authorisedbyname}, >- closedate => $basket->{closedate}, >- deliveryplace => $basket->{deliveryplace}, >- billingplace => $basket->{billingplace}, >- active => $bookseller->{'active'}, >- booksellerid => $bookseller->{'id'}, >- name => $bookseller->{'name'}, >- address1 => $bookseller->{'address1'}, >- address2 => $bookseller->{'address2'}, >- address3 => $bookseller->{'address3'}, >- address4 => $bookseller->{'address4'}, >- ); > } elsif ($op eq 'export') { > print $query->header( > -type => 'text/csv', >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 22d6631..82ffde4 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -3,7 +3,7 @@ > [% USE AuthorisedValues %] > > [% INCLUDE 'doc-head-open.inc' %] >-<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title> >+<title>Koha › Acquisitions › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</title> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> > [% INCLUDE 'doc-head-close.inc' %] > [% INCLUDE 'datatables.inc' %] >@@ -145,7 +145,7 @@ > [% INCLUDE 'acquisitions-search.inc' %] > > >-<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> › [% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div> >+<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a> › [% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for [% name|html %]</div> > > <div id="doc3" class="yui-t2"> > >@@ -163,6 +163,7 @@ > <div id="toolbar" class="btn-toolbar"> > <div class="btn-group"><a href="#addtoBasket" role="button" class="btn btn-small" data-toggle="modal"><i class="icon-plus"></i> Add to basket</a></div> > <div class="btn-group"><a href="basketheader.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]&op=add_form" class="btn btn-small" id="basketheadbutton"><i class="icon-pencil"></i> Edit basket</a></div> >+ [%# FIXME This action should not be available for everyone %] > <div class="btn-group"><a href="#deleteBasketModal" role="button" class="btn btn-small" data-toggle="modal" id="delbasketbutton"><i class="icon-remove"></i> Delete this basket</a></div> > [% IF ( unclosable ) %] > [% ELSIF ( uncertainprices ) %] >@@ -241,21 +242,7 @@ > <META HTTP-EQUIV=Refresh CONTENT="0; url=booksellers.pl"> > [% END %] > [% ELSE %] >- <h1>[% UNLESS ( basketno ) %]New [% END %][% IF ( delete_confirm ) %]Delete [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1> >- [% IF ( delete_confirm ) %] >- <h2> >- <span class="yui-button yui-link-button"> >- <em class="first-child"> >- <a href="[% script_name %]?op=delete_confirm&basketno=[% basketno %]&booksellerid=[% booksellerid %]" class="yui-link-button">Yes, delete this basket!</a> >- </em> >- </span> >- <span class="yui-button yui-link-button"> >- <em class="first-child"> >- <a href="[% script_name %]?basketno=[% basketno %]" class="yui-link-button">Cancel</a> >- </em> >- </span> >- </h2> >- [% END %] >+ <h1>[% UNLESS ( basketno ) %]New [% END %]Basket [% basketname|html %] ([% basketno %]) for <a href="supplier.pl?booksellerid=[% booksellerid %]">[% name|html %]</a></h1> > [% IF ( basketno ) %] > <div id="acqui_basket_summary" class="yui-g"> > <div class="rows"> >@@ -377,7 +364,6 @@ > </div> > [% END %] > >- [% UNLESS ( delete_confirm ) %] > <div id="acqui_basket_content" class="yui-g"> > [% IF ( books_loop ) %] > <h2>Orders</h2> >@@ -639,7 +625,6 @@ > > [% INCLUDE 'acquisitions-add-to-basket.inc' %] > [% END %] >- [% END %] > [% END %] > [% END %] [% ELSE %] <!-- if we want just to select a basketgroup for a closed basket --> > [% END %] >-- >2.1.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 10913
:
38316
|
38712
|
38714