//https://codepen.io/UzBekNo1/pen/qBoRPLK
let lots_of_stuff_already_done = false;
$('#form_send_pay').submit(function (e) {
if (lots_of_stuff_already_done) {
lots_of_stuff_already_done = false; // reset flag
return; // let the event bubble away
}
e.preventDefault(); // prevent default click action from happening
Swal.fire({
text : "Cheking",
icon : 'warning',
showCancelButton : true,
confirmButtonColor: '#3085d6',
cancelButtonColor : '#d33',
confirmButtonText : 'Ha!',
cancelButtonText : 'Yoq'
}).then((result) => {
// return !!result.isConfirmed;
if (result.isConfirmed) {
lots_of_stuff_already_done = true; // set flag
$('#form_send_pay').submit();
}
});
});