/* When user click on "submit" button. Update the UI to provide some feedback. */
jQuery(function() {
  $('.modal').closest('form').on('submit', function() {
      this.submit();
      const form = $(this);
      // Provide user feedback.
      form.addClass('ssp-modal-submitting').removeClass('ssp-modal-idle');
      // Disable submit & cancel button
      form.find("button[type='submit']").prop('disabled', true);
  });
});
