X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=user_add.php;fp=user_add.php;h=a3d956ea677d74597511710dc611c98730ad9b09;hb=e5129e06ab4547945e1ad3097e4193930465f93f;hp=56bd69b3c4a9a0092ded73bd269daa2bb2142eed;hpb=8b16d7c0b05921ad6d90c1e5342c02d62b093414;p=timetracker.git 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));