diff options
author | Raphael Kabo <mail@raphaelkabo.com> | 2022-04-25 19:03:24 +0100 |
---|---|---|
committer | Raphael Kabo <mail@raphaelkabo.com> | 2022-04-25 19:03:24 +0100 |
commit | 1c8348d553988f5474c8d7896c2804dc1d62159a (patch) | |
tree | 16990fae56e848e430312c2238be89268f937a75 /views | |
parent | 168c2430e1e727429b76871cc32a9951e4391658 (diff) |
feat: Add subscribe to group functionality
Diffstat (limited to 'views')
-rw-r--r-- | views/emails/subscribed.handlebars | 9 | ||||
-rwxr-xr-x | views/eventgroup.handlebars | 35 |
2 files changed, 44 insertions, 0 deletions
diff --git a/views/emails/subscribed.handlebars b/views/emails/subscribed.handlebars new file mode 100644 index 0000000..3a3c4ad --- /dev/null +++ b/views/emails/subscribed.handlebars @@ -0,0 +1,9 @@ +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">You have been subscribed to the event group '{{eventGroupName}}' on {{siteName}}.</p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: +0; Margin-bottom: 15px;">You will receive emails when new events are added to +the group, and can unsubscribe at any time.</p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">Love,</p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">{{siteName}}</p> +<hr/> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;"><strong>Hold up - I don't want to receive these emails any more!</strong></p> +<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; Margin-bottom: 15px;">If you didn't subscribe yourself to this event group on {{siteName}}, someone may have accidentally typed your email instead of theirs. <a href="https://{{domain}}/unsubscribe/{{eventGroupID}}?email={{emailAddress}}">Click here to unsubscribe</a>.</p> diff --git a/views/eventgroup.handlebars b/views/eventgroup.handlebars index 25b29d0..9afee2c 100755 --- a/views/eventgroup.handlebars +++ b/views/eventgroup.handlebars @@ -76,6 +76,11 @@ </div> <div class="col-lg-3" id="eventActions"> <aside class="btn-group-vertical d-flex" role="group" aria-label="Event actions"> + <button type="button" class="btn btn-outline-secondary btn-sm" + data-event-id="{{eventGroupData.id}}" data-toggle="modal" + data-target="#subscribeModal"> + <i class="fas fa-envelope"></i> Subscribe to updates + </button> <button type="button" id="exportICS" class="btn btn-outline-secondary btn-sm" data-event-id="{{eventGroupData.id}}"> <i class="fas fa-download"></i> Export as ICS @@ -157,6 +162,36 @@ {{/if}} +<div class="modal fade" id="subscribeModal" tabindex="-1" role="dialog" + aria-labelledby="subscribeModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <h5 class="modal-title" id="subscribeModalLabel">Subscribe to '{{eventGroupData.name}}'</h5> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + </div> + <form id="subscribeForm" action="/subscribe/{{eventGroupData.id}}" method="post"> + <div class="modal-body"> + <div class="form-group"> + <p class="form-text small">Enter your email address to receive updates + whenever a new event is created in this group.</p> + </div> + <div class="form-group"> + <input type="email" class="form-control" id="emailAddress" + name="emailAddress" placeholder="email@example.com" data-validation="required"> + </div> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="submit" class="btn btn-success">Subscribe</button> + </div> + </form> + </div> + </div> +</div> + <div class="modal fade" id="editTokenModal" tabindex="-1" role="dialog" aria-labelledby="editTokenModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> |