Bug 222834 - Warn when trying to post worktime without comment
parent
155e56dfcb
commit
669b67215b
15
js/bug.js
15
js/bug.js
|
@ -257,7 +257,9 @@ function updateRemainingTime()
|
|||
function changeform_onsubmit()
|
||||
{
|
||||
if (check_new_keywords(document.changeform) == false)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
var wtInput = document.changeform.work_time;
|
||||
if (!wtInput)
|
||||
|
@ -280,6 +282,19 @@ function changeform_onsubmit()
|
|||
return false;
|
||||
}
|
||||
}
|
||||
if (awt)
|
||||
{
|
||||
var txt = document.getElementById('comment_textarea').value.trim();
|
||||
if (txt === '')
|
||||
{
|
||||
var wtonly = document.getElementById('cmt_worktime').checked;
|
||||
if (!wtonly)
|
||||
{
|
||||
alert('You have to specify a comment on this change');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
wtInput.value = awt;
|
||||
adjustRemainingTime();
|
||||
|
|
Loading…
Reference in New Issue