summaryrefslogtreecommitdiff
path: root/lib/client/kolab_client_task_settings.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/client/kolab_client_task_settings.php')
-rw-r--r--lib/client/kolab_client_task_settings.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/client/kolab_client_task_settings.php b/lib/client/kolab_client_task_settings.php
index ca9fb72..19b23e6 100644
--- a/lib/client/kolab_client_task_settings.php
+++ b/lib/client/kolab_client_task_settings.php
@@ -32,8 +32,10 @@ class kolab_client_task_settings extends kolab_client_task
);
protected $form_element_types = array(
- 'text', 'text-separated', 'select', 'multiselect', 'list', 'list-autocomplete', 'checkbox', 'password', 'ldap_url',
- 'text-quota', 'aci', 'imap_acl',
+ 'text', 'text-separated', 'text-quota', 'text-autocomplete',
+ 'select', 'multiselect',
+ 'list', 'list-autocomplete', 'checkbox', 'password', 'ldap_url',
+ 'aci', 'imap_acl',
);
protected $special_attributes = array('ou');
@@ -624,7 +626,7 @@ class kolab_client_task_settings extends kolab_client_task
// defined attributes
foreach ($attributes as $attr) {
$row = $cells;
- $type = $data['attributes']['form_fields'][$attr]['type'];
+ $type = $data['attributes']['form_fields'][$attr]['type'] ?: 'text';
$optional = $data['attributes']['form_fields'][$attr]['optional'];
$autocomplete = $data['attributes']['form_fields'][$attr]['autocomplete'];
$validate = $data['attributes']['form_fields'][$attr]['validate'];
@@ -634,6 +636,9 @@ class kolab_client_task_settings extends kolab_client_task
if ($type == 'list' && $autocomplete) {
$type = 'list-autocomplete';
}
+ else if ($type == 'text' && $autocomplete) {
+ $type = 'text-autocomplete';
+ }
if ($data['attributes']['fields'][$attr]) {
$valtype = 'static';
@@ -669,7 +674,7 @@ class kolab_client_task_settings extends kolab_client_task
// set cell content
$row['name']['body'] = !empty($available[$attr]) ? $available[$attr] : $attr;
- $row['type']['body'] = !empty($type) ? $type : 'text';
+ $row['type']['body'] = $type;
$row['readonly']['body'] = $valtype == 'auto-readonly' ? $yes : $no;
$row['optional']['body'] = $optional ? $yes : $no;
$row['validate']['body'] = $this->translate('attribute.validate.' . $n_validate);