mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 08:44:11 +02:00
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;
|
protected $db;
|
||||||
|
|
||||||
|
/** @var IcingaObject */
|
||||||
protected $object;
|
protected $object;
|
||||||
|
|
||||||
protected $objectName;
|
protected $objectName;
|
||||||
@ -1144,7 +1145,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function addImportsElement()
|
protected function addImportsElement($required = null)
|
||||||
{
|
{
|
||||||
$enum = $this->enumAllowedTemplates();
|
$enum = $this->enumAllowedTemplates();
|
||||||
if (empty($enum)) {
|
if (empty($enum)) {
|
||||||
@ -1158,7 +1159,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
. ' matters when importing properties from multiple templates: last one'
|
. ' matters when importing properties from multiple templates: last one'
|
||||||
. ' wins'
|
. ' wins'
|
||||||
),
|
),
|
||||||
'required' => !$this->isTemplate(),
|
'required' => ($required !== null ? $required : !$this->isTemplate()),
|
||||||
'multiOptions' => $this->optionallyAddFromEnum($enum),
|
'multiOptions' => $this->optionallyAddFromEnum($enum),
|
||||||
'sorted' => true,
|
'sorted' => true,
|
||||||
'class' => 'autosubmit'
|
'class' => 'autosubmit'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user