From 2143869b1e8a96ecadf9422dc7af7a2daa77f2d8 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Thu, 2 Apr 2026 12:48:04 +0200 Subject: [PATCH] Add admin form field partials and apply to add/edit forms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Four reusable PHP partials extracted to templates/partials/form/: - text-field.php — single-line input (text/number/url); wraps input+hint in div, skips the inner wrapper when no hint is present. Supports $type, $placeholder, $required, $attrs, $hint, $id overrides. - select-field.php — - -
- - -
+ - -
- -
- - Durée (minutes) ou nombre de pages. -
-
+ - -
- - -
+ - -
- -
- - JPG, PNG. Taille max : 10 MB. -
-
+ - -
- -
- - JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB. -
-
+ - -
- -
- - PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier. -
-
+
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 { -
- - -
+ + -
- - -
+ -
- - -
+ -
- - -
+ -
- - -
- -
- - -
+ -
- - -
+ $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'; + ?> +
- 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.
-
- - -
+ -
- - -
- -
- - -
+ + +
-
- -
- - - -
-
+ -
- -
- - - -
-
+ -
- -
- - Séparer par des virgules. Max 10. -
-
+ -
- - -
+ -
- - -
+ - +
@@ -270,6 +174,7 @@ try {
+