add double click event for all payment
This commit is contained in:
@@ -169,6 +169,7 @@
|
||||
var amount = $('#amount').text();
|
||||
var sale_id = "<%= @sale_id %>";
|
||||
if(parseFloat(amount) <= parseFloat($("#validamount").attr("value")) && amount > 0){
|
||||
$(this).off("click");
|
||||
$.ajax({type: "POST",
|
||||
url: "<%= origami_payment_credit_path %>",
|
||||
data: "amount="+ amount + "&sale_id="+ sale_id,
|
||||
@@ -177,7 +178,11 @@
|
||||
swal({
|
||||
title: "Information!",
|
||||
text: "Payment Success",
|
||||
type: "success"
|
||||
type: "success",
|
||||
html: true,
|
||||
closeOnConfirm: false,
|
||||
closeOnCancel: false,
|
||||
allowOutsideClick: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/sale/'+ sale_id + "/payment";
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user