forked from Nixius/authelia
Disable stack action buttons on submit to prevent spam
Made-with: Cursor
This commit is contained in:
parent
084548fcd7
commit
239d2c07e1
|
|
@ -180,23 +180,26 @@
|
|||
<hr class="divider">
|
||||
<div class="actions">
|
||||
{{if .StackRunning}}
|
||||
<form method="POST" action="/stack-manage" style="margin:0">
|
||||
<form method="POST" action="/stack-manage" style="margin:0"
|
||||
onsubmit="this.querySelector('button').disabled=true; this.querySelector('button').textContent='Restarting…';">
|
||||
<input type="hidden" name="action" value="restart">
|
||||
<button type="submit" class="btn btn-outline btn-sm">Restart</button>
|
||||
</form>
|
||||
<form method="POST" action="/stack-manage" style="margin:0">
|
||||
<form method="POST" action="/stack-manage" style="margin:0"
|
||||
onsubmit="this.querySelector('button').disabled=true; this.querySelector('button').textContent='Stopping…';">
|
||||
<input type="hidden" name="action" value="stop">
|
||||
<button type="submit" class="btn btn-warning btn-sm">Stop</button>
|
||||
</form>
|
||||
{{else}}
|
||||
<form method="POST" action="/stack-manage" style="margin:0">
|
||||
<form method="POST" action="/stack-manage" style="margin:0"
|
||||
onsubmit="this.querySelector('button').disabled=true; this.querySelector('button').textContent='Starting…';">
|
||||
<input type="hidden" name="action" value="start">
|
||||
<button type="submit" class="btn btn-sm">Start</button>
|
||||
</form>
|
||||
{{end}}
|
||||
{{if .StackDeployed}}
|
||||
<form method="POST" action="/stack-manage" style="margin:0"
|
||||
onsubmit="return confirm('Destroy your stack? All containers will be removed. Volumes are preserved.')">
|
||||
onsubmit="if(!confirm('Destroy your stack? All containers will be removed. Volumes are preserved.')) return false; this.querySelector('button').disabled=true; this.querySelector('button').textContent='Destroying…';">
|
||||
<input type="hidden" name="action" value="destroy">
|
||||
<button type="submit" class="btn btn-danger btn-sm">Destroy</button>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Reference in New Issue