SyncPropertyForm: Only try to enum imports when we are able to
This allows a user to use fields or custom expression for serviceSet. refs #12891
This commit is contained in:
parent
39538a3f33
commit
699b6a7293
|
@ -160,14 +160,16 @@ class SyncPropertyForm extends DirectorObjectForm
|
|||
|
||||
if ($destination === 'import') {
|
||||
$funcTemplates = 'enum' . ucfirst($this->rule->get('object_type')) . 'Templates';
|
||||
$templates = $this->db->$funcTemplates();
|
||||
if (! empty($templates)) {
|
||||
$templates = array_combine($templates, $templates);
|
||||
}
|
||||
if (method_exists($this->db, $funcTemplates)) {
|
||||
$templates = $this->db->$funcTemplates();
|
||||
if (! empty($templates)) {
|
||||
$templates = array_combine($templates, $templates);
|
||||
}
|
||||
|
||||
$importTitle = $this->translate('Existing templates');
|
||||
$columns[$importTitle] = $templates;
|
||||
natsort($columns[$importTitle]);
|
||||
$importTitle = $this->translate('Existing templates');
|
||||
$columns[$importTitle] = $templates;
|
||||
natsort($columns[$importTitle]);
|
||||
}
|
||||
}
|
||||
|
||||
$xpTitle = $this->translate('Expert mode');
|
||||
|
|
Loading…
Reference in New Issue