X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/8b16d7c0b05921ad6d90c1e5342c02d62b093414..e5129e06ab4547945e1ad3097e4193930465f93f:/user_add.php diff --git a/user_add.php b/user_add.php index 56bd69b3..a3d956ea 100644 --- a/user_add.php +++ b/user_add.php @@ -100,7 +100,17 @@ if ($user->isPluginEnabled('cl')) // If we have custom fields - add controls for them. if ($custom_fields && $custom_fields->userFields) { - // Coding in progress... + foreach ($custom_fields->userFields as $userField) { + $field_name = 'user_field_'.$userField['id']; + if ($userField['type'] == CustomFields::TYPE_TEXT) { + $form->addInput(array('type'=>'text','name'=>$field_name)); + } elseif ($userField['type'] == CustomFields::TYPE_DROPDOWN) { + $form->addInput(array('type'=>'combobox','name'=>$field_name, + 'style'=>'width: 250px;', + 'data'=>CustomFields::getOptions($userField['id']), + 'empty'=>array(''=>$i18n->get('dropdown.select')))); + } + } } $form->addInput(array('type'=>'floatfield','maxlength'=>'10','name'=>'rate','format'=>'.2','value'=>$cl_rate));