X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Ftemplates%2Ftime_edit.tpl;h=863cdb16cb143f94dee4651372ff08e7a349bcd9;hb=ede1eab3f219537349c91cf7fcdaf8bdb242d41a;hp=a4e26a6f40b811fba2849f008adad6ea29ae83aa;hpb=8ba5ac4b2800060721eb6777792cd945045c3804;p=timetracker.git diff --git a/WEB-INF/templates/time_edit.tpl b/WEB-INF/templates/time_edit.tpl index a4e26a6f..863cdb16 100644 --- a/WEB-INF/templates/time_edit.tpl +++ b/WEB-INF/templates/time_edit.tpl @@ -145,37 +145,38 @@ function fillTaskDropdown(id) { function formDisable(formField) { var formFieldValue = eval("document.timeRecordForm." + formField + ".value"); var formFieldName = eval("document.timeRecordForm." + formField + ".name"); + var x; if (((formFieldValue != "") && (formFieldName == "start")) || ((formFieldValue != "") && (formFieldName == "finish"))) { - var x = eval("document.timeRecordForm.duration"); + x = eval("document.timeRecordForm.duration"); x.value = ""; x.disabled = true; x.style.background = "#e9e9e9"; } if (((formFieldValue == "") && (formFieldName == "start") && (document.timeRecordForm.finish.value == "")) || ((formFieldValue == "") && (formFieldName == "finish") && (document.timeRecordForm.start.value == ""))) { - var x = eval("document.timeRecordForm.duration"); + x = eval("document.timeRecordForm.duration"); x.value = ""; x.disabled = false; x.style.background = "white"; } if ((formFieldValue != "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); + x = eval("document.timeRecordForm.start"); x.value = ""; x.disabled = true; x.style.background = "#e9e9e9"; - var x = eval("document.timeRecordForm.finish"); + x = eval("document.timeRecordForm.finish"); x.value = ""; x.disabled = true; x.style.background = "#e9e9e9"; } if ((formFieldValue == "") && (formFieldName == "duration")) { - var x = eval("document.timeRecordForm.start"); + x = eval("document.timeRecordForm.start"); x.disabled = false; x.style.background = "white"; - var x = eval("document.timeRecordForm.finish"); + x = eval("document.timeRecordForm.finish"); x.disabled = false; x.style.background = "white"; } @@ -186,7 +187,7 @@ function setNow(formField) { var x = eval("document.timeRecordForm.start"); x.disabled = false; x.style.background = "white"; - var x = eval("document.timeRecordForm.finish"); + x = eval("document.timeRecordForm.finish"); x.disabled = false; x.style.background = "white"; var today = new Date();