mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
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:
@@ -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>
|
||||
|
||||
<!-- ══════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user