chg: [genericElement:fieldScaffold] Let cake's form helper decide the input type if not specified
parent
b121399304
commit
21c5601c29
|
@ -1,11 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
if (is_array($fieldData)) {
|
if (is_array($fieldData)) {
|
||||||
if (empty($fieldData['type'])) {
|
|
||||||
$fieldData['type'] = 'text';
|
|
||||||
}
|
|
||||||
$fieldTemplate = 'genericField';
|
$fieldTemplate = 'genericField';
|
||||||
if (file_exists(ROOT . '/templates/element/genericElements/Form/Fields/' . $fieldData['type'] . 'Field.php')) {
|
if (!empty($fieldData['type'])) {
|
||||||
$fieldTemplate = $fieldData['type'] . 'Field';
|
if (file_exists(ROOT . '/templates/element/genericElements/Form/Fields/' . $fieldData['type'] . 'Field.php')) {
|
||||||
|
$fieldTemplate = $fieldData['type'] . 'Field';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (empty($fieldData['label'])) {
|
if (empty($fieldData['label'])) {
|
||||||
if (!isset($fieldData['label']) || $fieldData['label'] !== false) {
|
if (!isset($fieldData['label']) || $fieldData['label'] !== false) {
|
||||||
|
|
Loading…
Reference in New Issue