fix: [genericElements:form] Make sure current model have meta-templates

pull/37/head
mokaddem 2020-12-07 16:20:20 +01:00
parent aecf8df4f4
commit ad8ce73fdf
1 changed files with 8 additions and 6 deletions

View File

@ -62,12 +62,14 @@
);
}
}
$metaTemplateString = $this->element(
'genericElements/Form/metaTemplateScaffold', [
'metaTemplatesData' => $data['metaTemplates'],
'form' => $this->Form,
]
);
if (!empty($data['metaTemplates']) && $data['metaTemplates']->count() > 0) {
$metaTemplateString = $this->element(
'genericElements/Form/metaTemplateScaffold', [
'metaTemplatesData' => $data['metaTemplates'],
'form' => $this->Form,
]
);
}
$submitButtonData = ['model' => $modelForForm, 'formRandomValue' => $formRandomValue];
if (!empty($data['submit'])) {
$submitButtonData = array_merge($submitButtonData, $data['submit']);