update confirm box
This commit is contained in:
@@ -360,7 +360,7 @@
|
||||
$( "#loading_wrapper" ).show();
|
||||
|
||||
if($('#balance').text() > 0){
|
||||
alert(" Insufficient Amount!")
|
||||
swal ( "Oops" , "Insufficient Amount!" , "error" );
|
||||
$( "#loading_wrapper" ).hide();
|
||||
}else{
|
||||
var sale_id = $('#sale_id').text();
|
||||
@@ -389,33 +389,19 @@
|
||||
}
|
||||
$( "#loading_wrapper" ).hide();
|
||||
if($('#balance').text() < 0){
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
content: 'Changed amount ' + $('#balance').text() * (-1),
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green',
|
||||
action: function(){
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
}
|
||||
}
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
text: 'Changed amount ' + $('#balance').text() * (-1),
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}else{
|
||||
$('#pay').text("Pay")
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
content: 'Thank you !',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green',
|
||||
action: function(){
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
}
|
||||
}
|
||||
$('#pay').text("Pay");
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -424,20 +410,20 @@
|
||||
});
|
||||
|
||||
$('#void').on('click',function () {
|
||||
var sure = confirm("Are you sure want to Void");
|
||||
if (sure == true) {
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
text: 'Are you sure want to Void !',
|
||||
}, function () {
|
||||
var sale_id = $('#sale_id').text();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
success: function () {
|
||||
window.location.href = '/origami/';
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
success: function () {
|
||||
window.location.href = '/origami/';
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
@@ -472,18 +458,11 @@
|
||||
$( "#loading_wrapper" ).hide();
|
||||
|
||||
if (cash > 0) {
|
||||
$.confirm({
|
||||
title: 'Infomation!',
|
||||
content: 'Thank you !',
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green',
|
||||
action: function(){
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
}
|
||||
}
|
||||
swal({
|
||||
title: "Infomation!",
|
||||
text: 'Thank You !',
|
||||
}, function () {
|
||||
window.location.href = '/origami';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user