mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +02:00
fix: load autosave-handler.js on about_page edit view, persist contact group deletion
Two fixes: 1. about_page edit was missing autosave-handler.js: the first if block (editType === 'page' || 'about_page') overrode $extraJs with only overtype.min.js, making the elseif that added autosave-handler.js unreachable for about_page. Added autosave-handler.js to the first block, removed dead 'about_page' from the elseif. 2. Deleting a contact group (Contacts 3/4/5) only removed the DOM element but never triggered htmx autosave. Dispatched a 'change' event on the form after removal+reindex so the hx-trigger fires. Also expanded autosave-handler.js URL filter to accept apropos.php so the status indicator (Enregistrement/Enregistré) works for contacts saves.
This commit is contained in:
@@ -150,7 +150,7 @@ $websiteLabel = htmlspecialchars($_POST['website_label'] ?? '');
|
||||
Glissez pour réordonner.
|
||||
<br>
|
||||
<br>
|
||||
PDF (max 100 MB) · Images (max 1 GB) · Vidéo & Audio (max 8 GB) · VTT · Archives (max 1 GB).
|
||||
PDF (max 100 MB) · Images (max 500 MB) · Vidéo & Audio (max 5 GB) · VTT · Archives (max 500 MB).
|
||||
<br>→ PDFs trop lourds ? <a href="https://www.bentopdf.com" target="_blank" rel="noopener">https://bentopdf.com/</a>
|
||||
<?php if ($peerTubeEnabled): ?>
|
||||
<br><br>Vidéos et audio hébergés sur <a href="<?= htmlspecialchars($peerTubeSettings['instance_url']) ?>" target="_blank" rel="noopener">PeerTube</a>.
|
||||
@@ -202,7 +202,7 @@ $websiteLabel = htmlspecialchars($_POST['website_label'] ?? '');
|
||||
data-queue-type="annexe"
|
||||
data-existing-files='<?= htmlspecialchars(json_encode($existingFilesJsonForAnnexe ?? []), ENT_QUOTES) ?>'
|
||||
aria-describedby="annexe-files-hint">
|
||||
<small id="annexe-files-hint" class="admin-file-hint">PDF ou archives ZIP/TAR. Max 1 GB. Glissez pour réordonner.</small>
|
||||
<small id="annexe-files-hint" class="admin-file-hint">PDF ou archives ZIP/TAR. Max 500 MB. Glissez pour réordonner.</small>
|
||||
</div>
|
||||
<?php if ($editMode): ?>
|
||||
<button type="button" class="btn btn--sm btn--ghost file-browser-trigger"
|
||||
|
||||
@@ -43,7 +43,7 @@ $adminMode = $adminMode ?? false;
|
||||
class="tfe-file-picker"
|
||||
data-queue-type="tfe">
|
||||
<small class="admin-file-hint">
|
||||
Types acceptés : PDF · JPG/PNG/GIF/WEBP · MP4/WebM/MOV (vidéo) · MP3/OGG/WAV/FLAC (audio) · ZIP/TAR (archives). Max 1 GB par fichier.
|
||||
Types acceptés : PDF (max 100 MB) · JPG/PNG/GIF/WEBP (max 500 MB) · MP4/WebM/MOV (vidéo, max 5 GB) · MP3/OGG/WAV/FLAC (audio, max 5 GB) · ZIP/TAR (archives, max 500 MB).
|
||||
Les fichiers <code>.vtt</code> sont des sous-titres et seront associés automatiquement à la vidéo précédente.
|
||||
</small>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user