mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-12-27 10:53:48 +01:00
LSldapObjet->validateAttrsData() : if LSform is specified, only check LSform's not freezed attributes
This commit is contained in:
parent
5bf1a80aa2
commit
274ccad0f2
2 changed files with 25 additions and 1 deletions
|
@ -499,6 +499,28 @@ class LSform {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if form has a specified element (by attr name)
|
||||
*
|
||||
* @param[in] $attr string The element/attribute name
|
||||
*
|
||||
* @retval boolean
|
||||
**/
|
||||
public function hasElement($name) {
|
||||
return isset($this -> elements[$name]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a specified element (by attr name) is freezed
|
||||
*
|
||||
* @param[in] $attr string The element/attribute name
|
||||
*
|
||||
* @retval boolean
|
||||
**/
|
||||
public function isFreeze($name) {
|
||||
return isset($this -> elements[$name]) && $this -> elements[$name] -> isFreeze($name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ajoute une règle sur un élément du formulaire
|
||||
*
|
||||
|
|
|
@ -403,7 +403,9 @@ class LSldapObject {
|
|||
else {
|
||||
$LSform=false;
|
||||
}
|
||||
foreach($this -> attrs as $attr) {
|
||||
foreach($this -> attrs as $attr_name => $attr) {
|
||||
if ($LSform && (!$LSform -> hasElement($attr_name) || $LSform -> isFreeze($attr_name)))
|
||||
continue;
|
||||
$attr_values = $attr -> getValue();
|
||||
if (!$attr -> isValidate()) {
|
||||
if($attr -> isUpdate()) {
|
||||
|
|
Loading…
Reference in a new issue