This commit is contained in:
2019-04-04 17:20:42 +00:00
parent 8f6887d5f3
commit 67d46052c7
3 changed files with 26 additions and 48 deletions

View File

@@ -174,19 +174,12 @@ export default {
return {
obj: {},
serverError: {},
formReady: false,
someerror:
"blah blahv <br/> blah blah" + "\n test line 3" + "\r\n Test line 4"
formReady: false
};
},
methods: {
Change(ref) {
//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();
Change(ref) {
this.$gzv.Change(this, ref);
},
getDataFromApi() {
var url = "Widget/" + this.$route.params.id;
@@ -224,27 +217,11 @@ export default {
that.obj.concurrencyToken = res.data.concurrencyToken;
}
}
})
.catch(function(error) {
//we should be here if it was a gross error of some kind not a mild one like validation but more like if the server doesn't exist or something I guess
console.log(error);
alert("Houston, we have a problem");
});
//In theory all exceptions should be handled by the gzapi methods, so we should not need to deal with this in the form very often if at all
// .catch(function(error) {
// });
//example from login form
// if (this.input.username != "" && this.input.password != "") {
// auth
// .authenticate(this.input.username, this.input.password)
// .then(() => {
// this.$router.replace({ name: "home" });
// })
// .catch(function(error) {
// /* xeslint-disable-next-line */
// //console.log(error);
// alert("login failed: " + error);
// });
// }
} //end of submit()
}
};