Files
xamxam/app/templates/admin/add.php
Pontoporeia 24d68dda59 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
2026-05-07 19:43:43 +02:00

96 lines
5.3 KiB
PHP

<main id="main-content">
<div class="thesis-add-header">
<h1>Ajouter un TFE</h1>
</div>
<p class="required-note"><span class="asterisk">*</span> Champs obligatoires</p>
<form action="actions/formulaire.php" method="post" enctype="multipart/form-data" class="admin-form">
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION["csrf_token"]) ?>">
<!-- ═══════════════════ Informations du TFE ═══════════════════ -->
<?php
$oldFn = 'old';
$withAutofocusFn = 'withAutofocus';
$allowedObjet = [];
$synopsisExtra = '';
include APP_ROOT . '/templates/partials/form/fieldset-tfe-info.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
$oldFn = 'old';
$withAutofocusFn = 'withAutofocus';
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'; ?>
<!-- ═══════════════════ Métadonnées complémentaires ═══════════════════ -->
<?php
$oldFn = 'old';
$withAutofocusFn = 'withAutofocus';
include APP_ROOT . '/templates/partials/form/fieldset-metadata.php';
?>
<!-- ═══════════════════ Degrés d'ouverture et licences ═══════════════════ -->
<?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>
<legend>E-mail de confirmation</legend>
<?php $name = 'confirmation_email'; $label = 'Adresse e-mail :'; $value = old('confirmation_email'); $type = 'email'; $required = false; $placeholder = 'ton.email@exemple.be'; $hint = 'Optionnel — pour envoyer un récapitulatif de la soumission.'; $attrs = withAutofocus('confirmation_email'); include APP_ROOT . '/templates/partials/form/text-field.php'; ?>
</fieldset>
<div class="form-footer">
<button type="submit" name="go" class="btn btn--primary">Soumettre</button>
</div>
</form>
</main>