LSform :: dataEntryForm : Added requiredAllAttributes parameter

This commit is contained in:
Benjamin Renard 2010-11-29 12:36:35 +01:00
parent 8e7fb51570
commit e6eb1b56c5

View file

@ -140,7 +140,7 @@ class LSform {
continue;
}
$element = $this -> elements[$elementName];
if (isset($this -> dataEntryFormConfig['requiredAttributes']) && is_array($this -> dataEntryFormConfig['requiredAttributes']) && in_array($elementName,$this -> dataEntryFormConfig['requiredAttributes'])) {
if ((isset($this -> dataEntryFormConfig['requiredAllAttributes']) && $this -> dataEntryFormConfig['requiredAllAttributes']) || isset($this -> dataEntryFormConfig['requiredAttributes']) && is_array($this -> dataEntryFormConfig['requiredAttributes']) && in_array($elementName,$this -> dataEntryFormConfig['requiredAttributes'])) {
$element -> setRequired();
}
$field = array();
@ -435,7 +435,7 @@ class LSform {
continue;
}
$element = $this -> elements[$elementName];
if (isset($this -> dataEntryFormConfig['requiredAttributes']) && is_array($this -> dataEntryFormConfig['requiredAttributes']) && in_array($elementName,$this -> dataEntryFormConfig['requiredAttributes'])) {
if ((isset($this -> dataEntryFormConfig['requiredAllAttributes']) && $this -> dataEntryFormConfig['requiredAllAttributes']) || isset($this -> dataEntryFormConfig['requiredAttributes']) && is_array($this -> dataEntryFormConfig['requiredAttributes']) && in_array($elementName,$this -> dataEntryFormConfig['requiredAttributes'])) {
$element -> setRequired();
}
if( !($element -> getPostData($this -> _postData)) ) {