- trunk/includes/class/class.LSattr_html_textarea.php

-> Correction d'un bug : reste d'une impossibilité d'une valeur multiple
- trunk/includes/class/class.LSattr_html_image.php &
  trunk/includes/class/class.LSattr_html_password.php
  -> Correction d'un bug : Retour d'erreur lors d'une valeur multiple
- trunk/includes/class/class.LSattribute.php :
  -> Correction d'un bug lors d'un mauvais retour du LSattr_html::addToForm()
- trunk/includes/js/LSdefault.js : Correction d'un bug d'affichage des erreurs
This commit is contained in:
Benjamin Renard 2008-07-18 14:43:19 +00:00
parent acd0c69e23
commit fce0276f57
5 changed files with 21 additions and 9 deletions

View file

@ -42,9 +42,19 @@ class LSattr_html_image extends LSattr_html {
$GLOBALS['LSerror'] -> addErrorCode(206,$this -> name);
return;
}
if (count($data)>1) {
$GLOBALS['LSerror'] -> addErrorCode(103,'password');
}
if ($data) {
if(is_array($data)) {
$element -> setValue($data[0]);
}
else {
$element -> setValue($data);
}
}
return $element;
}

View file

@ -45,11 +45,16 @@ class LSattr_html_password extends LSattr_html {
if (count($data)>1) {
$GLOBALS['LSerror'] -> addErrorCode(103,'password');
return;
}
if ($data) {
if(is_array($data)) {
$element -> setValue($data[0]);
}
else {
$element -> setValue($data);
}
}
return $element;
}

View file

@ -43,10 +43,6 @@ class LSattr_html_textarea extends LSattr_html {
return;
}
if (count($data)>1) {
$GLOBALS['LSerror'] -> addErrorCode(103,'textarea');
return;
}
if ($data) {
$element -> setValue($data);
}

View file

@ -294,8 +294,9 @@ class LSattribute {
$data='';
}
$element = $this -> html -> addToForm($form,'view',$data);
if(!$element) {
if(!$element instanceof LSformElement) {
$GLOBALS['LSerror'] -> addErrorCode(206,$this -> name);
return;
}
$element -> freeze();
return true;

View file

@ -36,7 +36,7 @@ var LSdefault = new Class({
}
if (this.LSerror.innerHTML != '') {
this.displayErrorBox.bind(this);
this.displayErrorBox();
}
},