DirectorObjectForm: do not require inherited props

What worked fine for fields should now work for default properties
too.
This commit is contained in:
Thomas Gelf 2015-11-14 19:47:10 +01:00
parent 49f28b27ef
commit 9ea092c035
1 changed files with 3 additions and 0 deletions

View File

@ -177,6 +177,9 @@ abstract class DirectorObjectForm extends QuickForm
foreach ($props as $k => $v) {
if ($k !== 'object_name' && property_exists($inherited, $k)) {
$this->setElementValue($k, $v, $inherited->$k, $origins->$k);
if ($el = $this->getElement($k)) {
$el->setRequired(false);
}
} else {
$this->setElementValue($k, $v);
}