diff --git a/js/src/views/Event/Edit.vue b/js/src/views/Event/Edit.vue
index d5579131..950a435c 100644
--- a/js/src/views/Event/Edit.vue
+++ b/js/src/views/Event/Edit.vue
@@ -267,13 +267,18 @@
- {{
- $t("Save draft")
- }}
+ {{ $t("Save draft") }}
@@ -457,6 +462,8 @@ export default class EditEvent extends Vue {
endsOnNull = false;
+ saving = false;
+
displayNameAndUsername = displayNameAndUsername;
formatList = formatList;
@@ -517,6 +524,7 @@ export default class EditEvent extends Vue {
}
createOrUpdatePublish(e: Event): void {
+ e.preventDefault();
if (this.validateForm()) {
this.event.draft = false;
this.createOrUpdateDraft(e);
@@ -552,6 +560,7 @@ export default class EditEvent extends Vue {
}
async createEvent(): Promise {
+ this.saving = true;
const variables = await this.buildVariables();
try {
@@ -575,11 +584,13 @@ export default class EditEvent extends Vue {
params: { uuid: data.createEvent.uuid },
});
} catch (err) {
+ this.saving = false;
console.error(err);
}
}
async updateEvent(): Promise {
+ this.saving = true;
const variables = await this.buildVariables();
try {
@@ -601,6 +612,7 @@ export default class EditEvent extends Vue {
params: { uuid: this.eventId as string },
});
} catch (err) {
+ this.saving = false;
console.error(err);
}
}