X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=time.php;h=47e06a14c6b71305410de399b94e87d34082cf66;hb=1ec29837741da5d4d24bbe9d11a780bc0de12f0b;hp=3543cce023e70ed7f83be6787dfff433e227b13d;hpb=ff71ab051012b2ac0664f08603b8c6455feba5db;p=timetracker.git diff --git a/time.php b/time.php index 3543cce0..47e06a14 100644 --- a/time.php +++ b/time.php @@ -195,6 +195,8 @@ if (!$user->canManageTeam() && defined('READONLY_START_FINISH') && isTrue(READON } 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')) @@ -232,10 +234,8 @@ if ($request->isPost()) { 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) {