diff --git a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php index f5f6dc8f..f28cce64 100644 --- a/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php +++ b/trunk/conf/LSobjects/config.LSobjects.LSeepeople.php @@ -103,24 +103,6 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'modify' => 0, ) ), - 'cn' => array ( - 'label' => _('Nom complet'), - 'ldap_type' => 'ascii', - 'html_type' => 'text', - 'required' => 1, - 'default_value' => 'titi', - 'validation' => 'valid', - 'rights' => array( - 'self' => 'w', - 'user' => 'r', - 'admin' => 'w' - ), - 'view' => 1, - 'form' => array ( - 'modify' => 1, - 'create' => 1 - ) - ), 'givenName' => array ( 'label' => _('Prenom'), 'ldap_type' => 'ascii', @@ -160,6 +142,27 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'create' => 1 ) ), + 'cn' => array ( + 'label' => _('Nom complet'), + 'ldap_type' => 'ascii', + 'html_type' => 'text', + 'html_options' => array( + 'generate_value_format' => '%{givenName} %{sn}', + 'autoGenerateOnModify' => false // default : false + ), + 'required' => 1, + 'validation' => 'valid', + 'rights' => array( + 'self' => 'w', + 'user' => 'r', + 'admin' => 'w' + ), + 'view' => 1, + 'form' => array ( + 'modify' => 1, + 'create' => 1 + ) + ), 'gidNumber' => array ( 'label' => _('Groupe principal'), 'ldap_type' => 'numeric', @@ -254,6 +257,10 @@ $GLOBALS['LSobjects']['LSeepeople'] = array ( 'label' => _('Adresse e-mail'), 'ldap_type' => 'ascii', 'html_type' => 'text', + 'html_options' => array( + 'generate_value_format' => '%{uid}@ls.com', + 'autoGenerateOnModify' => true + ), 'required' => 1, 'check_data' => array ( 'email' => array( diff --git a/trunk/conf/config.inc.php b/trunk/conf/config.inc.php index 4b33bd41..a5847339 100644 --- a/trunk/conf/config.inc.php +++ b/trunk/conf/config.inc.php @@ -110,6 +110,7 @@ define('LS_CSS_DIR', 'templates/css/'); $GLOBALS['defaultJSscipts']=array( 'mootools-core.js', 'mootools-more.js', + 'functions.js', 'LSdefault.js' ); diff --git a/trunk/includes/class/class.LSformElement_text.php b/trunk/includes/class/class.LSformElement_text.php index ca362ddb..76475a52 100644 --- a/trunk/includes/class/class.LSformElement_text.php +++ b/trunk/includes/class/class.LSformElement_text.php @@ -43,7 +43,10 @@ class LSformElement_text extends LSformElement { $return = $this -> getLabelInfos(); // value if (!$this -> isFreeze()) { - $return['html'] = "