refactor form structure per new spec + fix

- split jury into interne/externe/ULB,
- remove president from student form,
- add language_autre,
- split duration into pages+minutes+annexes,
- move licence to degrés d'ouverture with CC2r,
- add license_custom,
- filter PACS from student AP list,
- editable généralités help block,
- Libre toggle per settings

Fix:
- missing comma after cc4r column in schema.sql
- remove duplicate form footer from partage template
- remove couverture from student files fieldset; add promoteur ULB conditional disable via JS on Approfondi
- promoteur ULB: remove 'si applicable', make required when visible
This commit is contained in:
Pontoporeia
2026-05-07 17:52:46 +02:00
parent dce0e0b301
commit 24d68dda59
21 changed files with 694 additions and 381 deletions

View File

@@ -2,11 +2,11 @@
/**
* Shared partial — "Fichiers" fieldset (add / student submission mode).
*
* Renders upload inputs for cover image, banner image, and TFE files.
* TFE files support multiple file types (PDF, image, audio, video, other),
* drag-to-reorder via SortableJS, and per-file label input.
*
* For the edit form, the existing-files management is inline in edit.php.
* Order per spec:
* 1. Image de bannière (optionnel)
* 2. Note d'intention (obligatoire)
* 3. TFE (obligatoire)
* 4. Annexes éventuelles (optionnel)
*
* Variables consumed: none beyond APP_ROOT (always available).
*/
@@ -14,33 +14,33 @@
<fieldset>
<legend>Fichiers</legend>
<?php
$name = 'couverture';
$label = 'Image de couverture :';
$accept = 'image/jpeg,image/png';
$hint = 'JPG, PNG. Taille max : 20 MB.';
include APP_ROOT . '/templates/partials/form/file-field.php';
?>
<?php
$name = 'banner';
$label = 'Image bannière (accueil) :';
$label = 'Image de bannière (optionnel) :';
$accept = 'image/jpeg,image/png,image/webp';
$hint = 'JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 20 MB.';
include APP_ROOT . '/templates/partials/form/file-field.php';
?>
<?php
$name = 'note_intention';
$label = 'Note d\'intention :';
$accept ='.pdf';
$hint = 'Format PDF uniquement.';
$required = true;
include APP_ROOT . '/templates/partials/form/file-field.php';
?>
<!-- TFE files — multi-file, sortable, with per-file labels -->
<div class="admin-form-group admin-files-fieldgroup">
<label>Fichiers du TFE :</label>
<label>TFE (obligatoire) :</label>
<div class="admin-file-input">
<input type="file" id="tfe-files-input"
name="files[]" multiple
accept=".pdf,.jpg,.jpeg,.png,.gif,.webp,.mp4,.webm,.mov,.ogv,.mp3,.ogg,.oga,.wav,.flac,.aac,.m4a,.zip,.tar,.gz,.vtt"
class="tfe-file-picker">
<small class="admin-file-hint">
Types acceptés : PDF · JPG/PNG/GIF/WEBP · MP4/WebM/MOV (vidéo) · MP3/OGG/WAV/FLAC (audio) · ZIP/TAR (archives) · autres fichiers (téléchargement uniquement).
Max 500 MB par fichier.
Types acceptés : PDF · JPG/PNG/GIF/WEBP · MP4/WebM/MOV (vidéo) · MP3/OGG/WAV/FLAC (audio) · ZIP/TAR (archives). Max 500 MB par fichier.
Les fichiers <code>.vtt</code> sont des sous-titres et seront associés automatiquement à la vidéo précédente.
</small>
@@ -51,4 +51,13 @@
<p id="tfe-file-queue-empty" class="tfe-queue-empty">Aucun fichier sélectionné.</p>
</div>
</div>
<?php
$name = 'annexes';
$label = 'Annexes éventuelles (optionnel) :';
$accept = '.pdf,.zip,.tar,.gz';
$hint = 'PDF ou archives ZIP/TAR.';
$multiple = true;
include APP_ROOT . '/templates/partials/form/file-field.php';
?>
</fieldset>