X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=WEB-INF%2Ftemplates%2Ftime.tpl;h=454abf9f2f1da8251408a6a1f5a7cab9bf4cdec3;hb=ede1eab3f219537349c91cf7fcdaf8bdb242d41a;hp=c36f81f227d263afd7e9f17aae69d2e7233aeeac;hpb=39ccd603de95cb71725f7daff81c6e7abd70bb29;p=timetracker.git diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index c36f81f2..454abf9f 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -142,39 +142,40 @@ function fillTaskDropdown(id) { // The formDisable function disables some fields depending on what we have in other fields. function formDisable(formField) { - formFieldValue = eval("document.timeRecordForm." + formField + ".value"); - formFieldName = eval("document.timeRecordForm." + formField + ".name"); + 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"; } @@ -185,7 +186,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(); @@ -237,7 +238,7 @@ function get_time() { {/if} {if ($custom_fields && $custom_fields->fields[0])}
{$i18n.label.client} | @@ -304,8 +305,8 @@ function get_time() {{$i18n.label.task} | {/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{$i18n.label.start} | -{$i18n.label.finish} | +{$i18n.label.start} | +{$i18n.label.finish} | {/if}{$i18n.label.duration} | {$i18n.label.note} | @@ -314,30 +315,30 @@ function get_time() { {foreach $time_records as $record}||||||||
{$record.client|escape:'html'} | +{$record.client|escape} | {/if} {if ($smarty.const.MODE_PROJECTS == $user->tracking_mode || $smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{$record.project|escape:'html'} | +{$record.project|escape} | {/if} {if ($smarty.const.MODE_PROJECTS_AND_TASKS == $user->tracking_mode)} -{$record.task|escape:'html'} | +{$record.task|escape} | {/if} {if (($smarty.const.TYPE_START_FINISH == $user->record_type) || ($smarty.const.TYPE_ALL == $user->record_type))} -{if $record.start}{$record.start}{else} {/if} | -{if $record.finish}{$record.finish}{else} {/if} | +{if $record.start}{$record.start}{else} {/if} | +{if $record.finish}{$record.finish}{else} {/if} | {/if} -{if $record.duration <> '0:00'}{$record.duration}{else}{$i18n.form.time.uncompleted}{/if} | -{if $record.comment}{$record.comment|escape:'html'}{else} {/if} | -+ | {if ($record.duration == '0:00' && $record.start <> '')}{$i18n.form.time.uncompleted}{else}{$record.duration}{/if} | +{if $record.comment}{$record.comment|escape}{else} {/if} | +{if $record.invoice_id} {else} - {$i18n.label.edit} - {if $record.duration == '0:00'} - - - - + {$i18n.label.edit} + {if ($record.duration == '0:00' && $record.start <> '')} + + + + {/if} {/if} |