@@ -181,66 +86,17 @@ function wasSelected($key, $value) {
rows="7" required>= old('synopsis') ?>
-
-
-
Fichiers du TFE :
-
-
- PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier.
-
-
+
Soumettre
diff --git a/public/admin/edit.php b/public/admin/edit.php
index a8b2dd2..c5a75c0 100644
--- a/public/admin/edit.php
+++ b/public/admin/edit.php
@@ -78,58 +78,20 @@ try {
-
- Auteur·ice(s) :
-
-
+
+
-
- Contact :
-
-
+
-
- Année :
-
-
+
-
- Orientation :
-
-
- >
- = htmlspecialchars($o['name']) ?>
-
-
-
-
+
-
- Atelier pluridisciplinaire :
-
-
- >
- = htmlspecialchars($ap['name']) ?>
-
-
-
-
-
-
- Finalité du master :
-
-
- >
- = htmlspecialchars($f['name']) ?>
-
-
-
-
+
-
- Visibilité / Accès :
-
- - Non défini -
-
- >
- = htmlspecialchars($at['name']) ?>
-
- - = htmlspecialchars(mb_strimwidth($at['description'], 0, 60, '...')) ?>
-
-
-
-
-
+ $at['id'], 'name' => $label];
+ }, $accessTypes);
+ $name = 'access_type_id'; $label = 'Visibilité / Accès :'; $options = $accessOptions; $selected = $currentAccessTypeId; $placeholder = '- Non défini -';
+ include APP_ROOT . '/templates/partials/form/select-field.php';
+ ?>
+
Note contextuelle :
- Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.
+ Visible publiquement pour les TFE Interne ou Interdit. Max 1 500 caractères.
-
- Licence :
-
- - Inconnue -
-
- >
- = htmlspecialchars($lt['name']) ?>
-
-
-
-
+
-
- Titre :
-
-
-
-
- Sous-titre :
-
-
+
+
+
Synopsis :
-
-
Langue(s) :
-
-
-
- >
- = htmlspecialchars($lang['name']) ?>
-
-
-
-
+
-
-
Format(s) :
-
-
-
- >
- = htmlspecialchars($fmt['name']) ?>
-
-
-
-
+
-
-
Mots-clés :
-
-
- Séparer par des virgules. Max 10.
-
-
+
-
- Durée / Taille :
-
-
+
-
- Lien externe :
-
-
+
-
+
Image bannière (accueil) :
@@ -270,6 +174,7 @@ try {
+
Publication :
diff --git a/templates/partials/form/checkbox-list.php b/templates/partials/form/checkbox-list.php
new file mode 100644
index 0000000..2d971f6
--- /dev/null
+++ b/templates/partials/form/checkbox-list.php
@@ -0,0 +1,29 @@
+, not associated with any single input)
+ * array $options — each element must have 'id' and 'name' keys
+ * array $checked — array of 'id' values that are currently checked
+ */
+
+$checked = $checked ?? [];
+?>
+
+
= htmlspecialchars($label) ?>
+
+
+
+ >
+ = htmlspecialchars($opt['name']) ?>
+
+
+
+
+ below the input
+ * 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;
+$multiple = $multiple ?? false;
+$id = $id ?? $name;
+?>
+
+
= htmlspecialchars($label) ?>
+
+
+ = $multiple ? 'multiple' : '' ?>>
+
+ = htmlspecialchars($hint) ?>
+
+
+
+; default ''
+ * set to null to suppress the empty option entirely
+ * string|null $id — override the id attribute (defaults to $name)
+ * string|null $hint — optional hint shown in below the select
+ */
+
+$required = $required ?? false;
+$placeholder = array_key_exists('placeholder', get_defined_vars()) ? $placeholder : '';
+$id = $id ?? $name;
+$hint = $hint ?? null;
+?>
+
+ = htmlspecialchars($label) ?>
+ >
+
+ = htmlspecialchars($placeholder) ?>
+
+
+
+ >
+ = htmlspecialchars($opt['name']) ?> (= htmlspecialchars($opt['code']) ?>)
+
+
+
+
+ = htmlspecialchars($hint) ?>
+
+
+ below the input
+ * string|null $id — override the id attribute (defaults to $name)
+ * array $attrs — extra HTML attributes as key=>value pairs (e.g. min/max for number)
+ *
+ * The partial does NOT call htmlspecialchars on $value — the caller is responsible.
+ */
+
+$type = $type ?? 'text';
+$required = $required ?? false;
+$placeholder = $placeholder ?? '';
+$hint = $hint ?? null;
+$id = $id ?? $name;
+$attrs = $attrs ?? [];
+
+$attrStr = '';
+foreach ($attrs as $k => $v) {
+ $attrStr .= ' ' . htmlspecialchars($k) . '="' . htmlspecialchars((string)$v) . '"';
+}
+?>
+
+