#1963 - Rewrite form submission as explicit rather than than using onsubmit, when JS enabled - and other changes

This is a spacer post for a website comment topic. The content this topic relates to: #1963 - Rewrite form submission as explicit rather than than using onsubmit, when JS enabled - and other changes
Form submission is integrated with some synchronous AJAX checks, and with plUpload. It's very complicated messy code. plUpload will stall a form submission while files on the form upload, then it will automatically trigger re-submission. To trigger re-submission it must re-call form validation code (as form may have been changed since submit was clicked).

Also the attachment code is extremely complicated.

All needs to be reviewed.
All synchronous AJAX and form validation code has been rewritten to be fully asynchronous, using ES6 Promises where appropriate. (Composr is now fully synchronous-free).

I haven't implemented any additional progress spinners or modals. Please have a look and guide where we might need them now. For forms we currently disable the submit button once pressed, this is more than 99% of the web does really.

BTW I am not a fan of the current dated code used for the <img> based progress spinners. We can have wholy CSS ones now, which can simply be triggered by adding a CSS class to the element being loaded. Tie that in with Promises and we can make it automatic, and not even have to deal with the hassle of adding/removing the class manually every time.

P.S: You may also want to review the work log.

0 guests and 0 members have recently viewed this.