This commit is contained in:
2019-04-05 21:17:14 +00:00
parent 2c57e9f97f
commit 94ab7e8831
3 changed files with 67 additions and 204 deletions

View File

@@ -6,14 +6,14 @@
<v-flex xs12 mt-1 mb-2>
<v-alert
ref="errorbox"
v-show="this.$gzv.ErrorBoxErrors(this)"
v-show="errorBoxMessage"
color="error"
icon="fa-exclamation-circle "
value="true"
transition="scale-transition"
class="multi-line"
outline
>{{this.$gzv.ErrorBoxErrors(this)}}</v-alert>
>{{errorBoxMessage}}</v-alert>
</v-flex>
<v-flex xs12 sm6 lg4 xl3 px-2>
<v-text-field
@@ -174,6 +174,7 @@ export default {
return {
obj: {},
serverError: {},
errorBoxMessage:null,
formReady: false
};
},
@@ -194,11 +195,13 @@ export default {
var url = "Widget/" + this.$route.params.id;
//clear any errors that might be around from previous submit
this.$gzutil.RemoveAllPropertiesFromObject(this.serverError);
this.$gzv.ClearServerErrors(this);
//this.$gzutil.RemoveAllPropertiesFromObject(this.serverError);
this.$gzapi.upsert(url, this.obj).then(res => {
if (res.error) {
that.serverError = res.error;
that.$gzv.SetErrorBoxErrors(that);
} 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) {