From: anuko Date: Thu, 28 Dec 2017 17:50:22 +0000 (+0000) Subject: Disabled controls in week view with null values for TYPE_START_FINISH entry mode. X-Git-Tag: timetracker_1.19-1~1422 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=759621718acb3321e844381f94704e585a964cd4;p=timetracker.git Disabled controls in week view with null values for TYPE_START_FINISH entry mode. --- diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8f482093..ab87268a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.13.0.3702| Copyright © Anuko | +  Anuko Time Tracker 1.13.0.3703| Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/week.php b/week.php index a015e85d..d6fb6a3b 100644 --- a/week.php +++ b/week.php @@ -146,6 +146,12 @@ class TimeCellRenderer extends DefaultCellRenderer { $field->setFormName($table->getFormName()); $field->setSize(2); $field->setValue($table->getValueAt($row,$column)['duration']); + // Disable control when time entry mode is TYPE_START_FINISH and there is no value in control + // because we can't supply start and finish times in week view - there are no fields for them. + global $user; + if (!$field->getValue() && TYPE_START_FINISH == $user->record_type) { + $field->setEnabled(false); + } $this->setValue($field->getHtml()); return $this->toString(); }