mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
feat(admin): sortable form-help blocks with two-panel UI
- Migration 005: add sort_order column to form_help_blocks - Database: getAllFormHelpBlocks orders by sort_order; new reorderFormHelpBlocks() - actions/form-help-reorder.php: HTMX POST handler, CSRF-validated, 204 response - templates/admin/contenus.php: replace flat table with two-panel layout - Left: SortableJS 1.15.2 + htmx drag-and-drop ordered block cards - Right: static form structure reference showing fieldsets and their inputs - admin.css: .fhb-* styles for layout, cards, ghost/chosen/drag states, anchors - schema.sql: updated form_help_blocks DDL with sort_order column
This commit is contained in:
13
TODO.md
13
TODO.md
@@ -13,6 +13,19 @@
|
||||
|
||||
- [x] Fix `$enabledAccessTypes` undefined / `array_map()` TypeError on edit page — controller was fetching `getAccessTypes()` instead of `getEnabledFormAccessTypes()` and returning it under the wrong key
|
||||
|
||||
## Form help blocks — sortable admin UI
|
||||
|
||||
- [x] Migration 005: add `sort_order` column to `form_help_blocks`
|
||||
- [x] `Database::getAllFormHelpBlocks()` — ORDER BY sort_order, expose sort_order in returned data
|
||||
- [x] `Database::reorderFormHelpBlocks(array $keys)` — persist new order
|
||||
- [x] `actions/form-help-reorder.php` — HTMX POST handler (CSRF-protected, 204 response)
|
||||
- [x] `templates/admin/contenus.php` — replace table with two-panel layout:
|
||||
- Left: SortableJS + htmx drag-and-drop card list
|
||||
- Right: static form structure reference (fieldsets + inputs)
|
||||
- [x] CSS in admin.css: `.fhb-*` classes for layout, cards, ghost/chosen/drag states
|
||||
- [x] `schema.sql` — updated `form_help_blocks` DDL with `sort_order`
|
||||
- [x] Vendor SortableJS 1.15.2 into `assets/js/sortable.min.js` (remove CDN dependency)
|
||||
|
||||
## CSS refactor
|
||||
|
||||
- [x] Move semantic HTML element baseline styles into common.css
|
||||
|
||||
Reference in New Issue
Block a user