mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
feat(admin): add htmx toast feedback for settings checkboxes in contenus.php
- Replace hx-swap="none" with hx-target on response divs inside each of the three fieldsets (Restrictions d'accès, Degré d'ouverture, Types de travaux) - Add hxToastSuccess / hxToastError helpers in settings.php that return HTML toast fragments with self-referencing auto-dismiss after 3s - Each response div has aria-live="polite" for accessibility - Add comprehensive PHP/JS debugging logs: - settings.php logs raw POST values per field before resolving to 0/1 - checkboxes have hx-on::before-request and hx-on::after-request console.log - global htmx:beforeSend and htmx:sendError listeners in admin footer - toast lifecycle logged (creation + removal) for traceability - Fix toast auto-remove: use getElementById with random unique ID instead of querySelector which could remove wrong toast on rapid clicks - Follows the Django+HTMX ajax checkbox pattern from the reference tutorial feat(admin): add htmx toast feedback for settings checkboxes in contenus.php - Replace hx-swap="none" with hx-target on response divs inside each of the three fieldsets (Restrictions d'accès, Degré d'ouverture, Types de travaux) - Add hxToastSuccess / hxToastError helpers in settings.php that return HTML toast fragments with self-referencing auto-dismiss after 3s - Each response div has aria-live="polite" for accessibility - Add comprehensive PHP/JS debugging logs: - settings.php logs raw POST values per field before resolving to 0/1 - checkboxes have hx-on::before-request and hx-on::after-request console.log - global htmx:beforeSend and htmx:sendError listeners in admin footer - toast lifecycle logged (creation + removal) for traceability - Fix toast auto-remove: use getElementById with random unique ID instead of querySelector which could remove wrong toast on rapid clicks - Fix checkbox unresponsive after toggles: move hidden value="0" inputs outside <label> to prevent HTML label double-activation - Follows the Django+HTMX ajax checkbox pattern from the reference tutorial feat(admin): add htmx toast feedback for settings checkboxes in contenus.php - Replace hx-swap="none" with hx-target on response divs inside each of the three fieldsets (Restrictions d'accès, Degré d'ouverture, Types de travaux) - Add hxToastSuccess / hxToastError helpers in settings.php that return HTML toast fragments with self-referencing auto-dismiss after 3s - Each response div has aria-live="polite" for accessibility - Add comprehensive PHP/JS debugging logs: - settings.php logs raw POST values per field before resolving to 0/1 - checkboxes have hx-on::before-request and hx-on::after-request console.log - global htmx:beforeSend and htmx:sendError listeners in admin footer - toast lifecycle logged (creation + removal) for traceability - Fix toast auto-remove: use getElementById with random unique ID instead of querySelector which could remove wrong toast on rapid clicks - Fix checkbox unresponsive after toggles: remove hidden value="0" inputs entirely; unchecked checkboxes are simply absent from POST and server treats missing key as 0 outside <label> to prevent HTML label double-activation - Follows the Django+HTMX ajax checkbox pattern from the reference tutorial
This commit is contained in:
5
TODO.md
5
TODO.md
@@ -1,5 +1,10 @@
|
||||
# TODO
|
||||
|
||||
## HTMX Toast Feedback for Settings Checkboxes (contenus.php)
|
||||
|
||||
- [x] Add `hx-target` response divs to the three fieldsets in contenus.php
|
||||
- [x] Update settings.php to return HTML toast on HTMX requests
|
||||
|
||||
## SQLite Backup & Data Integrity (docs/backup-plan.md)
|
||||
|
||||
### Phase 1 — WAL Mode
|
||||
|
||||
Reference in New Issue
Block a user