summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/kolab_client_task.php4
-rw-r--r--public_html/js/kolab_admin.js5
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index 07864ff..2aedb27 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -1288,6 +1288,10 @@ class kolab_client_task
if (!empty($field['data-autocomplete'])) {
$assoc_fields[$idx] = !empty($data[$idx]) ? $data[$idx] : array();
}
+
+ if ($field['type'] == kolab_form::INPUT_CHECKBOX) {
+ $field['checked'] = $field['value'] == 'TRUE';
+ }
/*
if (!empty($field['suffix'])) {
$field['suffix'] = kolab_html::escape($this->translate($field['suffix']));
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index fac2aa6..a93d515 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -769,6 +769,11 @@ function kolab_admin()
delete data.json[this.name + '-unit'];
});
+ // checkbox inputs
+ $('input[type="checkbox"]', form).each(function() {
+ data.json[this.name] = this.checked ? 'TRUE' : 'FALSE';
+ });
+
return data;
};