mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-11-09 19:20:09 +01:00
Add autosave draft system for partage form with HTMX-based session persistence
- New fragment endpoint POST/GET /partage/fragments/draft.php: saves all form fields to PHP session, excludes file/csrf/slug fields GET returns JSON for JS hydration on page load rotates both global CSRF and share CSRF tokens in sync - form.php accepts optional $formExtraAttrs and $showAutosaveStatus: allows injecting HTMX attributes and 'Brouillon enregistré' indicator - renderShareLinkForm adds hx-post with change/input debounce trigger, loads autosave-handler.js, hydrate fields from draft on page load - Draft cleared on successful form submission in handleShareLinkSubmission - autosave-handler.js now also updates share_link_token hidden input when rotating CSRF token (partage form uses both csrf_token and share_link_token) - Added .autosave-status CSS to form.css (was admin.css-only) - Updated fragment routing to accept GET requests (needed for draft hydration)
This commit is contained in:
1 parent
4b37a05be3
commit
99125cc8e3
33 files changed
+1388
-806
No files matched your search
@@ -2016,7 +2016,7 @@ class Database
|
||||
* Return the raw FK fields not exposed through v_theses_full string columns.
|
||||
* Returns ['license_id', 'access_type_id', 'context_note'] or null if not found.
|
||||
*
|
||||
* @return array{license_id:int|null,access_type_id:int|null,context_note:string}|null
|
||||
* @return array{license_id:int|null,access_type_id:int|null,context_note:string,contact_visible:int|null}|null
|
||||
*/
|
||||
public function getThesisRawFields(int $thesisId): ?array
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user