DirectorObjectForm: Allow form to select if imports are required
refs #12920
This commit is contained in:
parent
ad11f89abf
commit
cc61831258
|
@ -14,6 +14,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
{
|
||||
protected $db;
|
||||
|
||||
/** @var IcingaObject */
|
||||
protected $object;
|
||||
|
||||
protected $objectName;
|
||||
|
@ -1144,7 +1145,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function addImportsElement()
|
||||
protected function addImportsElement($required = null)
|
||||
{
|
||||
$enum = $this->enumAllowedTemplates();
|
||||
if (empty($enum)) {
|
||||
|
@ -1158,7 +1159,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
. ' matters when importing properties from multiple templates: last one'
|
||||
. ' wins'
|
||||
),
|
||||
'required' => !$this->isTemplate(),
|
||||
'required' => ($required !== null ? $required : !$this->isTemplate()),
|
||||
'multiOptions' => $this->optionallyAddFromEnum($enum),
|
||||
'sorted' => true,
|
||||
'class' => 'autosubmit'
|
||||
|
|
Loading…
Reference in New Issue