feat: student mode support for thanks page (admin-auth only)

- add hidden student_mode field in add.php form
- pass mode=student through redirect to thanks.php in formulaire.php
- thanks.php renders clean student thank-you page (no header, centered button)
- add CSS for .thanks-student-page, .btn-new-form, .thanks-success, .thanks-error
- admin auth always required; student mode is purely UI variant on the physical machine
This commit is contained in:
Pontoporeia
2026-04-15 13:49:25 +02:00
parent c3affd2285
commit f4aba500e6
7 changed files with 254 additions and 81 deletions

22
TODO.md
View File

@@ -1,16 +1,10 @@
# TODO
## Paramètres page cleanup
- [x] Remove card syntax (`.admin-settings-section` border/radius containers)
- [x] Replace pill toggles with native semantic checkboxes inside `<fieldset>`
- [x] Move "delete all TFE" danger zone into Maintenance section
- [x] Use `<fieldset>` for danger zones (semantic, with `<legend>` instead of `<div>`)
- [x] Update CSS: new `.param-*` classes for flat semantic layout
- [x] Exclude parametres sections from generic `.admin-body main > section` card styling via `aria-labelledby` prefix
## Add TFE: admin/student mode toggle
- [x] Add `?mode=student` query param to same add.php page
- [x] Student mode: no admin header/nav, just the form with a back-link
- [x] Admin mode: full admin header/nav, with "Mode étudiant ↗" toggle link (opens in new tab)
- [x] Auth guard stays the same — still requires admin login
- [x] Add `.student-body`, `.thesis-add-header`, `.mode-toggle`, `.form-footer` CSS
- [x] Make thanks.php respect student mode (no header, centered "add new form" button)
- [x] Add hidden input `student_mode` in add.php form when in student mode
- [x] Append `mode=student` to thanks redirect in formulaire.php
- [x] Update thanks.php to detect student mode, hide header, show centered button
- [x] Cleanup public/admin/add.php — standardise fieldsets and add licence explanation sections from docs PDF
- [x] Organise all fields into `<fieldset>/<legend>` blocks: Informations du TFE, Composition du jury, Cadre académique, Fichiers, Métadonnées complémentaires
- [x] Remove double-wrapping of jury-fieldset (it has its own `<fieldset>`)
- [x] Add "Degrés d'ouverture et licences" section (Libre / Interne / Interdit + Généralités) wrapped in `if ($studentMode)` — hidden in admin