chg: [genericForm] Fallback entity to null (to model-less form) if not provided
parent
7f067acfa2
commit
465b257d6e
|
@ -13,8 +13,7 @@
|
|||
'submit' => [
|
||||
'action' => $this->request->getParam('action')
|
||||
],
|
||||
],
|
||||
'entity' => null,
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
$modelForForm = empty($data['model']) ?
|
||||
h(\Cake\Utility\Inflector::singularize(\Cake\Utility\Inflector::classify($this->request->getParam('controller')))) :
|
||||
h($data['model']);
|
||||
$entity = isset($entity) ? $entity : null;
|
||||
$fieldsString = '';
|
||||
$simpleFieldWhitelist = [
|
||||
'default', 'type', 'placeholder', 'label', 'empty', 'rows', 'div', 'required'
|
||||
|
|
Loading…
Reference in New Issue