fix: resolve partage form submission issues

- Replace mb_strlen/mb_substr/mb_strtolower with strlen/substr/strtolower
  (mbstring extension missing on server, causing fatal error)
- Scope annexes checkbox HTMX swap to #annexes-input-block with hx-select
  (prevents duplicating entire page inside Fichiers fieldset)
- Split format+fichiers response: #format-fichiers-block (stable) and
  #format-extras-block (swappable, inside Fichiers fieldset). Format
  checkboxes use hx-select to extract only the extras, preserving file queue.
- Keep format extras inline in Fichiers fieldset (no sub-fieldsets). Remove
  website legend input (URL only).
- When PeerTube upload disabled, show direct file upload inputs for
  video/audio (name=files[]).
- Add "Glissez-déposez" sort hint below TFE file queue.
- Fix .fq-name overflow with width:0;min-width:100% chain.
- Remove legend placeholder from .fq-item.
- Merge "Récits et expérimentation" AP into "Narration Spéculative".
  Rename PACS to "Pratique de lart - outils critiques, arts et contexte
  simultanés".
- Remove président·e field from jury fieldset, form templates, and
  controller validation. Keep DB column and display logic for existing data.
This commit is contained in:
Pontoporeia
2026-05-09 16:58:39 +02:00
parent 59bbcf4642
commit cc0ae32df0
16 changed files with 119 additions and 152 deletions

View File

@@ -16,10 +16,10 @@
* array $orientations, $apPrograms, $finalityTypes, $languages, $formatTypes, $licenseTypes
*
* Jury data:
* ?string $juryPromoteur, $juryPromoteurUlb, $juryPresident
* ?string $juryPromoteur, $juryPromoteurUlb
* array $juryPromoteurs, $juryPromoteursUlb
* array $lecteursInternes, $lecteursExternes
* bool $showPresident, $showPromoteurUlb, $promoteurUlbConditional
* bool $showPromoteurUlb, $promoteurUlbConditional
*
* Licence / access:
* bool $libreEnabled, $interneEnabled, $interditEnabled
@@ -70,7 +70,6 @@ $juryPromoteursUlb = $juryPromoteursUlb ?? [];
$lecteursInternes = $lecteursInternes ?? [];
$lecteursExternes = $lecteursExternes ?? [];
$juryPresident = $juryPresident ?? null;
$showPresident = $showPresident ?? false;
$showPromoteurUlb = $showPromoteurUlb ?? true;
$promoteurUlbConditional = $promoteurUlbConditional ?? false;

View File

@@ -9,8 +9,7 @@
* $juryPromoteursUlb array [{name: string}] Multiple promoteurs ULB
* $lecteursInternes array [{name: string}]
* $lecteursExternes array [{name: string}]
* $juryPresident string|null President name (edit-only, optional)
* $showPresident bool Show president field (default: false)
* $juryPresident string|null (Deprecated — no longer displayed)
* $showPromoteurUlb bool Show ULB promoteur field (default: true)
* $promoteurUlbConditional bool If true, field is hidden unless finality=Approfondi
*
@@ -23,14 +22,12 @@ $juryPromoteurUlb = $juryPromoteurUlb ?? null;
$juryPromoteursUlb = $juryPromoteursUlb ?? [];
$lecteursInternes = $lecteursInternes ?? [];
$lecteursExternes = $lecteursExternes ?? [];
$juryPresident = $juryPresident ?? null;
$showPresident = $showPresident ?? false;
$showPromoteurUlb = $showPromoteurUlb ?? true;
$promoteurUlbConditional = $promoteurUlbConditional ?? false;
$adminMode = $adminMode ?? false;
// Add-mode repopulation from flash data
$addMode = ($juryPromoteur === null && empty($juryPromoteurs) && $juryPromoteurUlb === null && empty($juryPromoteursUlb) && empty($lecteursInternes) && empty($lecteursExternes) && $juryPresident === null);
$addMode = ($juryPromoteur === null && empty($juryPromoteurs) && $juryPromoteurUlb === null && empty($juryPromoteursUlb) && empty($lecteursInternes) && empty($lecteursExternes));
if ($addMode && function_exists('old')) {
// jury_promoteur may be array (new form) or scalar (legacy)
$promoteursOld = old('jury_promoteur');
@@ -52,7 +49,6 @@ if ($addMode && function_exists('old')) {
} elseif (is_string($promoteursUlbOld) && trim($promoteursUlbOld) !== '') {
$juryPromoteurUlb = $promoteursUlbOld;
}
$juryPresident = old('jury_president') ?: null;
for ($i = 0; $i < 10; $i++) {
$n = old("jury_lecteur_interne:$i");
if ($n !== '') $lecteursInternes[] = ['name' => $n];
@@ -238,15 +234,6 @@ if ($addMode && function_exists('old')) {
</button>
</fieldset>
<?php if ($showPresident): ?>
<!-- Président·e (admin edit only) -->
<div>
<label for="jury_president">Président·e :</label>
<input type="text" id="jury_president" name="jury_president"
value="<?= htmlspecialchars($juryPresident ?? '') ?>"
placeholder="Nom du/de la président·e (interne)">
</div>
<?php endif; ?>
</fieldset>
<script>