Bugzilla – Attachment 8071 Details for
Bug 4969
Vendors can not be deleted / show only active vendors
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 4969: allows deletion of booksellers
Bug-4969-allows-deletion-of-booksellers.patch (text/plain), 2.78 KB, created by
Katrin Fischer
on 2012-03-08 06:37:40 UTC
(
hide
)
Description:
Bug 4969: allows deletion of booksellers
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2012-03-08 06:37:40 UTC
Size:
2.78 KB
patch
obsolete
>From 3c11a1c2f370e1ac25f0effea64306ba1079a2ec Mon Sep 17 00:00:00 2001 >From: Adrien Saurat <adrien.saurat@biblibre.com> >Date: Thu, 9 Feb 2012 16:18:44 +0100 >Subject: [PATCH] Bug 4969: allows deletion of booksellers > >With JS check before delete. >--- > acqui/supplier.pl | 6 +++++- > .../prog/en/includes/acquisitions-toolbar.inc | 11 +++++++++++ > 2 files changed, 16 insertions(+), 1 deletions(-) > >diff --git a/acqui/supplier.pl b/acqui/supplier.pl >index 3faa560..a24db4a 100755 >--- a/acqui/supplier.pl >+++ b/acqui/supplier.pl >@@ -117,7 +117,11 @@ if ( $op eq 'display' ) { > contracts => $contracts, > ); > } elsif ( $op eq 'delete' ) { >- DelBookseller($id); >+ # no further message needed for the user >+ # the DELETE button only appears in the template if basketcount == 0 >+ if ( $supplier->{'basketcount'} == 0 ) { >+ DelBookseller($id); >+ } > print $query->redirect('/cgi-bin/koha/acqui/acqui-home.pl'); > exit; > } else { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc >index f81b303..7e0143c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/acquisitions-toolbar.inc >@@ -1,6 +1,13 @@ > <div id="toolbar"><script type="text/javascript"> > //<![CDATA[ > >+function confirm_deletion() { >+ var is_confirmed = window.confirm(_('Are you sure you want to delete this bookseller? This cannot be undone.')); >+ if (is_confirmed) { >+ window.location='/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]&op=delete'; >+ } >+} >+ > // prepare DOM for YUI Toolbar > > $(document).ready(function() { >@@ -16,6 +23,7 @@ > new YAHOO.widget.Button("newsupplier"); > new YAHOO.widget.Button("newbasket"); > new YAHOO.widget.Button("editsupplier"); >+ new YAHOO.widget.Button("deletesupplier"); > new YAHOO.widget.Button("receive"); > new YAHOO.widget.Button("newcontract"); > new YAHOO.widget.Button("editcontracts"); >@@ -46,6 +54,9 @@ > [% IF ( id ) %] > [% IF ( CAN_user_acquisition_vendors_manage ) %] > <li><a id="editsupplier" href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% id %]&op=enter">Edit</a></li> >+ [% UNLESS basketcount %] >+ <li><a id="deletesupplier" href="javascript:confirm_deletion()">Delete</a></li> >+ [% END %] > <li><a id="newcontract" href="/cgi-bin/koha/admin/aqcontract.pl?op=add_form&booksellerid=[% id %]">New Contract</a></li> > <li><a id="editcontracts" href="/cgi-bin/koha/admin/aqcontract.pl?booksellerid=[% id %]">Contracts</a></li> > [% UNLESS ( basketcount ) %] >-- >1.7.5.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 4969
:
7398
|
7532
|
7830
|
7982
|
8071
|
8072
|
60803
|
60807
|
60893
|
60894
|
60895
|
60896