mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 00:29:18 +02:00
Fix form field required states & missing fields per spec
- Admin add: add contact_public checkbox (matching edit form) - All forms: formats checkbox-list now required - All forms: jury promoteur·ice interne required, lecteur·ice interne/externe required - All forms: licence select now required - Admin edit: add E-mail de confirmation fieldset - Partage: contact always visible when provided (no contact_public field) - Partage: filter PACS from AP programs dropdown - Server-side validation: formats, jury, licence required (create + edit controllers) - Autofocus mappings for new validation errors - No duplicate asterisks — verified across all rendered fields - fix: add missing old() function in admin edit controller - refactor: move admin email field to Backoffice as Contact interne, never send email - Untrack admin.log (covered by .gitignore)
This commit is contained in:
@@ -196,6 +196,9 @@ function renderShareLinkForm(string $slug, array $link): void
|
||||
die('Erreur lors du chargement du formulaire.');
|
||||
}
|
||||
|
||||
// Filter out PACS from AP programs for student forms (spec: admin-only AP)
|
||||
$apPrograms = array_values(array_filter($apPrograms, fn($ap) => ($ap['name'] ?? '') !== 'PACS'));
|
||||
|
||||
$formData = $_SESSION['form_data_share_' . $slug] ?? [];
|
||||
unset($_SESSION['form_data_share_' . $slug]);
|
||||
|
||||
@@ -303,7 +306,7 @@ function renderShareLinkForm(string $slug, array $link): void
|
||||
<!-- ═══════════════════ Format(s) ═══════════════════ -->
|
||||
<fieldset>
|
||||
<legend>Format(s)</legend>
|
||||
<?php $name = 'formats'; $label = 'Format(s) du TFE :'; $options = $formatTypes; $checked = $formData['formats'] ?? []; include APP_ROOT . '/templates/partials/form/checkbox-list.php'; ?>
|
||||
<?php $name = 'formats'; $label = 'Format(s) du TFE :'; $options = $formatTypes; $checked = $formData['formats'] ?? []; $required = true; include APP_ROOT . '/templates/partials/form/checkbox-list.php'; ?>
|
||||
</fieldset>
|
||||
|
||||
<!-- ═══════════════════ Mots-clés ═══════════════════ -->
|
||||
|
||||
Reference in New Issue
Block a user