-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement auto-recover functionality [B: 1403] #483
base: dev
Are you sure you want to change the base?
Conversation
This may change
Update for bug in `setDate` (in `set-field-values`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work Dave, this is looking really good. I've made a few minor comments so far. I'd also like to test it in practice, but I'm getting Uncaught (in promise) TypeError: crypto.subtle is undefined
- any ideas?
src/frontend/components/form-group/autosave/lib/autosaveBase.ts
Outdated
Show resolved
Hide resolved
# mandatory values to be empty. This is because a field may have | ||
# since been made mandatory, and we don't want this to cause the | ||
# autosave recovery to fail | ||
$options{force_mandatory} = 1 if param 'autosave'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern about this is that there is then a user way to always override mandatory (if they know what they are doing) - then can just add this parameter to any form submission. We probably need a way of tightening this, or preferably there would be a way of notifying the user that a saved value is now mandatory?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm honest, I'm having some trouble with this one. I don't quite know whether it would be best to check the fields are mandatory (and blank) in the JS and provide feedback in the auto-recover modal or to have a better check (maybe using the user_key
rather than just checking the param is 1) backend to ensure this is only called in the correct circumstances. Suggestions welcomed!!
Also moved ID for current record out of Curval condition
No description provided.