X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/532ab62cfa2895753eb599ab3b35c104ca344602..759621718acb3321e844381f94704e585a964cd4:/week.php 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(); }