summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-02-21 12:57:03 +0100
committerAleksander Machniak <alec@alec.pl>2012-02-21 12:57:03 +0100
commit30998a87f6804b900d060fd66d86c53791950858 (patch)
treeb2c53616ae5be194e1bb88d3c05142f299e718c5
parent2f73148c6c3188020968903f1ec85aefa1fe38a1 (diff)
downloadwebadmin-30998a87f6804b900d060fd66d86c53791950858.tar.gz
Fixed typo in serialize_form()
-rw-r--r--lib/client/kolab_client_task_user.php6
-rw-r--r--public_html/js/kolab_admin.js2
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index 928f30b..69bb996 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -286,6 +286,7 @@ class kolab_client_task_user extends kolab_client_task
'type' => kolab_form::INPUT_TEXT,
'maxlength' => 50,
'required' => true,
+ 'system' => true,
),
'password2' => array(
'label' => 'user.password-confirm',
@@ -293,6 +294,7 @@ class kolab_client_task_user extends kolab_client_task
'type' => kolab_form::INPUT_TEXT,
'maxlength' => 50,
'required' => true,
+ 'system' => true,
),
'kolabhomeserver' => array(
'label' => 'user.homeserver',
@@ -375,7 +377,7 @@ class kolab_client_task_user extends kolab_client_task
foreach ($auto_fields as $af_idx => $af) {
foreach ($fields as $section_idx => $section) {
foreach ($section['fields'] as $idx => $field) {
- if ($idx == $af_idx) {
+ if ($idx == $af_idx && empty($field['system'])) {
$fields[$section_idx]['fields'][$idx]['readonly'] = true;
$fields[$section_idx]['fields'][$idx]['disabled'] = true;
$fields[$section_idx]['fields'][$idx]['required'] = false;
@@ -394,7 +396,7 @@ class kolab_client_task_user extends kolab_client_task
foreach ($fields as $section_idx => $section) {
foreach ($section['fields'] as $idx => $field) {
// Disable fields not allowed for specified user type
- if (!array_key_exists($idx, $form_fields)) {
+ if (empty($field['system']) && !array_key_exists($idx, $form_fields)) {
$fields[$section_idx]['fields'][$idx]['readonly'] = true;
$fields[$section_idx]['fields'][$idx]['disabled'] = true;
$fields[$section_idx]['fields'][$idx]['required'] = false;
diff --git a/public_html/js/kolab_admin.js b/public_html/js/kolab_admin.js
index f88c34f..8be609c 100644
--- a/public_html/js/kolab_admin.js
+++ b/public_html/js/kolab_admin.js
@@ -398,7 +398,7 @@ function kolab_admin()
this.trigger_event('form-serialize', {id: id, json: json});
- return i.json;
+ return json;
};
/*********************************************************/