This commit is contained in:
@@ -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()
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user