Merge branch 'bug/fixes' into 'master'

Fix event creation/updating having a popup

See merge request framasoft/mobilizon!232
This commit is contained in:
Thomas Citharel 2019-10-09 19:42:26 +02:00
commit e0c6e59957
3 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
{ {
"A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.": "A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.", "A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.": "A user-friendly, emancipatory and ethical tool for gathering, organising, and mobilising.",
"A validation email was sent to {email}": "A validation email was sent to {email}", "A validation email was sent to {email}": "A validation email was sent to {email}",
"Abandon edition": "Abandon edition",
"About Mobilizon": "About Mobilizon", "About Mobilizon": "About Mobilizon",
"About this event": "About this event", "About this event": "About this event",
"About this instance": "About this instance", "About this instance": "About this instance",

View File

@ -1,5 +1,6 @@
{ {
"A validation email was sent to {email}": "Un email de validation a été envoyé à {email}", "A validation email was sent to {email}": "Un email de validation a été envoyé à {email}",
"Abandon edition": "Abandonner l'édition",
"About this event": "À propos de cet événement", "About this event": "À propos de cet événement",
"About this instance": "À propos de cette instance", "About this instance": "À propos de cette instance",
"About": "À propos", "About": "À propos",

View File

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