backoffice: separate launcher Set / Remove forms (nested form bug)
The previous markup had a <form action=remove_launcher> nested inside a <form action=set_launcher>. HTML doesn't allow nested forms — browsers flatten the structure unpredictably, and clicking the inner "Définir" submit could end up posting the outer (or vice versa), causing the section to be removed when the user actually wanted to set it. Two sibling forms now, with a 12px gap between them. Same UX. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -279,17 +279,17 @@ Layout::header('Versions', 'versions');
|
|||||||
value="<?= htmlspecialchars($launcher['minRequired'] ?? '0.5.0') ?>" pattern="\d+\.\d+\.\d+">
|
value="<?= htmlspecialchars($launcher['minRequired'] ?? '0.5.0') ?>" pattern="\d+\.\d+\.\d+">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="toolbar">
|
|
||||||
<button class="btn btn-success" type="submit">Définir</button>
|
<button class="btn btn-success" type="submit">Définir</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
<?php if ($launcher): ?>
|
<?php if ($launcher): ?>
|
||||||
<form method="post" style="display:inline" onsubmit="return confirm('Retirer la section launcher du manifest ? L\'auto-update sera désactivé.')">
|
<form method="post" style="margin-top: 12px;"
|
||||||
|
onsubmit="return confirm('Retirer la section launcher du manifest ? L\'auto-update sera désactivé.')">
|
||||||
<?= Layout::csrfField() ?>
|
<?= Layout::csrfField() ?>
|
||||||
<input type="hidden" name="action" value="remove_launcher">
|
<input type="hidden" name="action" value="remove_launcher">
|
||||||
<button class="btn btn-danger" type="submit">Retirer la section</button>
|
<button class="btn btn-danger" type="submit">Retirer la section launcher</button>
|
||||||
</form>
|
</form>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<h3 style="margin-top: 18px; font-size: 13px; color: var(--text-secondary); text-transform: uppercase;">Workflow</h3>
|
<h3 style="margin-top: 18px; font-size: 13px; color: var(--text-secondary); text-transform: uppercase;">Workflow</h3>
|
||||||
<ol class="muted">
|
<ol class="muted">
|
||||||
|
|||||||
Reference in New Issue
Block a user