View Issue Details

IDProjectCategoryView StatusLast Update
0001963Composrcorepublic2017-11-27 17:24
ReporterChris GrahamAssigned ToSalman 
SeverityFeature-request 
Status resolvedResolutionfixed 
Product Version 
Fixed in Version 
Summary0001963: Rewrite form submission as explicit rather than than using onsubmit, when JS enabled - and other changes
DescriptionBrowsers are deprecating synchronous AJAX, which means we can no longer do form validation with server-side checks as a part of onsubmit handling.

Instead we will have to make a click initiate checks then submit the form itself when done.

That means major re-architecting.

Additionally there other cases where we are using synchronous AJAX for safety reasons and we may need to implement JavaScript modality and progress spinners to handle this, as a safe alternative.
TagsType: Standards compliance
Time estimation (hours)32
Sponsorship open

Relationships

related to 0002005 non-assigned Web standards refresh 
related to 0003320 closedChris Graham [Deprecation] Synchronous XMLHttpRequest 

Activities

Chris Graham

2017-04-28 14:20

administrator   ~0005034

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.

Salman

2017-08-11 04:54

reporter   ~0005185

Last edited: 2017-08-11 04:59

View 2 revisions

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.

Issue History

Date Modified Username Field Change
2016-12-08 12:17 Chris Graham Tag Attached: Type: Standards compliance
2017-04-28 14:18 Chris Graham Assigned To => Salman
2017-04-28 14:18 Chris Graham Status non-assigned => assigned
2017-04-28 14:20 Chris Graham Note Added: 0005034
2017-07-11 23:09 Chris Graham Relationship added related to 0003320
2017-08-11 04:54 Salman Note Added: 0005185
2017-08-11 04:59 Salman Note Edited: 0005185 View Revisions
2017-11-27 17:24 Chris Graham Status assigned => resolved
2017-11-27 17:24 Chris Graham Resolution open => fixed