説明なし

add_customer.html 612B

1234567891011121314151617181920212223
  1. <script>
  2. function submit_new_customer() {
  3. $.ajax({
  4. url: '/customer/add',
  5. type: "POST",
  6. data: $('form#form_new_customer').serialize(),
  7. dataType: "json",
  8. success: function (data) {
  9. jsdata = data;
  10. if (jsdata.status == "success") {
  11. $('#modal_add_customer').modal();
  12. notify_success(jsdata.message);
  13. } else {
  14. $('#modal_customer_message').text(jsdata.message);
  15. }
  16. },
  17. error: function (error) {
  18. notify_error(error);
  19. }
  20. });
  21. }
  22. </script>