-
= htmlspecialchars($label) ?>
+
= htmlspecialchars($label) ?>= $required ? ' *' : '' ?>
-
-
+
+
+
+
diff --git a/app/templates/partials/form/fieldset-licence-explanation.php b/app/templates/partials/form/fieldset-licence-explanation.php
index f8c90a2..7521e64 100644
--- a/app/templates/partials/form/fieldset-licence-explanation.php
+++ b/app/templates/partials/form/fieldset-licence-explanation.php
@@ -1,52 +1,40 @@
- $d);
-$withAutofocusFn = $withAutofocusFn ?? fn($field, $attrs = []) => $attrs;
-$formData = $formData ?? [];
-$defaultAccessTypeId = $defaultAccessTypeId ?? 2;
-$showDescription = $showDescription ?? false;
-
-$accessOptions = array_map(function ($at) use ($showDescription) {
- $label = $at['name'];
- if ($showDescription && !empty($at['description'])) {
- $label .= ' — ' . $at['description'];
- }
- return ['id' => $at['id'], 'name' => $label];
-}, $enabledAccessTypes);
-
-$selectedAccessType = isset($formData['access_type_id'])
- ? (int) $formData['access_type_id']
- : $defaultAccessTypeId;
+$oldFn = $oldFn ?? (function_exists('old') ? 'old' : fn($k, $d = '') => $d);
+$withAutofocusFn = $withAutofocusFn ?? fn($field, $attrs = []) => $attrs;
+$formData = $formData ?? [];
?>
1 a radio group
* is shown; when count === 1 a hidden input is emitted instead.
- * Omit or pass [] to suppress the objet selector entirely.
- * array $formData — raw form data array (used for contact_public checkbox state).
- * string $synopsisExtra — optional HTML block injected after the synopsis label
- * (use for student-facing explanations).
- * bool $isAdminMode — when true the form uses admin-style helpers; default false.
+ * array $formData — raw form data array (used for checkbox states).
+ * string $synopsisExtra — optional HTML block injected after the synopsis label.
*/
$oldFn = $oldFn ?? (function_exists('old') ? 'old' : fn($k, $d = '') => $d);
@@ -45,37 +42,29 @@ $synopsisExtra = $synopsisExtra ?? '';
'name']);
+ $hint = 'Séparez les auteur·ices par des virgules.';
include APP_ROOT . '/templates/partials/form/text-field.php';
?>
'email'];
+ $hint = 'Ce contact sera visible publiquement sur la fiche du TFE.';
include APP_ROOT . '/templates/partials/form/text-field.php';
?>
-
-
- Si coché, votre contact apparaîtra sur la page publique. L'adresse est toujours conservée en interne.
-
-
-
+
= $synopsisExtra ?>
diff --git a/app/templates/partials/form/file-field.php b/app/templates/partials/form/file-field.php
index 11a4088..dfaf92f 100644
--- a/app/templates/partials/form/file-field.php
+++ b/app/templates/partials/form/file-field.php
@@ -7,24 +7,27 @@
* string $label — visible label text
* string $accept — MIME types / extensions for the accept attribute (e.g. 'image/jpeg,image/png')
* string|null $hint — optional hint shown in
below the input
+ * bool $required — whether the field is required; default false
* bool $multiple — whether to allow multiple file selection; default false
* string|null $id — override the id attribute (defaults to $name)
*/
$accept = $accept ?? '';
$hint = $hint ?? null;
+$required = $required ?? false;
$multiple = $multiple ?? false;
$id = $id ?? $name;
$previewId = 'fp-' . htmlspecialchars($id);
?>
-
+
string, 'is_external' => int]
+ * $juryPromoteur string|null Promoteur interne name
+ * $juryPromoteurUlb string|null Promoteur ULB name
+ * $lecteursInternes array [{name: string}]
+ * $lecteursExternes array [{name: string}]
+ * $juryPresident string|null President name (edit-only, optional)
+ * $showPresident bool Show president field (default: false)
+ * $showPromoteurUlb bool Show ULB promoteur field (default: true)
+ * $promoteurUlbConditional bool If true, field is hidden unless finality=Approfondi
*
- * In "add" mode (no existing jury data), callers should pass nulls/empty arrays and
- * may rely on the $formData repopulation helpers (old/wasSelected) defined in add.php.
- * When those helpers exist and no explicit values are set, the partial uses them.
+ * In add-mode repopulation: if old() exists and values are null, populate from it.
*/
-$juryPresident = $juryPresident ?? null;
-$juryPromoteur = $juryPromoteur ?? null;
-$juryPromoteurExt = $juryPromoteurExt ?? 0;
-$juryPromoteurUlb = $juryPromoteurUlb ?? 0;
-$juryLecteurs = $juryLecteurs ?? [];
+$juryPromoteur = $juryPromoteur ?? null;
+$juryPromoteurUlb = $juryPromoteurUlb ?? null;
+$lecteursInternes = $lecteursInternes ?? [];
+$lecteursExternes = $lecteursExternes ?? [];
+$juryPresident = $juryPresident ?? null;
+$showPresident = $showPresident ?? false;
+$showPromoteurUlb = $showPromoteurUlb ?? true;
+$promoteurUlbConditional = $promoteurUlbConditional ?? false;
-// In add-mode, repopulate from flash form data when helpers are available.
-$addMode = ($juryPresident === null && $juryPromoteur === null && empty($juryLecteurs));
+// Add-mode repopulation from flash data
+$addMode = ($juryPromoteur === null && $juryPromoteurUlb === null && empty($lecteursInternes) && empty($lecteursExternes) && $juryPresident === null);
if ($addMode && function_exists('old')) {
- $juryPresident = old('jury_president') ?: null;
- $juryPromoteur = old('jury_promoteur') ?: null;
- $juryPromoteurExt = function_exists('wasSelected') && wasSelected('jury_promoteur_ext', '1') ? 1 : 0;
+ $juryPromoteur = old('jury_promoteur') ?: null;
+ $juryPromoteurUlb = old('jury_promoteur_ulb_name') ?: null;
+ $juryPresident = old('jury_president') ?: null;
+ for ($i = 0; $i < 10; $i++) {
+ $n = old("jury_lecteur_interne:$i");
+ if ($n !== '') $lecteursInternes[] = ['name' => $n];
+ }
+ for ($i = 0; $i < 10; $i++) {
+ $n = old("jury_lecteur_externe:$i");
+ if ($n !== '') $lecteursExternes[] = ['name' => $n];
+ }
}
-
-$juryIdx = max(count($juryLecteurs), 1);
?>
-
-
+
+
diff --git a/app/templates/partials/form/select-field.php b/app/templates/partials/form/select-field.php
index 24ec4b6..f21687a 100644
--- a/app/templates/partials/form/select-field.php
+++ b/app/templates/partials/form/select-field.php
@@ -23,7 +23,7 @@ $hint = $hint ?? null;
$attrs = $attrs ?? [];
?>
-
+
$v) {
diff --git a/app/templates/partials/form/text-field.php b/app/templates/partials/form/text-field.php
index 5a1e1f5..d22975c 100644
--- a/app/templates/partials/form/text-field.php
+++ b/app/templates/partials/form/text-field.php
@@ -33,7 +33,7 @@ foreach ($attrs as $k => $v) {
}
?>
-
+