mirror of
https://github.com/openvk/openvk
synced 2025-01-09 09:19:43 +03:00
Users: Disable status change button during status change
This commit is contained in:
parent
0a6ce0ffc0
commit
c74847dd5f
1 changed files with 3 additions and 0 deletions
|
@ -561,6 +561,7 @@
|
||||||
const status = document.status_popup_form.status.value;
|
const status = document.status_popup_form.status.value;
|
||||||
|
|
||||||
document.status_popup_form.submit.innerHTML = "<div class=\"button-loading\"></div>";
|
document.status_popup_form.submit.innerHTML = "<div class=\"button-loading\"></div>";
|
||||||
|
document.status_popup_form.submit.disabled = true;
|
||||||
|
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("status", status);
|
formData.append("status", status);
|
||||||
|
@ -569,12 +570,14 @@
|
||||||
|
|
||||||
if(!parseAjaxResponse(await response.text())) {
|
if(!parseAjaxResponse(await response.text())) {
|
||||||
document.status_popup_form.submit.innerHTML = tr("send");
|
document.status_popup_form.submit.innerHTML = tr("send");
|
||||||
|
document.status_popup_form.submit.disabled = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.querySelector("#page_status_text").innerHTML = status;
|
document.querySelector("#page_status_text").innerHTML = status;
|
||||||
setStatusEditorShown(false);
|
setStatusEditorShown(false);
|
||||||
document.status_popup_form.submit.innerHTML = tr("send");
|
document.status_popup_form.submit.innerHTML = tr("send");
|
||||||
|
document.status_popup_form.submit.disabled = false;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue