submit.js 828 B

12345678910111213141516171819202122
  1. $(document).on('submit', '.form-prevent-multiple-submits', function (event) {
  2. $(this).find('.button-prevent-multiple-submits').attr('disabled', true)
  3. $(this).find('.spinner').css('display', 'inline-block')
  4. })
  5. $(document).on('click', '.spinner-btn', function () {
  6. $('#pace-progress-panel').attr('hidden', false)
  7. })
  8. $(document).on('click', '.modal-spinner-btn', function () {
  9. $('#pace-progress-modal-panel').attr('hidden', false)
  10. })
  11. function click_submit_btn($this, disabled = true) {
  12. if (disabled) {
  13. $($this).find('.button-prevent-multiple-submits').attr('disabled', true)
  14. $($this).find('.spinner').css('display', 'inline-block')
  15. } else {
  16. $($this).find('.button-prevent-multiple-submits').attr('disabled', false)
  17. $($this).find('.spinner').css('display', 'none')
  18. }
  19. }