5 commits - lib/client lib/kolab_client_task.php lib/kolab_html.php
Aleksander Machniak
machniak at kolabsys.com
Thu Mar 15 09:04:50 CET 2012
lib/client/kolab_client_task_user.php | 14 +++++++++++---
lib/kolab_client_task.php | 3 ++-
lib/kolab_html.php | 6 +++---
3 files changed, 16 insertions(+), 7 deletions(-)
New commits:
commit 14c80a0ed15dd961d1a5a39e433c3714b1fab9f7
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Mar 15 09:04:20 2012 +0100
Fix PHP warning when values of the select field aren't defined
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index a9cab18..b18a2b3 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -501,8 +501,10 @@ class kolab_client_task_user extends kolab_client_task
unset($field['values']['default']);
}
- $_fields[$idx]['options'] = array_combine($field['values'], $field['values']);
$_fields[$idx]['type'] = kolab_form::INPUT_SELECT;
+ if (!empty($field['values'])) {
+ $_fields[$idx]['options'] = array_combine($field['values'], $field['values']);
+ }
break;
default:
$_fields[$idx]['type'] = kolab_form::INPUT_TEXT;
commit 042c3c43a58041d6b0dd2c7b65294fc0a85b5114
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Mar 15 09:01:47 2012 +0100
Fix password fields handling
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index 6243a24..a9cab18 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -545,8 +545,9 @@ class kolab_client_task_user extends kolab_client_task
// Pre-populate password fields
$post = array('attribute' => 'userpassword');
$pass = $this->api->post('form_value.generate', null, $post);
- $data['userpassword'] = $data['userpassword2'] = $pass->get('userpassword');
+ $data['userpassword'] = $pass->get('userpassword');
}
+ $data['userpassword2'] = $data['userpassword'];
// Page title
$title = $this->translate('user.add');
commit c9a5401f63644fd9fd6b20241ea18f8c2925ad03
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Mar 15 08:57:34 2012 +0100
Move user type selector to Personal fieldset
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index 902f332..6243a24 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -405,6 +405,7 @@ class kolab_client_task_user extends kolab_client_task
// field-to-section map and fields order
$fields = array(
+ 'user_type_id' => 'personal',
'givenname' => 'personal',
'sn' => 'personal',
'displayname' => 'personal',
@@ -520,7 +521,7 @@ class kolab_client_task_user extends kolab_client_task
// Add user type id selector
$_fields['user_type_id'] = array(
- 'section' => 'system',
+ 'section' => 'personal',
'type' => kolab_form::INPUT_SELECT,
'options' => $accttypes,
'onchange' => "kadm.user_save(true, 'system')",
commit 1d6d366459640c4f61689e335e71725afd4ffda2
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Mar 15 08:55:40 2012 +0100
Add more attributes to the map
diff --git a/lib/client/kolab_client_task_user.php b/lib/client/kolab_client_task_user.php
index 95bf123..902f332 100644
--- a/lib/client/kolab_client_task_user.php
+++ b/lib/client/kolab_client_task_user.php
@@ -431,6 +431,9 @@ class kolab_client_task_user extends kolab_client_task
'alias' => 'system',
'mailhost' => 'system',
'kolabhomeserver' => 'system',
+ 'uidnumber' => 'system',
+ 'gidnumber' => 'system',
+ 'homedirectory' => 'system',
'mailquota' => 'config',
'cyrususerquota' => 'config',
@@ -439,6 +442,7 @@ class kolab_client_task_user extends kolab_client_task
'kolabdelegate' => 'config',
'kolaballowsmtprecipient' => 'config',
'kolaballowsmtpsender' => 'config',
+ 'shell' => 'config',
);
$event_fields = array();
commit 1577eeb3edcd5fd33dde5b6de936f797906e0ac6
Author: Aleksander Machniak <alec at alec.pl>
Date: Thu Mar 15 08:46:58 2012 +0100
Add autofocus attribute for username input in login form
diff --git a/lib/kolab_client_task.php b/lib/kolab_client_task.php
index c2d479b..67d3d29 100644
--- a/lib/kolab_client_task.php
+++ b/lib/kolab_client_task.php
@@ -548,7 +548,8 @@ class kolab_client_task
'type' => 'text',
'id' => 'login_name',
'name' => 'login[username]',
- 'value' => $post['username']));
+ 'value' => $post['username'],
+ 'autofocus' => true));
$password = kolab_html::label(array(
'for' => 'login_pass',
diff --git a/lib/kolab_html.php b/lib/kolab_html.php
index d69943d..afce918 100644
--- a/lib/kolab_html.php
+++ b/lib/kolab_html.php
@@ -35,8 +35,8 @@ class kolab_html
public static $td_attribs = array('colspan', 'rowspan');
public static $textarea_attribs = array('cols', 'rows', 'disabled', 'name', 'readonly', 'tabindex');
public static $input_attribs = array('checked', 'disabled', 'name', 'readonly', 'tabindex',
- 'type', 'size', 'maxlength', 'value');
- public static $select_attribs = array('multiple', 'name', 'size', 'disabled');
+ 'type', 'size', 'maxlength', 'value', 'autofocus');
+ public static $select_attribs = array('multiple', 'name', 'size', 'disabled', 'autofocus');
public static $option_attribs = array('selected', 'value', 'disabled');
public static $a_attribs = array('href', 'name', 'rel', 'tabindex', 'target');
public static $form_attribs = array('action', 'enctype', 'method', 'name', 'target');
@@ -300,7 +300,7 @@ class kolab_html
}
// boolean attributes
- if (preg_match('/^(checked|multiple|disabled|selected|readonly)$/', $key)) {
+ if (preg_match('/^(checked|multiple|disabled|selected|readonly|autofocus)$/', $key)) {
if ($value) {
$attrib_arr[] = sprintf('%s="%s"', $key, $key);
}
More information about the commits
mailing list