If 'event only online' is not allowed: reset place and online_locations

This commit is contained in:
sedum 2023-02-22 18:25:06 +01:00
parent 39b8e918b6
commit 4f4ff96d50

View file

@ -172,13 +172,19 @@ export default {
this.place.latitude = p.latitude
this.place.longitude = p.longitude
}
// Prevent to provide link for 'event only online' if not allowed: reset locations
if (!this.settings.allow_event_only_online && this.place.name === 'online') {
// If 'event only online' is not allowed: reset place and online_locations
if (this.place.name === 'online') {
if (!this.settings.allow_event_only_online) {
this.$nextTick(() => { this.$refs.place && this.$refs.place.setValue('') && this.$refs.place.focus() })
this.event.online_locations = []
return
} else {
this.event_online_only = true
}
}
this.disableAddress = false
this.$refs.place.blur()
this.$nextTick(() => { this.$refs.address.focus() })
this.$nextTick(() => { this.$refs.address && this.$refs.address.focus() })
}
}
this.$emit('input', { ...this.place })