diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-08-15 18:38:47 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2018-08-15 18:39:17 +0300 |
commit | 152f4a248442c41e3c9105833b8dbb59aad10d0c (patch) | |
tree | d3c15039413bd49aad45dd60b1181ef4350be0b4 /lib | |
parent | 40d352837ae6c8f976ca0835a516bdb0cbd48e45 (diff) |
Fix input text fields
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib')
-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; |