summaryrefslogtreecommitdiff
path: root/public_html
diff options
context:
space:
mode:
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});
}