$form->addInput(array('type'=>'combobox','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'))
));
}
$cl_finish = null;
// 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']);
-$smarty->assign('time_records', ttTimeHelper::getRecords($user->getUser(), $cl_date));
+$smarty->assign('time_records', ttTimeHelper::getRecords($cl_date));
$smarty->assign('day_total', ttTimeHelper::getTimeForDay($cl_date));
$smarty->assign('client_list', $client_list);
$smarty->assign('project_list', $project_list);