X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=user_add.php;h=56bd69b3c4a9a0092ded73bd269daa2bb2142eed;hb=19b674dca67d52e7ec2ea49046f31e68fc6facf4;hp=5696d28fa67e6735a8db905d3b107d8a62db8255;hpb=066efce7ef712710e229308b6099f5af410aecb8;p=timetracker.git diff --git a/user_add.php b/user_add.php index 5696d28f..56bd69b3 100644 --- a/user_add.php +++ b/user_add.php @@ -50,6 +50,13 @@ $show_quota = $user->isPluginEnabled('mq'); if ($user->isPluginEnabled('cl')) $clients = ttGroupHelper::getActiveClients(); +// Use custom fields plugin if it is enabled. +if ($user->isPluginEnabled('cf')) { + require_once('plugins/CustomFields.class.php'); + $custom_fields = new CustomFields(); + $smarty->assign('custom_fields', $custom_fields); +} + $assigned_projects = array(); if ($request->isPost()) { $cl_name = trim($request->getParameter('name')); @@ -91,6 +98,11 @@ $form->addInput(array('type'=>'combobox','onchange'=>'handleClientControl()','na if ($user->isPluginEnabled('cl')) $form->addInput(array('type'=>'combobox','name'=>'client','value'=>$cl_client_id,'data'=>$clients,'datakeys'=>array('id', 'name'),'empty'=>array(''=>$i18n->get('dropdown.select')))); +// If we have custom fields - add controls for them. +if ($custom_fields && $custom_fields->userFields) { + // Coding in progress... +} + $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate)); if ($show_quota) $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'quota_percent','format'=>'.2','value'=>$cl_quota_percent));