allow to disable multi-day events, fix #215

This commit is contained in:
lesion 2022-12-05 23:03:10 +01:00
parent d536499a08
commit 6391a21956
No known key found for this signature in database
GPG key ID: 352918250B012177
6 changed files with 13 additions and 2 deletions

View file

@ -3,12 +3,11 @@ v-col(cols=12)
.text-center
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-model='type' color='primary' @change='type => change("type", type)')
v-btn(value='normal' label="normal") {{ $t('event.normal') }}
v-btn(value='multidate' label='multidate') {{ $t('event.multidate') }}
v-btn(v-if='settings.allow_multidate_event' value='multidate' label='multidate') {{ $t('event.multidate') }}
v-btn(v-if='settings.allow_recurrent_event' value='recurrent' label="recurrent") {{ $t('event.recurrent') }}
p {{ $t(`event.${type}_description`) }}
v-btn-toggle.v-col-6.flex-column.flex-sm-row(v-if='type === "recurrent"' color='primary' :value='value.recurrent.frequency' @change='fq => change("frequency", fq)')
v-btn(v-for='f in frequencies' :key='f.value' :value='f.value') {{ f.text }}

View file

@ -39,6 +39,10 @@ v-container
inset
:label="$t('admin.allow_anon_event')")
v-switch.mt-1(v-model='allow_multidate_event'
inset
:label="$t('admin.allow_multidate_event')")
v-switch.mt-1(v-model='allow_recurrent_event'
inset
:label="$t('admin.allow_recurrent_event')")
@ -107,6 +111,10 @@ export default {
get () { return this.settings.allow_recurrent_event },
set (value) { this.setSetting({ key: 'allow_recurrent_event', value }) }
},
allow_multidate_event: {
get () { return this.settings.allow_multidate_event },
set (value) { this.setSetting({ key: 'allow_multidate_event', value }) }
},
recurrent_event_visible: {
get () { return this.settings.recurrent_event_visible },
set (value) { this.setSetting({ key: 'recurrent_event_visible', value }) }

View file

@ -192,6 +192,7 @@
"event_remove_ok": "Event removed",
"allow_registration_description": "Allow open registrations?",
"allow_anon_event": "Allow anonymous events (has to be confirmed)?",
"allow_multidate_event": "Allow multi-day events",
"allow_recurrent_event": "Allow recurring events",
"allow_geolocation": "Allow events geolocation",
"recurrent_event_visible": "Show recurring events by default",

View file

@ -27,6 +27,7 @@ const defaultSettings = {
instance_place: '',
allow_registration: true,
allow_anon_event: true,
allow_multidate_event: true,
allow_recurrent_event: false,
recurrent_event_visible: false,
allow_geolocation: true,

View file

@ -80,6 +80,7 @@ module.exports = {
allow_registration: settings.allow_registration,
allow_anon_event: settings.allow_anon_event,
allow_recurrent_event: settings.allow_recurrent_event,
allow_multidate_event: settings.allow_multidate_event,
recurrent_event_visible: settings.recurrent_event_visible,
enable_federation: settings.enable_federation,
enable_resources: settings.enable_resources,

View file

@ -6,6 +6,7 @@ export const state = () => ({
instance_name: '',
allow_registration: true,
allow_anon_event: true,
allow_multidate_event: true,
allow_recurrent_event: true,
recurrent_event_visible: false,
allow_geolocation: false,