summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-03-14 20:11:35 +0100
committerAleksander Machniak <alec@alec.pl>2012-03-14 20:11:35 +0100
commit20e01ce079da94fa194cef212c5803668da7b270 (patch)
treebf2d690e5c634120860e82042f67b8f2585ea1f5
parent88a03514e019252a4de87d9cbf00376666fb6c8b (diff)
downloadwebadmin-20e01ce079da94fa194cef212c5803668da7b270.tar.gz
Support select field options from "form_fields"
-rw-r--r--lib/client/kolab_client_task_user.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index c8a6c2a..298e3bd 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -421,6 +421,7 @@ class kolab_client_task_user extends kolab_client_task
'postofficebox' => 'personal',
'postalcode' => 'personal',
'c' => 'personal',
+ 'preferredlanguage' => 'personal',
'mail' => 'system',
'uid' => 'system',
'userpassword' => 'system',
@@ -480,6 +481,16 @@ class kolab_client_task_user extends kolab_client_task
switch ($field['type']) {
case 'select':
+ if (!isset($field['values'])) {
+ // @TODO: call form_value.list_options
+ }
+
+ if (!empty($field['values']['default'])) {
+ $_fields[$idx]['value'] = $field['values']['default'];
+ unset($field['values']['default']);
+ }
+
+ $_fields[$idx]['options'] = array_combine($field['values'], $field['values']);
$_fields[$idx]['type'] = kolab_form::INPUT_SELECT;
break;
default: