import dialog: add Terminé button, fix padding, make success permanent, avoid POST resend

import dialog: add Terminé button, fix padding, make success permanent, avoid POST resend
This commit is contained in:
Pontoporeia
2026-05-10 23:22:38 +02:00
parent cab65ea4a4
commit 2bacc78492
4 changed files with 33 additions and 2 deletions

View File

@@ -178,11 +178,27 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
</div>
<?php endif; ?>
<?php if ($importMessage): ?>
<p class="toast admin-import-status-card__success" role="status" data-type="success">✓ <?= htmlspecialchars($importMessage) ?></p>
<p class="admin-import-status-card__success" role="status">✓ <?= htmlspecialchars($importMessage) ?></p>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if ($importMessage): ?>
<?php if (!empty($importResults)): ?>
<details class="admin-import-log-details">
<summary>Logs d'importation (<?= count($importResults) ?> entrées)</summary>
<ul class="admin-import-log">
<?php foreach ($importResults as $r): ?>
<li class="admin-import-log__item admin-import-log__item--<?= $r['type'] ?>"><?= htmlspecialchars($r['msg']) ?></li>
<?php endforeach; ?>
</ul>
</details>
<?php endif; ?>
<div class="admin-form-footer">
<button type="button" class="btn btn--primary"
onclick="document.getElementById('import-dialog').close(); window.location.href = window.location.pathname">Terminé</button>
</div>
<?php else: ?>
<form method="post" enctype="multipart/form-data" class="admin-form">
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
@@ -214,6 +230,7 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
</ul>
</details>
<?php endif; ?>
<?php endif; ?>
</dialog>
<!-- ══════════════════════════════════════════════════════════════