fix: TFE and annexes files not saved, plus keyword validation and file preview CSS

- ThesisCreateController::submit() was missing call to handleAnnexeFiles
- ThesisEditController::save() was missing annexe upload handling
- handleAnnexeFiles now applies ALLOWED_MIME_TYPES/ALLOWED_EXTENSIONS validation
  (same restrictions as TFE files, formerly only size was checked)
- Use correct $_FILES key 'annexes' (matching the form input name)
- Relax keyword minimum: admin create/edit require 1+, student (partage) requires 3
- Add CSS styles for file preview items (.fp-item, .fp-thumb, .fp-icon,
  .fp-meta, .fp-name, .fp-size) so multi-file previews (annexes, etc.) wrap correctly
- Fix TFE file input accept attribute in fichiers-fragment.php to include
  video/audio/archive extensions
This commit is contained in:
Pontoporeia
2026-05-10 15:14:25 +02:00
parent 38dc8de9d8
commit a1a5d4609f
7 changed files with 102 additions and 6 deletions

View File

@@ -27,3 +27,10 @@
- [x] On validation error, append "envoyez un e-mail à xamxam@erg.be" to flash error message
- [x] Preserve uploaded file names across validation redirects: store in session, display as warning on re-render so the student knows which files to re-select
- [x] Obfuscate all email addresses and mailto: links as HTML decimal entities site-wide (EmailObfuscator class, applied in templates + Parsedown post-processing)
- [x] Fix TFE and annexes files not saved in ThesisCreateController::submit(): call handleAnnexeFiles, fix file input name mapping
- [x] Apply ALLOWED_MIME_TYPES/ALLOWED_EXTENSIONS validation in handleAnnexeFiles (same as handleTfeFiles)
- [x] Fix handleAnnexeFiles to use correct $_FILES key ('annexes' not 'files')
- [x] Add annexe handling in ThesisEditController::save()
- [x] Relax 3-keyword minimum: admin mode (create) requires 1+, edit requires 1+, student (partage) requires 3
- [x] Add CSS for file preview items (.fp-item, .fp-thumb, .fp-icon, .fp-meta, .fp-name, .fp-size) so annexes/cover/note-intention previews wrap and display correctly
- [x] Fix TFE file input accept attribute to include video/audio/archive extensions