summaryrefslogtreecommitdiff
path: root/public_html
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-04-08 16:56:19 (GMT)
committerAleksander Machniak <alec@alec.pl>2013-04-08 16:56:19 (GMT)
commit20a18a04fa602ca8a1216ab1fa30e37a23d44dc8 (patch)
tree940895cadaed072bda8354edc13148017497b3e7 /public_html
parent97fdcc8f69e76afb149092c655fcf004d573eccf (diff)
downloadkolab-wap-20a18a04fa602ca8a1216ab1fa30e37a23d44dc8.tar.gz
Fix 'alias' field definition in "mail-enabled POSIX user" type (Bug #1736).
Fix form field update when field is a (single) input, but generate returns an array
Diffstat (limited to 'public_html')
-rw-r--r--public_html/js/kolab_admin.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index 959f0f1..ab2261e 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -1304,16 +1304,17 @@ function kolab_admin()
this.form_value_response = function(response)
{
- var i, val;
+ var i, val, field;
if (!this.api_response(response))
return;
for (i in response.result) {
val = response.result[i];
+ field = $('[name="'+i+'"]');
// @TODO: indexed list support
if ($.isArray(val))
- val = val.join("\n");
- $('[name="'+i+'"]').val(val);
+ val = field.is('textarea') ? val.join("\n") : val.shift();
+ field.val(val);
this.form_element_update({name: i});
}