diff options
author | Raphael <mail@raphaelkabo.com> | 2024-02-26 15:06:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-26 15:06:01 +0000 |
commit | de688444d167fdb80c6e88b8ba837405ba7651a6 (patch) | |
tree | 051fa37a2fe30052254bf79a60bd870667fcc0b7 /public/js/modules | |
parent | afd9fc4477fff90e5db917f350d99c3d01fba2bd (diff) | |
parent | 1275280a9e3a31f6080079d564a8fb9e1847db8b (diff) |
Merge pull request #135 from lowercasename/rk/public-events
Events and groups optionally visible on front page
Diffstat (limited to 'public/js/modules')
-rw-r--r-- | public/js/modules/event-edit.js | 2 | ||||
-rw-r--r-- | public/js/modules/group-edit.js | 5 | ||||
-rw-r--r-- | public/js/modules/new.js | 7 |
3 files changed, 14 insertions, 0 deletions
diff --git a/public/js/modules/event-edit.js b/public/js/modules/event-edit.js index 740c861..736547f 100644 --- a/public/js/modules/event-edit.js +++ b/public/js/modules/event-edit.js @@ -32,6 +32,7 @@ function editEventForm() { creatorEmail: window.eventData.creatorEmail, eventGroupID: window.eventData.eventGroupID, eventGroupEditToken: window.eventData.eventGroupEditToken, + publicCheckbox: window.eventData.showOnPublicList, interactionCheckbox: window.eventData.usersCanComment, joinCheckbox: window.eventData.usersCanAttend, maxAttendeesCheckbox: window.eventData.maxAttendees !== null, @@ -53,6 +54,7 @@ function editEventForm() { this.data.joinCheckbox = window.eventData.usersCanAttend; this.data.maxAttendeesCheckbox = window.eventData.maxAttendees !== null; + this.data.publicCheckbox = window.eventData.showOnPublicList; }, async submitForm() { this.submitting = true; diff --git a/public/js/modules/group-edit.js b/public/js/modules/group-edit.js index 1a2c1db..2d55346 100644 --- a/public/js/modules/group-edit.js +++ b/public/js/modules/group-edit.js @@ -27,6 +27,11 @@ function editEventGroupForm() { eventGroupURL: window.groupData.url, hostName: window.groupData.hostName, creatorEmail: window.groupData.creatorEmail, + publicCheckbox: window.groupData.showOnPublicList, + }, + init() { + // Set checkboxes + this.data.publicCheckbox = window.groupData.showOnPublicList; }, errors: [], submitting: false, diff --git a/public/js/modules/new.js b/public/js/modules/new.js index a018087..f7c3e34 100644 --- a/public/js/modules/new.js +++ b/public/js/modules/new.js @@ -87,6 +87,7 @@ function newEventForm() { creatorEmail: "", eventGroupID: "", eventGroupEditToken: "", + publicCheckbox: false, interactionCheckbox: false, joinCheckbox: false, maxAttendeesCheckbox: false, @@ -107,6 +108,7 @@ function newEventForm() { this.data.interactionCheckbox = false; this.data.joinCheckbox = false; this.data.maxAttendeesCheckbox = false; + this.data.publicCheckbox = false; }, async submitForm() { this.submitting = true; @@ -160,6 +162,11 @@ function newEventGroupForm() { eventGroupURL: "", hostName: "", creatorEmail: "", + publicCheckbox: false, + }, + init() { + // Reset checkboxes + this.data.publicCheckbox = false; }, errors: [], submitting: false, |