schema: validate against new TFE field spec

- add exemplaire_baiu, exemplaire_erg, cc4r, remarks;
- add is_ulb to jury;
- split jury_lecteurs into interne/externe in view;
- refactor admin edit form with backoffice fields;
- update public fiche to show promoteur ULB and split lecteurs
This commit is contained in:
Pontoporeia
2026-05-07 17:30:34 +02:00
parent 7793b6f86d
commit dce0e0b301
18 changed files with 280 additions and 38 deletions

View File

@@ -44,6 +44,7 @@
$juryPresident = null;
$juryPromoteur = null;
$juryPromoteurExt = 0;
$juryPromoteurUlb = 0;
$juryLecteurs = [];
foreach ($jury as $jm) {
if ($jm['role'] === 'president') {
@@ -51,6 +52,7 @@
} elseif ($jm['role'] === 'promoteur') {
$juryPromoteur = $jm['name'];
$juryPromoteurExt = (int)$jm['is_external'];
$juryPromoteurUlb = (int)($jm['is_ulb'] ?? 0);
} elseif ($jm['role'] === 'lecteur') {
$juryLecteurs[] = $jm;
}
@@ -216,8 +218,54 @@
include APP_ROOT . '/templates/partials/form/fieldset-metadata.php';
?>
<!-- ═══════════════════ Note contextuelle ═══════════════════ -->
<!-- ═══════════════════ Backoffice ═══════════════════ -->
<fieldset>
<legend>Backoffice</legend>
<div class="admin-form-group">
<label for="jury_points">Points :</label>
<input type="number" id="jury_points" name="jury_points"
value="<?= htmlspecialchars($currentRaw['jury_points'] ?? '') ?>"
step="0.01" min="0" max="20" placeholder="sur 20">
<small>Note du jury (interne, non visible publiquement).</small>
</div>
<div class="admin-form-group">
<label for="remarks">Remarques :</label>
<textarea id="remarks" name="remarks" rows="4"><?= htmlspecialchars($currentRaw['remarks'] ?? '') ?></textarea>
<small>Notes internes (non visibles publiquement).</small>
</div>
<div class="admin-form-group">
<label class="admin-checkbox-label">
<input type="checkbox" name="exemplaire_baiu" value="1"
<?= !empty($currentRaw['exemplaire_baiu']) ? 'checked' : '' ?>>
Exemplaire physique BAIU
</label>
<small>Case logistique : cocher si un exemplaire physique est disponible à la BAIU.</small>
</div>
<div class="admin-form-group">
<label class="admin-checkbox-label">
<input type="checkbox" name="exemplaire_erg" value="1"
<?= !empty($currentRaw['exemplaire_erg']) ? 'checked' : '' ?>>
Exemplaire physique ERG
</label>
<small>Case logistique : cocher si un exemplaire physique est disponible à l'ERG.</small>
</div>
<div class="admin-form-group">
<label class="admin-checkbox-label">
<input type="checkbox" name="cc4r" value="1"
<?= !empty($currentRaw['cc4r']) ? 'checked' : '' ?>>
CC4r accepté
</label>
<small>Conditions collectives de réutilisation.</small>
</div>
</fieldset>
<!-- ═══════════════════ Note contextuelle ═══════════════════ -->
<fieldset id="section-context-note">
<legend>Note contextuelle</legend>
<div>
<label for="context_note">Note contextuelle :</label>