}
if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READONLY_START_FINISH)) {
// Make the start and finish fields read-only.
- $form->getElement('start')->setEnable(false);
- $form->getElement('finish')->setEnable(false);
+ $form->getElement('start')->setEnabled(false);
+ $form->getElement('finish')->setEnabled(false);
}
if ((TYPE_DURATION == $user->record_type) || (TYPE_ALL == $user->record_type))
$form->addInput(array('type'=>'text','name'=>'duration','value'=>$cl_duration,'onchange'=>"formDisable('duration');"));
+if (!defined('NOTE_INPUT_HEIGHT'))
+ define('NOTE_INPUT_HEIGHT', 40);
$form->addInput(array('type'=>'textarea','name'=>'note','style'=>'width: 600px; height:'.NOTE_INPUT_HEIGHT.'px;','value'=>$cl_note));
$form->addInput(array('type'=>'calendar','name'=>'date','value'=>$cl_date)); // calendar
if ($user->isPluginEnabled('iv'))
if (MODE_PROJECTS == $user->tracking_mode || MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
if (!$cl_project) $err->add($i18n->getKey('error.project'));
}
- if (MODE_PROJECTS_AND_TASKS == $user->tracking_mode) {
- if (!$cl_task) $err->add($i18n->getKey('error.task'));
- }
- if (!$cl_duration) {
- if ('0' == $cl_duration)
- $err->add($i18n->getKey('error.field'), $i18n->getKey('label.duration'));
- elseif ($cl_start || $cl_finish) {
+ if (strlen($cl_duration) == 0) {
+ if ($cl_start || $cl_finish) {
if (!ttTimeHelper::isValidTime($cl_start))
$err->add($i18n->getKey('error.field'), $i18n->getKey('label.start'));
if ($cl_finish) {