Users: Work fine with empty statuses

This commit is contained in:
Maxim Leshchenko 2021-12-26 00:02:07 +02:00
parent c74847dd5f
commit 7b4d30328d
No known key found for this signature in database
GPG key ID: BB9C44A8733FBEEE

View file

@ -574,7 +574,14 @@
return; return;
} }
document.querySelector("#page_status_text").innerHTML = status; if(document.status_popup_form.status.value === "") {
document.querySelector("#page_status_text").innerHTML = `[ ${tr("change_status")} ]`;
document.querySelector("#page_status_text").className = "edit_link page_status_edit_button";
} else {
document.querySelector("#page_status_text").innerHTML = status;
document.querySelector("#page_status_text").className = "page_status page_status_edit_button";
}
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; document.status_popup_form.submit.disabled = false;