Fix modal window showing for non @etersoft users

parent 6bfa6abb
......@@ -155,6 +155,20 @@ window.addEventListener("load", function() {
// cancel form submiting
event.preventDefault();
if (!isetersoft()) {
const comment = document.querySelector('#comment').value.length;
if (!comment) {
alert('Поле комментария не может быть пустым!');
return
}
const bugForm = etersoft_create === 1 ? "#Create" : "#changeform";
document.querySelector(bugForm).submit();
return
}
let timespentValue = getTimespentValue();
dialog.style.display = "block";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment