Remove required from all admin add/edit form inputs

- Skip required-field validation for orientation/ap/finality/licence/jury in admin add+edit
This commit is contained in:
Pontoporeia
2026-05-08 12:40:06 +02:00
parent 5735ccbc38
commit 95fcbc919a
12 changed files with 216 additions and 98 deletions

View File

@@ -8,8 +8,10 @@
* 3. TFE (obligatoire)
* 4. Annexes éventuelles (optionnel)
*
* Variables consumed: none beyond APP_ROOT (always available).
* Variables consumed:
* bool $adminMode — when true, no field is required (admin add/edit mode).
*/
$adminMode = $adminMode ?? false;
?>
<fieldset>
<legend>Fichiers</legend>
@@ -27,7 +29,7 @@
$label = 'Note d\'intention :';
$accept ='.pdf';
$hint = 'Format PDF uniquement.';
$required = true;
$required = !$adminMode;
include APP_ROOT . '/templates/partials/form/file-field.php';
?>