SyncPropertyForm: provide imports based on type

This commit is contained in:
Thomas Gelf 2015-12-02 15:21:12 +01:00
parent ef4eecae6f
commit f4e9ff14cf

View File

@ -73,7 +73,8 @@ class SyncPropertyForm extends DirectorObjectForm
}
if ($destination === 'import') {
$templates = $this->db->enumHostTemplates(); // ERR. type!
$funcTemplates = 'enum' . ucfirst($this->rule->object_type) . 'Templates';
$templates = $this->db->$funcTemplates();
$templates = array_combine($templates, $templates);
$this->addElement('select', 'source_expression', array(
'label' => $this->translate('Template'), // Objecttype?