IcingaCommandForm: allow to import any command

fixes #12978
This commit is contained in:
Thomas Gelf 2016-11-15 18:23:39 +01:00
parent d5131f7fac
commit 2725ef54e6
1 changed files with 22 additions and 0 deletions

View File

@ -73,4 +73,26 @@ class IcingaCommandForm extends DirectorObjectForm
$this->setButtons();
}
protected function enumAllowedTemplates()
{
$object = $this->object();
$tpl = $this->db->enum($object->getTableName());
if (empty($tpl)) {
return array();
}
$id = $object->get('id');
if (array_key_exists($id, $tpl)) {
unset($tpl[$id]);
}
if (empty($tpl)) {
return array();
}
$tpl = array_combine($tpl, $tpl);
return $tpl;
}
}