Fix timer.js: add ability for bug creating for non @etersoft.ru users

parent 184e32d1
......@@ -122,6 +122,21 @@ window.addEventListener("load", function() {
// cancel form submiting
event.preventDefault();
if (!isworker()) {
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