mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 11:09:18 +02:00
fix: mark languages as required, add required-field visual indicators on both forms
- checkbox-list.php: support $required prop → adds required + aria-required on fieldset - add.php: languages checkbox now marked required (matches server-side validation) - partage/index.php: same for student form - admin.css: dashed border on required inputs, bold labels, red asterisk via :has(), "Champs obligatoires" note - Both forms now show "* Champs obligatoires" note at top Server-side required fields = titre, auteurice, synopsis, année, orientation, ap, finality, languages (≥1), access_type_id, confirmation_email. All now have required attribute + visual asterisk.
This commit is contained in:
@@ -12,13 +12,15 @@
|
||||
* string $label — group label text
|
||||
* array $options — each element must have 'id' and 'name' keys
|
||||
* array $checked — array of 'id' values that are currently checked
|
||||
* bool $required — whether at least one checkbox must be checked; default false
|
||||
*/
|
||||
|
||||
$checked = $checked ?? [];
|
||||
$checked = $checked ?? [];
|
||||
$required = $required ?? false;
|
||||
?>
|
||||
<div>
|
||||
<span class="admin-row-label"><?= htmlspecialchars($label) ?></span>
|
||||
<fieldset class="admin-checkbox-group">
|
||||
<fieldset class="admin-checkbox-group"<?= $required ? ' required aria-required="true"' : '' ?>>
|
||||
<legend class="sr-only"><?= htmlspecialchars($label) ?></legend>
|
||||
<ul>
|
||||
<?php foreach ($options as $opt): ?>
|
||||
|
||||
Reference in New Issue
Block a user