diff options
-rw-r--r-- | js/init.js | 2 | ||||
-rw-r--r-- | lib/Controller/APIController.php | 9 |
2 files changed, 8 insertions, 3 deletions
@@ -95,7 +95,7 @@ new Vue({ var self = this; self.tabs = []; $.ajax({ - url: OC.generateUrl('/apps/issuetemplate/sections/' + this.app), + url: OC.generateUrl('/apps/issuetemplate/sections/' + this.getAppId()), method: 'GET', success: function (data) { self.tabs = data; 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; |