mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 01:04:12 +02:00
DirectorObjectForm: object vars > command vars
This commit is contained in:
parent
11e5ef0362
commit
25a599cc53
@ -327,6 +327,18 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
$inheritedValue = null;
|
$inheritedValue = null;
|
||||||
$inheritFrom = false;
|
$inheritFrom = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Command vars are overridden at object level:
|
||||||
|
if (property_exists($inherits, $varname)) {
|
||||||
|
$inheritedValue = $inherits->$varname;
|
||||||
|
$inheritFrom = $origins->$varname;
|
||||||
|
if ($inheritFrom === $object->object_name) {
|
||||||
|
$inherited = false;
|
||||||
|
} else {
|
||||||
|
$inherited = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->addCommandField($field, $value, $inheritedValue, $inheritFrom);
|
$this->addCommandField($field, $value, $inheritedValue, $inheritFrom);
|
||||||
if ($inheritedValue !== null) {
|
if ($inheritedValue !== null) {
|
||||||
$this->getElement('var_' . $field->varname)->setRequired(false);
|
$this->getElement('var_' . $field->varname)->setRequired(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user