X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/dac7b3b59c56d265e7ee630c10d8d5fe3614d399..HEAD:/time_edit.php diff --git a/time_edit.php b/time_edit.php index e6ca12ad..aceff024 100644 --- a/time_edit.php +++ b/time_edit.php @@ -202,7 +202,7 @@ if ($custom_fields && $custom_fields->fields[0]) { 'name'=>'cf_1', 'style'=>'width: 250px;', 'value'=>$cl_cf_1, - 'data'=>$custom_fields->options, + 'data'=>CustomFields::getOptions($custom_fields->fields[0]['id']), 'empty' => array('' => $i18n->get('dropdown.select')))); } } @@ -239,7 +239,7 @@ $form->addInput(array('type'=>'submit','name'=>'btn_delete','value'=>$i18n->get( if ($request->isPost()) { // Validate user input. - if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client) + if ($user->isPluginEnabled('cl') && $user->isOptionEnabled('client_required') && !$cl_client) $err->add($i18n->get('error.client')); if ($custom_fields) { if (!ttValidString($cl_cf_1, !$custom_fields->fields[0]['required'])) $err->add($i18n->get('error.field'), $custom_fields->fields[0]['label']); @@ -276,8 +276,7 @@ if ($request->isPost()) { } if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date')); if (!ttValidString($cl_note, true)) $err->add($i18n->get('error.field'), $i18n->get('label.note')); - if ($user->isPluginEnabled('tp') && strpos($cl_note, '%req%') !== false) { - // A %req% element is found in note. They have to be replaced by user. + if ($user->isPluginEnabled('tp') && !ttValidTemplateText($cl_note)) { $err->add($i18n->get('error.field'), $i18n->get('label.note')); } if (!ttTimeHelper::canAdd()) $err->add($i18n->get('error.expired'));