diff options
Diffstat (limited to 'lib/Controller/APIController.php')
-rw-r--r-- | lib/Controller/APIController.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Controller/APIController.php b/lib/Controller/APIController.php index 83daed8..d777682 100644 --- a/lib/Controller/APIController.php +++ b/lib/Controller/APIController.php @@ -96,11 +96,16 @@ class APIController extends Controller { /** @var IDetail $detail */ foreach ($section->getDetails() as $detail) { $model[$section->getIdentifier()][$detail->getIdentifier()] = $detail->getInformation(); - $group['fields'][] = [ - 'type' => $this->getTypeFieldSchema($detail->getType()), + $type = $this->getTypeFieldSchema($detail->getType()); + $field = [ + 'type' => $type, 'label' => $detail->getTitle(), 'model' => $section->getIdentifier() . '.' . $detail->getIdentifier() ]; + if ($type === 'input') { + $field['inputType'] = 'text'; + } + $group['fields'][] = $field; } $schema['groups'][] = $group; |