summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphael Kabo <raphaelkabo@hey.com>2024-02-06 08:55:32 +0000
committerRaphael Kabo <raphaelkabo@hey.com>2024-02-06 08:55:32 +0000
commitc0f58b298248ba8682b556389525280c7088e025 (patch)
treebe1a429d1c1f2dc269ec0efb962ae8eacfd7601b
parent456de15aea325cec94a6c2c83c01442665670efb (diff)
Allow setting attendee visibility from UI
-rwxr-xr-xsrc/routes.js1
-rwxr-xr-xviews/event.handlebars7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/routes.js b/src/routes.js
index 475f5a0..ab12a3a 100755
--- a/src/routes.js
+++ b/src/routes.js
@@ -687,6 +687,7 @@ router.post("/attendevent/:eventID", async (req, res) => {
"attendees.$.name": req.body.attendeeName,
"attendees.$.email": req.body.attendeeEmail,
"attendees.$.number": req.body.attendeeNumber,
+ "attendees.$.visibility": !!req.body.attendeeVisible ? "public" : "private",
},
},
)
diff --git a/views/event.handlebars b/views/event.handlebars
index 763aa22..4402578 100755
--- a/views/event.handlebars
+++ b/views/event.handlebars
@@ -199,6 +199,13 @@
<input type="email" class="form-control" id="attendeeEmail" name="attendeeEmail" placeholder="We won't spam you <3" data-validation="email" data-validation-optional="true">
</div>
</div>
+ <div class="form-check">
+ <input class="form-check-input" type="checkbox" id="attendeeVisible" name="attendeeVisible" checked>
+ <label class="form-check-label" for="attendeeVisible">
+ Show my name in the public list of attendees
+ </label>
+ <p class="form-text small">If you choose to hide your name, only the event organiser will be able to see it.</p>
+ </div>
<div class="form-group">
<label for="removalPassword">Deletion password</label>
<p class="form-text small">You will need this password if you want to remove yourself from the list of event attendees. If you provided your email, you'll receive it by email. Otherwise, write it down now because it will <strong>not be shown again</strong>.</p>