This commit is contained in:
@@ -184,6 +184,9 @@ export default {
|
||||
//debugger;
|
||||
//console.log("CHANGE - " + ref);
|
||||
this.$gzv.Change(this, ref);
|
||||
//Make form re-validate here and if it works then make it do it only if gzv.change returns true or something indicating it's required to re-validate or clear that input's errors
|
||||
// this.$refs.form.resetValidation();
|
||||
// this.$refs.form.validate();
|
||||
},
|
||||
getDataFromApi() {
|
||||
var url = "Widget/" + this.$route.params.id;
|
||||
@@ -198,13 +201,9 @@ export default {
|
||||
|
||||
var that = this;
|
||||
var url = "Widget/" + this.$route.params.id;
|
||||
|
||||
//clear any errors that might be around from previous submit
|
||||
for (var variableKey in this.serverError) {
|
||||
if (this.serverError.hasOwnProperty(variableKey)) {
|
||||
delete this.serverError[variableKey];
|
||||
}
|
||||
}
|
||||
|
||||
//clear any errors that might be around from previous submit
|
||||
this.$gzv.RemoveAllProperties(this.serverError);
|
||||
|
||||
this.$gzapi
|
||||
.upsert(url, this.obj)
|
||||
@@ -215,8 +214,6 @@ export default {
|
||||
that.serverError = res.error;
|
||||
// that.$refs.form.resetValidation();
|
||||
// that.$refs.form.validate();
|
||||
//example error when submit when there are no roles set at all (blank)
|
||||
//{"error":{"code":"2200","details":[{"code":"2200","message":"","target":"roles","error":"VALIDATION_FAILED"}],"message":"Object did not pass validation"}}
|
||||
} else {
|
||||
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
|
||||
if (res.id) {
|
||||
|
||||
Reference in New Issue
Block a user