forked from MarseyWorld/MarseyWorld
fix "remove" button in /live
parent
55c62b820f
commit
1236d7bcd5
|
@ -340,15 +340,12 @@ function timestamp(str, ti) {
|
||||||
};
|
};
|
||||||
|
|
||||||
function areyousure(t) {
|
function areyousure(t) {
|
||||||
if (t.value) {
|
if (t.value)
|
||||||
t.type = 'submit';
|
|
||||||
t.value = 'Are you sure?'
|
t.value = 'Are you sure?'
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
t.innerHTML = t.innerHTML.replace(t.textContent, 'Are you sure?')
|
t.innerHTML = t.innerHTML.replace(t.textContent, 'Are you sure?')
|
||||||
}
|
|
||||||
t.setAttribute("onclick", t.dataset.click);
|
t.setAttribute("onclick", t.dataset.click);
|
||||||
|
|
||||||
if (t.dataset.dismiss)
|
if (t.dataset.dismiss)
|
||||||
t.setAttribute("data-bs-dismiss", t.dataset.dismiss);
|
t.setAttribute("data-bs-dismiss", t.dataset.dismiss);
|
||||||
|
|
|
@ -59,8 +59,7 @@
|
||||||
<form action="/live/remove" method="post">
|
<form action="/live/remove" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input type="hidden" name="id" value="{{id}}">
|
<input type="hidden" name="id" value="{{id}}">
|
||||||
|
<input autocomplete="off" class="btn btn-primary ml-auto donttrigger" data-click="disable(this);this.parentElement.submit()" onclick="areyousure(this)" value="Remove">
|
||||||
<input autocomplete="off" class="btn btn-primary ml-auto donttrigger" data-click="disable(this)" onclick="areyousure(this)" value="Remove">
|
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -85,7 +84,7 @@
|
||||||
<form action="/live/remove" method="post">
|
<form action="/live/remove" method="post">
|
||||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||||
<input type="hidden" name="id" value="{{id}}">
|
<input type="hidden" name="id" value="{{id}}">
|
||||||
<input autocomplete="off" class="btn btn-primary ml-auto donttrigger" data-click="disable(this)" onclick="areyousure(this)" value="Remove">
|
<input autocomplete="off" class="btn btn-primary ml-auto donttrigger" data-click="disable(this);this.parentElement.submit()" onclick="areyousure(this)" value="Remove">
|
||||||
</form>
|
</form>
|
||||||
</td>
|
</td>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue