mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fieldset-academic.php, fieldset-metadata.php and fieldset-licence-explanation.php were each calling unset($formData) (or wrong variable) in their cleanup block, destroying the variable in the parent renderShareLinkForm() scope. This caused an Undefined variable / TypeError on old($formData, ...) for any field rendered after those partials (e.g. confirmation_email at line 328). Fix: remove $formData from the unset() calls; fieldset-licence-explanation.php was also unsetting the wrong name — corrected to unset($n) which is the variable it actually declares.
2.5 KiB
2.5 KiB
TODO
Admin area cleanup
- Combine
acces-etudiante.php+file-access.phpintoacces.php(two<section>blocks) - Move
system.phpcontent intoparametres.php(system section + logs section) - Use
<section>for sections,<fieldset>only where form fields are present - Redirect legacy URLs (acces-etudiante.php, file-access.php, system.php) with 301
- Update action redirects to point to new pages
- Update admin nav header (merged 3 items → 2)
Bug fixes
- Fix
$enabledAccessTypesundefined /array_map()TypeError on edit page — controller was fetchinggetAccessTypes()instead ofgetEnabledFormAccessTypes()and returning it under the wrong key - Fix fatal TypeError:
old()called with wrong arity injury-fieldset.phppartial under partage context — removed?: nullcoercions so$juryPresident/$juryPromoteurare''notnull, keeping$addModefalse - Fix
$formDatadestroyed by included partials (fieldset-academic.php,fieldset-metadata.php,fieldset-licence-explanation.phpwere incorrectly unsetting$formData/wrong variable in caller scope)
Form help blocks — sortable admin UI
- Migration 005: add
sort_ordercolumn toform_help_blocks Database::getAllFormHelpBlocks()— ORDER BY sort_order, expose sort_order in returned dataDatabase::reorderFormHelpBlocks(array $keys)— persist new orderactions/form-help-reorder.php— HTMX POST handler (CSRF-protected, 204 response)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)
- CSS in admin.css:
.fhb-*classes for layout, cards, ghost/chosen/drag states schema.sql— updatedform_help_blocksDDL withsort_order- Vendor SortableJS 1.15.2 into
assets/js/sortable.min.js(remove CDN dependency)
CSS refactor
- Move semantic HTML element baseline styles into common.css
fieldset(background, border, padding, radius)legend(font, weight, color, transform)small(size, color, display, margin)table,th,td(collapse, sizing, spacing)dialog+::backdropdetails > summary
- Remove duplicated rules from admin.css, form.css, system.css, file-access.css
- Fix file-access.css to use real design tokens (was using undefined --border, --surface, --accent, etc.)
- Remove redundant @import url("./variables.css") from admin.css, system.css, file-access.css