This commit is contained in:
22
iris-web/source/app/templates/modals/add_customer.html
Normal file
22
iris-web/source/app/templates/modals/add_customer.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<script>
|
||||
function submit_new_customer() {
|
||||
$.ajax({
|
||||
url: '/customer/add',
|
||||
type: "POST",
|
||||
data: $('form#form_new_customer').serialize(),
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
jsdata = data;
|
||||
if (jsdata.status == "success") {
|
||||
$('#modal_add_customer').modal();
|
||||
notify_success(jsdata.message);
|
||||
} else {
|
||||
$('#modal_customer_message').text(jsdata.message);
|
||||
}
|
||||
},
|
||||
error: function (error) {
|
||||
notify_error(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
Reference in New Issue
Block a user