This commit is contained in:
2019-06-05 00:02:53 +00:00
parent 9427fd1a8a
commit f4d9220d62
9 changed files with 195 additions and 88 deletions

View File

@@ -1,4 +1,4 @@
/* Xeslint-disable */
/* xeslint-disable */
///////////////////////////////
// gzform
//
@@ -11,6 +11,7 @@
// Add any new keys used to the block in locale.js=>commonKeysEditForm
import Vue from "vue";
import errorHandler from "./errorhandler";
import store from "../store";
var triggeringChange = false;
@@ -436,8 +437,8 @@ export default {
// This is required so that server errors can be cleared when input is changed
//
onChange(vm, ref) {
//eslint-disable-next-line
console.log("GZFORM::onChange triggered!");
//xeslint-disable-next-line
//console.log("GZFORM::onChange triggered!");
if (triggeringChange || vm.formState.loading) {
return;
}
@@ -505,5 +506,23 @@ export default {
newState.vm.formState.readOnly = newState.readOnly;
}
});
},
////////////////////////////////////
// Get form settings
// for form specified or empty object if there is none
// EAch form is responsible for what it stores and how it initializes, this just provides that
// the form does the actual work of what settings it requires
//
getFormSettings(formKey) {
var theFormSettings = store.state.formSettings[formKey];
return theFormSettings;
},
////////////////////////////////////
// Set form settings
// for form key specified
//
//
setFormSettings(formKey, formSettings) {
store.commit("setFormSettings", formKey, formSettings);
}
};