Add auto save of proposal description
We should investigate if we would like to add a way where the proposal or at least the description of a proposal is saved automatically and can be recovered. We should make sure that new proposals do not override the save / that multiple old versions can be recovered.
- Could be a separate table with drafts, or a special status on project (skip validations in draft mode, hide in management panel)
Table "Drafts"
- id
- user
- type (string)
- data (json string)
- query parameters
- form data
Make it generic in some way so that it can be used in other places too (e.g. themes / thesis projects)
Send an ajax request to save draft every 30 seconds, or when changing focus.
Serialize and deserialize client-side. (no server side deserialization for security reasons)
Using JS append draft id to form and to URL (to prevent multiple drafts from being created by refreshing)
After creating project, delete draft (check permissions)
Could have: indicator at the top to show whether the form is auto saved.
Tip: QPixel has auto save functionality, perhaps look into that.