From ff0fe499763bae042286f11c9686ace616949557 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Fri, 14 Jun 2019 16:10:28 +0100 Subject: [PATCH] Allow multiple forms per plugin --- src/components/panelLeft.vue | 113 ++++++++++++++++++----------------- 1 file changed, 58 insertions(+), 55 deletions(-) diff --git a/src/components/panelLeft.vue b/src/components/panelLeft.vue index 915b0a75..f17326cd 100644 --- a/src/components/panelLeft.vue +++ b/src/components/panelLeft.vue @@ -29,7 +29,7 @@ - + @@ -79,62 +79,65 @@ export default { id: 'test-plugin', icon: 'code', requireConnection: false, - schema: [ + forms: [ { - fieldType: "htmlBlock", - name: "heading", - content: "This is a cool plugin!" - }, - { - fieldType: "selectList", - name: "title", - multi: false, - label: "Title", - options: ["", "Mr", "Ms", "Mx", "Dr", "Madam", "Lord"] - }, - { - fieldType: "textInput", - placeholder: "Name", - label: "Name", - name: "name", - value: "Squidward" - }, - { - fieldType: "numberInput", - placeholder: "Age", - name: "age", - label: "Age", - minValue: 0 - }, - [ - { - fieldType: "numberInput", - placeholder: "Number", - name: "leftnum", - label: "Left" - }, - { - fieldType: "numberInput", - placeholder: "Number", - name: "rightnum", - label: "Right" - } - ], - { - fieldType: "radioList", - name: "coolness", - label: "Coolness", - options: ["None", "Some", "Very"], - value: "Some" - }, - { - fieldType: "checkList", - name: "ingredients", - label: "Ingredients", - options: ["Pork", "Pie"], - value: ["Pork"] - }, + route: "/test/foo", + schema: [ + { + fieldType: "htmlBlock", + name: "heading", + content: "This is a cool plugin!" + }, + { + fieldType: "selectList", + name: "title", + multi: false, + label: "Title", + options: ["", "Mr", "Ms", "Mx", "Dr", "Madam", "Lord"] + }, + { + fieldType: "textInput", + placeholder: "Name", + label: "Name", + name: "name" + }, + { + fieldType: "numberInput", + placeholder: "Age", + name: "age", + label: "Age", + minValue: 0 + }, + [ + { + fieldType: "numberInput", + placeholder: "Number", + name: "leftnum", + label: "Left" + }, + { + fieldType: "numberInput", + placeholder: "Number", + name: "rightnum", + label: "Right" + } + ], + { + fieldType: "radioList", + name: "coolness", + label: "Coolness", + options: ["None", "Some", "Very"] + }, + { + fieldType: "checkList", + name: "ingredients", + label: "Ingredients", + options: ["Pork", "Pie"] + }, + ] + } ] + } ] }