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

@@ -16,8 +16,30 @@
include APP_ROOT . '/templates/partials/form/fieldset-tfe-info.php';
?>
<!-- ═══════════════════ Composition du jury ═══════════════════ -->
<?php require APP_ROOT . '/templates/partials/form/jury-fieldset.php'; ?>
<!-- ═══════════════════ Langue(s) ═══════════════════ -->
<fieldset>
<legend>Langue(s)</legend>
<?php $name = 'languages'; $label = 'Langue(s) du TFE :'; $options = $languages; $checked = $formData['languages'] ?? []; $required = true; include APP_ROOT . '/templates/partials/form/checkbox-list.php'; ?>
<?php $name = 'language_autre'; $label = 'Autre(s) langue(s) :'; $value = old('language_autre'); $hint = 'Si votre TFE contient une langue absente de la liste, précisez-la ici.'; include APP_ROOT . '/templates/partials/form/text-field.php'; ?>
</fieldset>
<!-- ═══════════════════ Format(s) ═══════════════════ -->
<fieldset>
<legend>Format(s)</legend>
<?php $name = 'formats'; $label = 'Format(s) du TFE :'; $options = $formatTypes; $checked = $formData['formats'] ?? []; include APP_ROOT . '/templates/partials/form/checkbox-list.php'; ?>
</fieldset>
<!-- ═══════════════════ Mots-clés ═══════════════════ -->
<fieldset>
<legend>Mots-clés</legend>
<?php
$name = 'tag'; $label = 'Mots-clés (max 10) :'; $value = old('tag');
$placeholder = 'sociologie, anthropologie, ...';
$hint = 'Séparez par des virgules. Max 10 mots-clés.';
$attrs = withAutofocus('tag');
include APP_ROOT . '/templates/partials/form/text-field.php';
?>
</fieldset>
<!-- ═══════════════════ Cadre académique ═══════════════════ -->
<?php
@@ -26,6 +48,19 @@
include APP_ROOT . '/templates/partials/form/fieldset-academic.php';
?>
<!-- ═══════════════════ Composition du jury ═══════════════════ -->
<?php
$juryPromoteur = null;
$juryPromoteurUlb = null;
$lecteursInternes = [];
$lecteursExternes = [];
$juryPresident = null;
$showPresident = false;
$showPromoteurUlb = true;
$promoteurUlbConditional = false;
require APP_ROOT . '/templates/partials/form/jury-fieldset.php';
?>
<!-- ═══════════════════ Fichiers ═══════════════════ -->
<?php include APP_ROOT . '/templates/partials/form/fieldset-files.php'; ?>
@@ -33,12 +68,19 @@
<?php
$oldFn = 'old';
$withAutofocusFn = 'withAutofocus';
$showDescription = false;
include APP_ROOT . '/templates/partials/form/fieldset-metadata.php';
?>
<!-- ═══════════════════ Degrés d'ouverture et licences ═══════════════════ -->
<?php include APP_ROOT . '/templates/partials/form/fieldset-licence-explanation.php'; ?>
<?php
$formData = $_SESSION['form_data'] ?? [];
$libreEnabled = ($siteSettings['access_type_libre_enabled'] ?? '0') === '1';
$interneEnabled = ($siteSettings['access_type_interne_enabled'] ?? '1') === '1';
$interditEnabled = ($siteSettings['access_type_interdit_enabled'] ?? '1') === '1';
$generalitiesHtml = $helpBlocks['fieldset_generalites'] ?? '';
$defaultAccessTypeId = 2;
include APP_ROOT . '/templates/partials/form/fieldset-licence-explanation.php';
?>
<!-- ═══════════════════ E-mail de confirmation ═══════════════ -->
<fieldset>