update confirm box
This commit is contained in:
@@ -494,22 +494,7 @@
|
||||
// data: 'order_id='+ order_id,
|
||||
success: function (result) {
|
||||
if (!result.status) {
|
||||
/*$.confirm({
|
||||
title: 'Infomation!',
|
||||
content: result.error_message,
|
||||
buttons: {
|
||||
confirm: {
|
||||
text: 'Ok',
|
||||
btnClass: 'btn-green',
|
||||
action: function () {
|
||||
window.location.href = '/origami';
|
||||
}
|
||||
}
|
||||
}
|
||||
});*/
|
||||
|
||||
swal("Good job!", "You clicked the button!", "success");
|
||||
|
||||
swal("Infomation!", result.error_message);
|
||||
}
|
||||
else {
|
||||
location.reload();
|
||||
@@ -594,20 +579,17 @@
|
||||
});
|
||||
|
||||
$('#void').on('click', function () {
|
||||
var sure = confirm("Are you sure want to Void");
|
||||
if (sure == true) {
|
||||
var sale_id = $('#sale_id').val();
|
||||
var ajax_url = "/origami/sale/" + sale_id + '/void';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: ajax_url,
|
||||
success: function () {
|
||||
window.location.href = '/origami/';
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
||||
}
|
||||
swal({
|
||||
title: "Alert",
|
||||
text: "Are you sure want to Void?",
|
||||
type: "warning",
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: "#DD6B55",
|
||||
confirmButtonText: "Yes, void it!",
|
||||
closeOnConfirm: false
|
||||
}, function () {
|
||||
window.location.href = '/origami/';
|
||||
});
|
||||
});
|
||||
|
||||
$('#add_order').on('click', function () {
|
||||
|
||||
Reference in New Issue
Block a user