forked from MarseyWorld/MarseyWorld
fix "remove" button in /live
parent
55c62b820f
commit
1236d7bcd5
|
@ -340,15 +340,12 @@ function timestamp(str, ti) {
|
|||
};
|
||||
|
||||
function areyousure(t) {
|
||||
if (t.value) {
|
||||
t.type = 'submit';
|
||||
if (t.value)
|
||||
t.value = 'Are you sure?'
|
||||
}
|
||||
else
|
||||
{
|
||||
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)
|
||||
t.setAttribute("data-bs-dismiss", t.dataset.dismiss);
|
||||
|
|
|
@ -59,8 +59,7 @@
|
|||
<form action="/live/remove" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<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>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
@ -85,7 +84,7 @@
|
|||
<form action="/live/remove" method="post">
|
||||
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
||||
<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>
|
||||
</td>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue