Fix event creation/updating having a popup

Also change translation on the warning

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-10-09 19:41:17 +02:00
parent adb8592029
commit 84f8e16cd0
3 changed files with 5 additions and 1 deletions

View File

@@ -254,6 +254,7 @@ import { ITag } from '@/types/tag.model';
import AddressAutoComplete from '@/components/Event/AddressAutoComplete.vue';
import { buildFileFromIPicture, buildFileVariable } from '@/utils/image';
import IdentityPickerWrapper from '@/views/Account/IdentityPickerWrapper.vue';
import { RouteName } from '@/router';
@Component({
components: { IdentityPickerWrapper, AddressAutoComplete, TagInput, DateTimePicker, PictureUpload, Editor },
@@ -514,7 +515,7 @@ export default class EditEvent extends Vue {
this.$buefy.dialog.confirm({
title,
message,
confirmText: this.$t('Cancel') as string,
confirmText: this.$t('Abandon edition') as string,
cancelText: this.$t('Continue editing') as string,
type: 'is-warning',
hasIcon: true,
@@ -530,6 +531,7 @@ export default class EditEvent extends Vue {
}
beforeRouteLeave(to, from, next) {
if (to.name === RouteName.EVENT) return next();
this.confirmGoElsewhere(() => next());
}