Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve behaviour of ajax saving #361

merged 4 commits into from Jan 30, 2015


Copy link

@fofr fofr commented Jan 29, 2015

  • When adding a new part, it would immediately display with validation errors. Remove these messages.
  • Prevent loading of the ajax-save module on archived, scheduled and published editions. Neither of these can be edited so we don't need to setup all the listeners etc.
  • Give better error feedback when there is a message relating to the whole form, this is a base error. (eg "Archived editions can't be saved")
  • Prevent multiple form saves from being requested while an ajax request is in progress (unlikely from the save button as this is obscured, but a user could hit the keyboard shortcut a few times)

(Weirdly @resource.locked_for_edits? in content models doesn't include archived editions. Currently, and it must have been like this for a while, all form fields on archived editions appear editable but when attempting to save will raise an error.)

fofr added 4 commits Jan 29, 2015
When a part gets added, it appears with error messages about missing
titles and slugs. These aren’t appropriate yet, and should be removed.
They will still show again should validation failed.

Using client side to handle this as on the server side it’s difficult
to differentiate between a just added part and a just added part that
has not passed validation checks on save.
Users shouldn’t be able to save published or archived editions.
When there’s a base error message that applies to the whole form,
include it at the end of the save dialogue.
Avoid submitting the form multiple times while waiting for a request to
finish. eg by pressing cmd+s multiple times.
vinayvinay added a commit that referenced this pull request Jan 30, 2015
@vinayvinay vinayvinay merged commit 80089fb into master Jan 30, 2015
1 check passed
1 check passed
default "Build #622 succeeded on Jenkins"
@vinayvinay vinayvinay deleted the hide-validations-on-new-part branch Jan 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.