From 1069c3be6d2a5b9cf96c8decbc6bb95d42da32cc Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 29 Apr 2010 08:10:21 +0000 Subject: [PATCH] Updated password field handling git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17922 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/ihtml/themes/default/login.tpl | 2 +- gosa-core/include/smarty/plugins/function.factory.php | 9 ++++++--- .../personal/{generic => myaccount}/password.tpl | 11 +++++++---- 3 files changed, 14 insertions(+), 8 deletions(-) rename gosa-core/plugins/personal/{generic => myaccount}/password.tpl (60%) diff --git a/gosa-core/ihtml/themes/default/login.tpl b/gosa-core/ihtml/themes/default/login.tpl index 795dd6d9f..049d83501 100644 --- a/gosa-core/ihtml/themes/default/login.tpl +++ b/gosa-core/ihtml/themes/default/login.tpl @@ -46,7 +46,7 @@
diff --git a/gosa-core/include/smarty/plugins/function.factory.php b/gosa-core/include/smarty/plugins/function.factory.php index 7156feb92..42640241f 100644 --- a/gosa-core/include/smarty/plugins/function.factory.php +++ b/gosa-core/include/smarty/plugins/function.factory.php @@ -15,14 +15,17 @@ function smarty_function_factory($params, &$smarty) switch($type){ // Generate a password input field, with CapsLock detection. - case 'password' : + case 'password' : + + // Maxlength has a default of 40 characters + $maxlengthReady = (empty($maxlength))?'maxlength="40"': $maxlengthReady; $str .= ""; } return($str); diff --git a/gosa-core/plugins/personal/generic/password.tpl b/gosa-core/plugins/personal/myaccount/password.tpl similarity index 60% rename from gosa-core/plugins/personal/generic/password.tpl rename to gosa-core/plugins/personal/myaccount/password.tpl index 7ec439601..253e513d6 100644 --- a/gosa-core/plugins/personal/generic/password.tpl +++ b/gosa-core/plugins/personal/myaccount/password.tpl @@ -5,19 +5,22 @@ - + - +
+ {factory type='password' id='new_password' name='new_password' onfocus="nextfield='repeated_password'"}
+ {factory type='password' id='repeated_password' name='repeated_password' onfocus="nextfield='password_finish'"} +


- - + +
-- 2.30.2