fix: [genericElements:form] Make sure current model have meta-templates
parent
aecf8df4f4
commit
ad8ce73fdf
|
@ -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']);
|
||||
|
|
Loading…
Reference in New Issue