feat: add links to cancel anonymous participations in emails

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-12-01 09:52:28 +01:00
parent b315e1d7ff
commit 9e6b232a78
12 changed files with 244 additions and 24 deletions

View File

@@ -87,14 +87,39 @@
style="padding: 20px 30px 40px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"
>
<p style="margin: 0">
<%= ngettext(
"Would you wish to cancel your attendance, visit the event page through the link above and click the « Attending » button.",
"Would you wish to cancel your attendance to one or several events, visit the event pages through the links above and click the « Attending » button.",
1
<%= gettext(
"If you wish to cancel your participation, simply click on the link below."
) %>
</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 20px 30px 60px 30px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="border-radius: 3px;">
<a
href={
~p"/participation/email/cancel/#{@event.uuid}/#{@participant.metadata.cancellation_token}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: 'Roboto', Helvetica, Arial, sans-serif; color: #3C376E; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>
<%= gettext("Cancel my attendance") %>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td
bgcolor="#ffffff"

View File

@@ -88,19 +88,62 @@
</table>
</td>
</tr>
<tr>
<td
bgcolor="#ffffff"
align="left"
style="padding: 20px 30px 40px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"
>
<p style="margin: 0">
<%= gettext(
"Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button."
) %>
</p>
</td>
</tr>
<%= if @participant.metadata.cancellation_token do %>
<tr>
<td
bgcolor="#ffffff"
align="left"
style="padding: 20px 30px 40px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"
>
<p style="margin: 0">
<%= gettext(
"If you wish to cancel your participation, simply click on the link below."
) %>
</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#ffffff" align="center" style="padding: 20px 30px 60px 30px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" style="border-radius: 3px;">
<a
href={
~p"/participation/email/cancel/#{@event.uuid}/#{@participant.metadata.cancellation_token}"
|> url()
|> URI.decode()
}
target="_blank"
style="font-size: 20px; font-family: 'Roboto', Helvetica, Arial, sans-serif; color: #3C376E; text-decoration: none; padding: 15px 25px; border-radius: 2px; border: 1px solid #3C376E; display: inline-block;"
>
<%= gettext("Cancel my attendance") %>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<% else %>
<tr>
<td
bgcolor="#ffffff"
align="left"
style="padding: 20px 30px 40px 30px; color: #474467; font-family: 'Roboto', Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 25px;"
>
<p style="margin: 0">
<%= gettext(
"Would you wish to update or cancel your attendance, simply access the event page through the link above and click on the Attending button."
) %>
</p>
</td>
</tr>
<% end %>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>