Bug 20979: Fix confirm deletion popup when deleting a biblio

When deleting an empty bib, error messages pops up "1 order(s) are
using this record. You need order managing permissions to delete this
record." even though user has superlibrarian permissions.  Prevents the
deletion of the bib record.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-06-21 18:06:00 -03:00 committed by Nick Clemens
parent a6b8fc9b2e
commit bcba640f11
1 changed files with 3 additions and 3 deletions

View File

@ -20,8 +20,8 @@ function printBiblio() {window.print(); }
/* IF CAN_user_editcatalogue_edit_catalogue or ( frameworkcode == 'FA' and CAN_user_editcatalogue_fast_cataloging ) */
function confirm_deletion() {
var order_manage_permission = $(this).data("order-manage");
function confirm_deletion(link) {
var order_manage_permission = $(link).data("order-manage");
var is_confirmed;
if (count > 0){
is_confirmed = alert( MSG_DELETE_ALL_ITEMS.format(count) );
@ -80,7 +80,7 @@ $(document).ready(function() {
return false;
});
$("#deletebiblio").click(function(){
confirm_deletion();
confirm_deletion(this);
return false;
});
$("#deleteallitems").click(function(){