mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Extract shared TFE form partial — single source of truth for add/edit/partage
Created templates/partials/form/form.php as the unified form template driven by
$mode ('add'|'edit'|'partage') and boolean flags for optional sections.
The three calling templates (templates/admin/add.php, templates/admin/edit.php,
partage/index.php renderShareLinkForm) now only set variables then include the
shared partial. ~200 lines of duplicated fieldset HTML eliminated.
This commit is contained in:
7
TODO.md
7
TODO.md
@@ -1,5 +1,12 @@
|
||||
# XAMXAM TODO
|
||||
|
||||
## Extract shared TFE form partial (single source of truth)
|
||||
- [x] Create `templates/partials/form/form.php` — unified form with `$mode`-driven conditionals
|
||||
- [x] Refactor `templates/admin/add.php` → thin wrapper setting variables + including form partial
|
||||
- [x] Refactor `templates/admin/edit.php` → thin wrapper with unified `$oldFn` + form partial
|
||||
- [x] Refactor `partage/index.php` → `renderShareLinkForm()` delegates to form partial
|
||||
- [x] Test all three forms render correctly (add, edit, partage) — syntax verified, logic reviewed
|
||||
|
||||
## Fix password-protected share links — form never loads after password entry
|
||||
- [x] `partage/index.php` — main GET handler: check `$_SESSION['share_verified_' . $slug]` before showing password gate; skip to form if already verified
|
||||
- [x] `partage/index.php` — add `error_log()` calls throughout password flow (gate entry, hash state, verification result, session check) for debugging
|
||||
|
||||
Reference in New Issue
Block a user