batchedit.ui.js 784 B

123456789101112131415161718192021222324252627282930
  1. $(document).ready(function()
  2. {
  3. $('form').on('submit', function(e)
  4. {
  5. e.preventDefault();
  6. $.ajax(
  7. {
  8. type: 'POST',
  9. url: $.createLink('auditcl', 'batchEdit', `groupID=${groupID}`),
  10. data: $('#batchEditForm').serialize(),
  11. dataType: 'json',
  12. success: data =>
  13. {
  14. if(data.result == 'success')
  15. {
  16. window.location.href = data.load;
  17. }
  18. else
  19. {
  20. zui.Modal.alert(data.message)
  21. }
  22. },
  23. complete: () =>
  24. {
  25. $('#batchEditForm').find('button[type="submit"]').removeAttr('disabled');
  26. }
  27. });
  28. });
  29. });