add confirm box on paypal refund button

This commit is contained in:
Marion Muszynski 2017-12-07 16:29:31 +01:00
parent 78df0048af
commit 0d3ed321cf

View File

@ -1559,7 +1559,7 @@ class AdminOrders extends AdminTab
</form>'; </form>';
if($order->module && $order->module=="paypal"){ if($order->module && $order->module=="paypal"){
$html.=' $html.='
<form style="margin-top:10px;" action="" method="post"> <form style="margin-top:10px;" action="" method="post" id="form_refund_paypal">
<div class="form-horizontal text-right col-md-offset-9 col-md-3"> <div class="form-horizontal text-right col-md-offset-9 col-md-3">
<input type="hidden" name="id_order" value="'.$order->id.'" /> <input type="hidden" name="id_order" value="'.$order->id.'" />
<button type="submit" class="btn btn-primary pull-right" name="submitPayPalRefund">Remboursement Total Paypal <span class="anticon anticon-paypal"></span></button> <button type="submit" class="btn btn-primary pull-right" name="submitPayPalRefund">Remboursement Total Paypal <span class="anticon anticon-paypal"></span></button>
@ -1985,6 +1985,15 @@ class AdminOrders extends AdminTab
} }
}); });
$("#form_refund_paypal").submit(function(){
var x = confirm("Êtes-vous sûr de vouloir rembourser l\'ensemble de la commande ?");
if(x){
return true;
} else {
return false;
}
});
$("#generateDiscount, #generateDiscount2, #generateCreditSlip").click(function(){ $("#generateDiscount, #generateDiscount2, #generateCreditSlip").click(function(){
if($(this).is(":checked")){ if($(this).is(":checked")){
$("#spanShippingBack").css("display", "block"); $("#spanShippingBack").css("display", "block");