Merge branch '384-support-requiring-end-date' into 'master'

Support requiring an end date

Closes #384

See merge request les/gancio!47
This commit is contained in:
les 2024-05-24 11:10:48 +00:00
commit 92263efd05
7 changed files with 14 additions and 0 deletions

View file

@ -83,6 +83,7 @@ v-col(cols=12)
:disabled='!value.fromHour'
readonly
:prepend-icon="mdiClockTimeEightOutline"
:rules="[settings.allow_event_without_end_time ? true : $validators.required('event.due')]"
v-bind="attrs"
v-on="on")
v-time-picker(

View file

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

View file

@ -182,6 +182,7 @@
"title_description": "Dieses wird im Seitentitel, in der Betreffzeile von E-Mails, beim Export von RSS-Feeds und ICS angezeigt.",
"description_description": "Erscheint in der Kopfzeile neben dem Titel",
"allow_recurrent_event": "Wiederkehrende Veranstaltungen erlauben",
"allow_event_without_end_time": "Erlaube Veranstaltungen ohne Endzeit",
"recurrent_event_visible": "Wiederkehrende Veranstaltungen sind standardmäßig sichtbar",
"enable_federation": "Federation aktivieren",
"allow_anon_event": "Kann man auch anonyme Veranstaltungen (vorausgesetzt, diese werden genehmigt) eintragen?",

View file

@ -235,6 +235,7 @@
"enable_report_hint": "Any visitor could report an event, admins are notified via e-mail",
"allow_multidate_event": "Allow multi-day events",
"allow_recurrent_event": "Allow recurring events",
"allow_event_without_end_time": "Allow events without end time",
"allow_online_event": "Allow online events",
"allow_geolocation": "Allow events geolocation",
"allow_geolocation_hint": "Optionally set the exact location of an event on a geographic map",

View file

@ -26,6 +26,7 @@ const defaultSettings = {
allow_anon_event: true,
allow_multidate_event: true,
allow_recurrent_event: false,
allow_event_without_end_time: true,
allow_online_event: true,
show_download_media: true,
enable_moderation: false,

View file

@ -77,6 +77,7 @@ module.exports = {
allow_registration: settings.allow_registration,
allow_anon_event: settings.allow_anon_event,
allow_recurrent_event: settings.allow_recurrent_event,
allow_event_without_end_time: settings.allow_event_without_end_time,
enable_moderation: settings.enable_moderation,
enable_report: settings.enable_report,
allow_multidate_event: settings.allow_multidate_event,

View file

@ -12,6 +12,7 @@ export const state = () => ({
enable_report: false,
allow_multidate_event: true,
allow_recurrent_event: true,
allow_event_without_end_time: true,
allow_online_event: true,
show_download_media: true,
allow_geolocation: false,