Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove remaining usages of contact & domain values in participant templates #21963

Merged
merged 1 commit into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions CRM/Event/BAO/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -1455,15 +1455,13 @@ public static function sendTransitionParticipantMail(
'contactId' => $contactId,
'tokenContext' => ['participantId' => $participantId],
'tplParams' => [
'contact' => $contactDetails,
'domain' => $domainValues,
'participant' => $participantValues,
'event' => $eventDetails,
'paidEvent' => $eventDetails['is_monetary'] ?? NULL,
'isShowLocation' => $eventDetails['is_show_location'] ?? NULL,
'isAdditional' => $participantValues['registered_by_id'],
'isExpired' => $mailType == 'Expired',
'isConfirm' => $mailType == 'Confirm',
'isExpired' => $mailType === 'Expired',
'isConfirm' => $mailType === 'Confirm',
'checksumValue' => $checksumValue,
],
'from' => $receiptFrom,
Expand Down
19 changes: 19 additions & 0 deletions CRM/Upgrade/Incremental/MessageTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,25 @@ protected function getTemplateUpdates() {
['name' => 'participant_cancelled', 'type' => 'html'],
],
],

[
'version' => '5.44.alpha1',
'upgrade_descriptor' => ts('Use domain and contact tokens instead of smarty values'),
'label' => ts('Participant Expired'),
'templates' => [
['name' => 'participant_expired', 'type' => 'text'],
['name' => 'participant_expired', 'type' => 'html'],
],
],
[
'version' => '5.44.alpha1',
'upgrade_descriptor' => ts('Use domain and contact tokens instead of smarty values'),
'label' => ts('Participant Confirmed'),
'templates' => [
['name' => 'participant_confirm', 'type' => 'text'],
['name' => 'participant_confirm', 'type' => 'html'],
],
],
];
}

Expand Down
8 changes: 4 additions & 4 deletions xml/templates/message_templates/participant_confirm_html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}<p>{$greeting},</p>{/if}
<p>{ts}This is an invitation to complete your registration that was initially waitlisted.{/ts}</p>
</td>
</tr>
Expand Down Expand Up @@ -134,15 +134,15 @@
</tr>
{/if}

{if $contact.email}
{if '{contact.email}'}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$contact.email}
{contact.email}
</td>
</tr>
{/if}
Expand Down Expand Up @@ -172,7 +172,7 @@
{/if}
<tr>
<td colspan="2" {$valueStyle}>
<p>{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions.{/ts}</p>
<p>{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions.{/ts}</p>
</td>
</tr>

Expand Down
8 changes: 4 additions & 4 deletions xml/templates/message_templates/participant_confirm_text.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if}

{ts}This is an invitation to complete your registration that was initially waitlisted.{/ts}

Expand Down Expand Up @@ -67,18 +67,18 @@ Click this link to go to a web page where you can confirm your registration onli
{ts}Download iCalendar File:{/ts} {$icalFeed}
{/if}

{if $contact.email}
{if '{contact.email}'}

===========================================================
{ts}Registered Email{/ts}

===========================================================
{$contact.email}
{contact.email}
{/if}

{if $register_date}
{ts}Registration Date{/ts}: {$participant.register_date|crmDate}
{/if}

{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions.{/ts}
{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions.{/ts}

10 changes: 5 additions & 5 deletions xml/templates/message_templates/participant_expired_html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@

<tr>
<td>
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}<p>{$greeting},</p>{/if}
{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}<p>{$greeting},</p>{/if}
<p>{ts 1=$event.event_title}Your pending event registration for %1 has expired
because you did not confirm your registration.{/ts}</p>
<p>{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions
<p>{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions
or want to inquire about reinstating your registration for this event.{/ts}</p>
</td>
</tr>
Expand Down Expand Up @@ -90,15 +90,15 @@ or want to inquire about reinstating your registration for this event.{/ts}</p>
{/foreach}
{/if}

{if $contact.email}
{if '{contact.email}'}
<tr>
<th {$headerStyle}>
{ts}Registered Email{/ts}
</th>
</tr>
<tr>
<td colspan="2" {$valueStyle}>
{$contact.email}
{contact.email}
</td>
</tr>
{/if}
Expand All @@ -120,7 +120,7 @@ or want to inquire about reinstating your registration for this event.{/ts}</p>

<tr>
<td>
<p>{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions.{/ts}</p>
<p>{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions.{/ts}</p>
</td>
</tr>

Expand Down
10 changes: 5 additions & 5 deletions xml/templates/message_templates/participant_expired_text.tpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{assign var="greeting" value="{contact.email_greeting}"}{if $greeting}{$greeting},{/if}
{assign var="greeting" value="{contact.email_greeting_display}"}{if $greeting}{$greeting},{/if}

{ts 1=$event.event_title}Your pending event registration for %1 has expired
because you did not confirm your registration.{/ts}


{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions
{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions
or want to inquire about reinstating your registration for this event.{/ts}

===========================================================
Expand Down Expand Up @@ -34,18 +34,18 @@ or want to inquire about reinstating your registration for this event.{/ts}
{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
{/if}

{if $contact.email}
{if '{contact.email}'}

===========================================================
{ts}Registered Email{/ts}

===========================================================
{$contact.email}
{contact.email}
{/if}

{if $register_date}
{ts}Registration Date{/ts}: {$participant.register_date|crmDate}
{/if}

{ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions.{/ts}
{ts 1='{domain.phone}' 2='{domain.email}'}Please contact us at %1 or send email to %2 if you have questions.{/ts}