- Retour en arrière suite à une erreur dans mon dernier commit

This commit is contained in:
Benjamin Renard 2008-10-27 14:21:44 +00:00
parent aa6fa82acb
commit ab473fa16c
3 changed files with 1 additions and 64 deletions

View file

@ -27,7 +27,6 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'posixAccount', 'posixAccount',
'sambaSamAccount', 'sambaSamAccount',
), ),
'orderby' => 'displayValue', // Valeurs possibles : 'displayValue' ou 'subDn'
'rdn' => 'uid', 'rdn' => 'uid',
'container_dn' => 'ou=people', 'container_dn' => 'ou=people',
'container_auto_create' => array( 'container_auto_create' => array(
@ -67,12 +66,6 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'label' => _('Identifiant'), 'label' => _('Identifiant'),
'ldap_type' => 'ascii', 'ldap_type' => 'ascii',
'html_type' => 'text', 'html_type' => 'text',
'html_options' => array(
'generate_value_format' => '%{givenName:1}.%{sn}',
'withoutAccent' => 1,
'replaceSpaces' => '.',
'lowerCase' => 1
),
'required' => 1, 'required' => 1,
'check_data' => array ( 'check_data' => array (
'alphanumeric' => array( 'alphanumeric' => array(
@ -347,13 +340,7 @@ $GLOBALS['LSobjects']['LSeepeople'] = array (
'generationTool' => true, 'generationTool' => true,
'autoGenerate' => false, 'autoGenerate' => false,
'chars' => 'abcdefgh', 'chars' => 'abcdefgh',
'lenght' => 5, 'lenght' => 5
'mail' => array(
'send' => 1,
'ask' => 1,
'subject' => "LSexample : votre nouveau mot de passe",
'msg' => "Votre mot de passe vient d'être modifié.\nNouveau mot de passe : %{mdp}"
)
), ),
'required' => 1, 'required' => 1,
'rights' => array( 'rights' => array(

View file

@ -34,8 +34,6 @@ class LSformElement_password extends LSformElement {
var $fieldTemplate = 'LSformElement_password_field.tpl'; var $fieldTemplate = 'LSformElement_password_field.tpl';
var $template = 'LSformElement_password.tpl'; var $template = 'LSformElement_password.tpl';
var $sendMail = false;
/** /**
* Recupère la valeur de l'élement passée en POST * Recupère la valeur de l'élement passée en POST
@ -58,16 +56,6 @@ class LSformElement_password extends LSformElement {
$this -> form -> _notUpdate[$this -> name] == true; $this -> form -> _notUpdate[$this -> name] == true;
return true; return true;
} }
//Mail
if (isset($_POST['LSformElement_password_'.$this -> name.'_send'])) {
if ($_POST['LSformElement_password_'.$this -> name.'_send']==1) {
$this -> sendMail = true;
}
}
else if ($this -> params['html_options']['mail']['send']==1) {
$this -> sendMail = true;
}
} }
return $retval; return $retval;
} }
@ -92,9 +80,6 @@ class LSformElement_password extends LSformElement {
'generate' => ($this -> params['html_options']['generationTool']==True), 'generate' => ($this -> params['html_options']['generationTool']==True),
'verify' => (!$this -> attr_html -> attribute -> ldapObject-> isNew()) 'verify' => (!$this -> attr_html -> attribute -> ldapObject-> isNew())
); );
if (isset($this -> params['html_options']['mail'])) {
$params['mail'] = $this -> params['html_options']['mail'];
}
$GLOBALS['LSsession'] -> addJSconfigParam($this -> name,$params); $GLOBALS['LSsession'] -> addJSconfigParam($this -> name,$params);
$GLOBALS['LSsession'] -> addJSscript('LSformElement_password_field.js'); $GLOBALS['LSsession'] -> addJSscript('LSformElement_password_field.js');

View file

@ -8,30 +8,6 @@ var LSformElement_password_field = new Class({
}, },
initialiseLSformElement_password_field: function() { initialiseLSformElement_password_field: function() {
// Mail
if (this.params['mail']) {
if (this.params.mail['ask']) {
this.mailBtn = new Element('img');
this.mailBtn.addClass('btn');
this.mailBtn.addEvent('click',this.onMailBtnClick.bind(this));
this.mailInput = new Element('input');
this.mailInput.setProperties({
name: 'LSformElement_password_' + this.name + '_send',
type: 'hidden'
});
if (this.params.mail['send']) {
this.mailInput.value = 1;
this.mailBtn.src = varLSdefault.imagePath('nomail.png');
}
else {
this.mailInput.value = 0;
this.mailBtn.src = varLSdefault.imagePath('mail.png');
}
this.mailBtn.injectAfter(this.input);
this.mailInput.injectAfter(this.mailBtn);
}
}
// ViewBtn // ViewBtn
this.viewBtn = new Element('img'); this.viewBtn = new Element('img');
this.viewBtn.src = varLSdefault.imagePath('view.png'); this.viewBtn.src = varLSdefault.imagePath('view.png');
@ -68,17 +44,6 @@ var LSformElement_password_field = new Class({
} }
}, },
onMailBtnClick: function() {
if (this.mailInput.value==1) {
this.mailInput.value = 0;
this.mailBtn.src = varLSdefault.imagePath('mail.png');
}
else {
this.mailInput.value = 1;
this.mailBtn.src = varLSdefault.imagePath('nomail.png');
}
},
onGenerateBtnClick: function() { onGenerateBtnClick: function() {
var data = { var data = {
template: 'LSform', template: 'LSform',