Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/issuetemplate.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/init.js2
-rw-r--r--lib/Controller/APIController.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/js/init.js b/js/init.js
index 6662355..7dc729f 100644
--- a/js/init.js
+++ b/js/init.js
@@ -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;