SyncPropertyForm: choosing imports should not fail
...with no templates available
This commit is contained in:
parent
dc7f9ac039
commit
3d64550802
|
@ -75,7 +75,10 @@ class SyncPropertyForm extends DirectorObjectForm
|
||||||
if ($destination === 'import') {
|
if ($destination === 'import') {
|
||||||
$funcTemplates = 'enum' . ucfirst($this->rule->object_type) . 'Templates';
|
$funcTemplates = 'enum' . ucfirst($this->rule->object_type) . 'Templates';
|
||||||
$templates = $this->db->$funcTemplates();
|
$templates = $this->db->$funcTemplates();
|
||||||
$templates = array_combine($templates, $templates);
|
if (! empty($templates)) {
|
||||||
|
$templates = array_combine($templates, $templates);
|
||||||
|
}
|
||||||
|
|
||||||
$this->addElement('select', 'source_expression', array(
|
$this->addElement('select', 'source_expression', array(
|
||||||
'label' => $this->translate('Template'), // Objecttype?
|
'label' => $this->translate('Template'), // Objecttype?
|
||||||
'multiOptions' => $this->optionalEnum($templates),
|
'multiOptions' => $this->optionalEnum($templates),
|
||||||
|
|
Loading…
Reference in New Issue