Loading src/components/panelLeft.vue +2 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ :submit-label="form.submitLabel" :self-update="form.selfUpdate" :schema="form.schema" @reloadForms="updatePlugins()" /> <hr /> </div> Loading Loading @@ -201,6 +202,7 @@ export default { methods: { updatePlugins: function() { console.log("Updating plugin forms"); axios .get(this.pluginsUri) .then(response => { Loading src/components/pluginComponents/JsonForm.vue +10 −11 Original line number Diff line number Diff line Loading @@ -4,11 +4,7 @@ <div class="uk-text-bold uk-text-uppercase uk-width-expand"> {{ name }} </div> <a v-if="selfUpdate" href="#" class="uk-icon uk-width-auto" @click="getFormData()" <a href="#" class="uk-icon uk-width-auto" @click="updateForm()" ><i class="material-icons">cached</i></a > </div> Loading Loading @@ -171,9 +167,14 @@ export default { } }, updateForm(fieldName, value) { this.$set(this.formData, fieldName, value); this.$emit("input", this.formData); updateForm() { // Trigger a plugin form update this.$emit("reloadForms"); // If the form can self-update (GET request to update component values) if (this.selfUpdate) { // Update form data values using a GET request this.getFormData(); } }, getFormData: function() { Loading @@ -199,9 +200,7 @@ export default { // Do something with the response console.log(response); // Update the form data if we're self-updating if (this.selfUpdate) { this.getFormData(); } this.updateForm(); }) .catch(error => { this.modalError(error); // Let mixin handle error Loading Loading
src/components/panelLeft.vue +2 −0 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ :submit-label="form.submitLabel" :self-update="form.selfUpdate" :schema="form.schema" @reloadForms="updatePlugins()" /> <hr /> </div> Loading Loading @@ -201,6 +202,7 @@ export default { methods: { updatePlugins: function() { console.log("Updating plugin forms"); axios .get(this.pluginsUri) .then(response => { Loading
src/components/pluginComponents/JsonForm.vue +10 −11 Original line number Diff line number Diff line Loading @@ -4,11 +4,7 @@ <div class="uk-text-bold uk-text-uppercase uk-width-expand"> {{ name }} </div> <a v-if="selfUpdate" href="#" class="uk-icon uk-width-auto" @click="getFormData()" <a href="#" class="uk-icon uk-width-auto" @click="updateForm()" ><i class="material-icons">cached</i></a > </div> Loading Loading @@ -171,9 +167,14 @@ export default { } }, updateForm(fieldName, value) { this.$set(this.formData, fieldName, value); this.$emit("input", this.formData); updateForm() { // Trigger a plugin form update this.$emit("reloadForms"); // If the form can self-update (GET request to update component values) if (this.selfUpdate) { // Update form data values using a GET request this.getFormData(); } }, getFormData: function() { Loading @@ -199,9 +200,7 @@ export default { // Do something with the response console.log(response); // Update the form data if we're self-updating if (this.selfUpdate) { this.getFormData(); } this.updateForm(); }) .catch(error => { this.modalError(error); // Let mixin handle error Loading