Jake Vanderwerf
2026-06-29 4089ba01e0881c89a72332e13bc3a80b6bddec2a
assets/js/concise/FormController.js
@@ -485,11 +485,11 @@
               data: this.changes.get(form.id)?.changes??{},
            });
         }
         if (form.options.endpoint && !form.options.handled) {
            console.log('Submitting form...');
            await this.handleServerSave(form, this.collectFormData(form.form));
         }
      if (form.options.endpoint && !form.options.handled) {
         e.preventDefault();
         console.log('Submitting form...', this.changes.get(form.id)?.changes ?? {});
         await this.handleServerSave(form, this.changes.get(form.id)?.changes ?? {});
      }
      if (form.options.showSummary) {
@@ -526,7 +526,6 @@
      }
      if (form.tabs) {
         console.log('Updating step progress on change');
         this.updateStepProgress(form);
      }
@@ -668,7 +667,7 @@
   async handleServerSave(form, changes) {
      this.cancelServerSave(form.id);
      if (window.jvbQueue) {
      if (form.useQueue && window.jvbQueue) {
         changes.user = window.auth.getUser();
         window.jvbQueue.addToQueue({
            endpoint: form.options.endpoint,
@@ -676,9 +675,10 @@
            headers: form.options.headers??{},
         });
      } else {
         await window.auth.fetch(jvbBase.api+form.options.endpoint, {
         await window.auth.fetch(jvbSettings.api+form.options.endpoint, {
            body: changes,
            headers: form.options.headers??{},
            method: 'POST',
         });
      }
   }
@@ -694,6 +694,7 @@
         autoUpload: false,
         imageMeta: true,
         delay: 1500,
         useQueue: true,
         endpoint: Object.hasOwn(form.dataset, 'save') ? form.dataset.save: '',
         showStatus: true,
         showSummary: false,
@@ -1610,6 +1611,12 @@
      field.classList.remove('has-success');
      field.classList.add('has-error');
      field.scrollIntoView({
         behavior: "smooth",
         block: "center",
         inline: "nearest"
      });
      field.querySelector(this.inputSelectors)?.focus();
      if (item.ui.message) {
         item.ui.message.hidden = false;