centralise form fieldsets into shared partials; add TODO stubs in partage form

This commit is contained in:
Pontoporeia
2026-04-29 20:59:35 +02:00
parent 0628efbba3
commit d665cb502d
9 changed files with 506 additions and 339 deletions

View File

@@ -0,0 +1,18 @@
<?php
/**
* Shared partial — "Fichiers" fieldset (add / student submission mode).
*
* This renders simple upload inputs with no existing-file management (that is
* handled by the edit-specific template). For the edit form, include the
* edit-specific files section directly in the template instead of this partial.
*
* Variables consumed: none beyond APP_ROOT (always available).
*/
?>
<fieldset>
<legend>Fichiers</legend>
<?php $name = 'couverture'; $label = 'Image de couverture :'; $accept = 'image/jpeg,image/png'; $hint = 'JPG, PNG. Taille max : 10 MB.'; include APP_ROOT . '/templates/partials/form/file-field.php'; ?>
<?php $name = 'banner'; $label = 'Image bannière (accueil) :'; $accept = 'image/jpeg,image/png,image/webp'; $hint = 'JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.'; include APP_ROOT . '/templates/partials/form/file-field.php'; ?>
<?php $name = 'files'; $label = 'Fichiers du TFE :'; $accept = '.pdf,.jpg,.jpeg,.png,.mp4,.zip,.vtt'; $hint = 'PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier. Pour les vidéos, un fichier .vtt de sous-titres peut être joint (il sera associé automatiquement à la vidéo correspondante).'; $multiple = true; include APP_ROOT . '/templates/partials/form/file-field.php'; ?>
</fieldset>