Users: Disable status change button during status change

This commit is contained in:
Maxim Leshchenko 2021-12-25 22:46:40 +02:00
parent 0a6ce0ffc0
commit c74847dd5f
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -561,6 +561,7 @@
const status = document.status_popup_form.status.value;
document.status_popup_form.submit.innerHTML = "<div class=\"button-loading\"></div>";
document.status_popup_form.submit.disabled = true;
const formData = new FormData();
formData.append("status", status);
@ -569,12 +570,14 @@
if(!parseAjaxResponse(await response.text())) {
document.status_popup_form.submit.innerHTML = tr("send");
document.status_popup_form.submit.disabled = false;
return;
}
document.querySelector("#page_status_text").innerHTML = status;
setStatusEditorShown(false);
document.status_popup_form.submit.innerHTML = tr("send");
document.status_popup_form.submit.disabled = false;
}
</script>
</div>