summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2024-03-04 11:35:37 +0000
committerGitHub <noreply@github.com>2024-03-04 11:35:37 +0000
commit6f0721686aea7647554ad0f3ee4f6099bff4ef58 (patch)
tree50b20e89f067ccaf7121037e889881e1af1f6396 /views
parent724df500a009ec5bebe0911c59892058e74dc4e2 (diff)
parentdd55bdf8fac285d3ade31542c65b57c11f061c93 (diff)
Merge pull request #142 from lowercasename/rk/patches-1
Minor patches
Diffstat (limited to 'views')
-rwxr-xr-xviews/event.handlebars8
1 files changed, 4 insertions, 4 deletions
diff --git a/views/event.handlebars b/views/event.handlebars
index 5da0330..6485ec5 100755
--- a/views/event.handlebars
+++ b/views/event.handlebars
@@ -221,7 +221,7 @@
</div>
</div>
-<div class="modal fade" id="unattendModal" tabindex="-1" role="dialog" aria-labelledby="unattendModalLabel" aria-hidden="true">
+<div class="modal fade" id="unattendModal" tabindex="-1" role="dialog" aria-labelledby="unattendModalLabel" aria-hidden="true" x-data="{ message: {}, password: '' }">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
@@ -230,13 +230,13 @@
<span aria-hidden="true">&times;</span>
</button>
</div>
- <form id="unattendEventForm" action="/unattendevent/{{eventData.id}}" method="post">
+ <form id="unattendEventForm" x-on:submit.prevent="fetch(`/event/attendee/{{eventData.id}}?${new URLSearchParams({ p: password }).toString()}`, { method: 'DELETE' }).then(response => response.ok ? window.location.reload() : response.json()).then(data => message = data)">
<div class="modal-body">
<div class="form-group">
<label for="removalPassword" class="form-label">Your deletion password</label>
<p class="form-text small">Lost your password? Get in touch with the event organiser.</p>
- <input type="text" class="form-control" id="removalPassword"
- name="removalPassword">
+ <div x-bind:class="{ 'alert-danger': message?.error, 'alert-success': message?.success }" class="alert" x-text="message?.error || message?.success" x-show="message?.error || message?.success"></div>
+ <input type="password" class="form-control" id="removalPassword" name="removalPassword" x-model="password" required>
</div>
</div>
<div class="modal-footer">