From 060625d681a21cfc22a8771826d2b1c6a3ce6c94 Mon Sep 17 00:00:00 2001
From: yashodha
Date: Thu, 11 Aug 2016 14:57:22 +0530
Subject: [PATCH] CRM-18508: Display State/Province in event address in
registration emails (handled upgrade as well)
----------------------------------------
* CRM-18508: State/Province not shown in Event Confirmation Emails
https://issues.civicrm.org/jira/browse/CRM-18508
---
.../civicrm_msg_template.tpl | 16 +
.../event_offline_receipt_html.tpl | 513 +++++++++++++++++
.../event_offline_receipt_text.tpl | 292 ++++++++++
.../event_online_receipt_html.tpl | 514 ++++++++++++++++++
.../event_online_receipt_text.tpl | 302 ++++++++++
.../event_registration_receipt_html.tpl | 175 ++++++
.../event_registration_receipt_text.tpl | 80 +++
.../participant_cancelled_html.tpl | 129 +++++
.../participant_cancelled_text.tpl | 47 ++
.../participant_confirm_html.tpl | 184 +++++++
.../participant_confirm_text.tpl | 81 +++
.../participant_expired_html.tpl | 132 +++++
.../participant_expired_text.tpl | 51 ++
.../participant_transferred_html.tpl | 129 +++++
.../participant_transferred_text.tpl | 45 ++
.../payment_or_refund_notification_html.tpl | 255 +++++++++
.../payment_or_refund_notification_text.tpl | 104 ++++
CRM/Upgrade/Incremental/sql/4.7.11.mysql.tpl | 3 +
.../event_registration_receipt_html.tpl | 16 +-
.../event_registration_receipt_text.tpl | 16 +-
.../participant_cancelled_html.tpl | 19 +-
.../participant_cancelled_text.tpl | 14 +-
.../participant_confirm_html.tpl | 19 +-
.../participant_confirm_text.tpl | 14 +-
.../participant_expired_html.tpl | 19 +-
.../participant_expired_text.tpl | 14 +-
.../participant_transferred_html.tpl | 19 +-
.../participant_transferred_text.tpl | 14 +-
.../payment_or_refund_notification_html.tpl | 16 +-
.../payment_or_refund_notification_text.tpl | 14 +-
30 files changed, 3064 insertions(+), 182 deletions(-)
create mode 100644 CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_text.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_html.tpl
create mode 100644 CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_text.tpl
diff --git a/CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl b/CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl
new file mode 100644
index 0000000000..3db538690e
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl
@@ -0,0 +1,16 @@
+{php}
+ $dir = SMARTY_DIR . '/../../CRM/Upgrade/4.7.11.msg_template/message_templates';
+ $templates = array();
+ foreach (preg_grep('/\.tpl$/', scandir($dir)) as $filename) {
+ $parts = explode('_', basename($filename, '.tpl'));
+ $templates[] = array('type' => array_pop($parts), 'name' => implode('_', $parts), 'filename' => "$dir/$filename");
+ }
+ $this->assign('templates', $templates);
+{/php}
+
+{foreach from=$templates item=tpl}
+ {fetch assign=content file=$tpl.filename}
+ SELECT @workflow_id := MAX(id) FROM civicrm_option_value WHERE name = '{$tpl.name}';
+ SELECT @content := msg_{$tpl.type} FROM civicrm_msg_template WHERE workflow_id = @workflow_id AND is_reserved = 1 LIMIT 1;
+ UPDATE civicrm_msg_template SET msg_{$tpl.type} = '{$content|escape:"quotes"}' WHERE workflow_id = @workflow_id AND (is_reserved = 1 OR (is_default = 1 AND msg_{$tpl.type} = @content));
+{/foreach}
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_html.tpl
new file mode 100644
index 0000000000..58ff6f1fd1
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_html.tpl
@@ -0,0 +1,513 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting}
+
+ {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+ {$event.confirm_email_text|htmlize}
+ {/if}
+
+ {if $isOnWaitlist}
+ {ts}You have been added to the WAIT LIST for this event.{/ts}
+ {if $isPrimary}
+ {ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
+ {/if}
+ {elseif $isRequireApproval}
+ {ts}Your registration has been submitted.{/ts}
+ {if $isPrimary}
+ {ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
+ {/if}
+ {elseif $is_pay_later}
+ {$pay_later_receipt} {* FIXME: this might be text rather than HTML *}
+ {else}
+ {ts}Please print this confirmation for your records.{/ts}
+ {/if}
+
+ |
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+ {if $event.participant_role neq 'Attendee' and $defaultRole}
+
+
+ {ts}Participant Role{/ts}
+ |
+
+ {$event.participant_role}
+ |
+
+ {/if}
+
+ {if $isShowLocation}
+
+
+ {$location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $location.phone.1.phone || $location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}
+ {$phone.phone_type_display}
+ {else}
+ {ts}Phone{/ts}
+ {/if}
+ |
+
+ {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $event.is_public}
+
+
+ {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+ {ts}Download iCalendar File{/ts}
+ |
+
+ {/if}
+
+ {if $email}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$email}
+ |
+
+ {/if}
+
+
+ {if $event.is_monetary}
+
+
+
+ {$event.fee_label}
+ |
+
+
+ {if $lineItem}
+ {foreach from=$lineItem item=value key=priceset}
+ {if $value neq 'skip'}
+ {if $isPrimary}
+ {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
+
+
+ {ts 1=$priceset+1}Participant %1{/ts}
+ |
+
+ {/if}
+ {/if}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Qty{/ts} |
+ {ts}Each{/ts} |
+ {if $dataArray}
+ {ts}SubTotal{/ts} |
+ {ts}Tax Rate{/ts} |
+ {ts}Tax Amount{/ts} |
+ {/if}
+ {ts}Total{/ts} |
+ {if $pricesetFieldsCount }{ts}Total Participants{/ts} | {/if}
+
+ {foreach from=$value item=line}
+
+
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description|truncate:30:"..."} {/if}
+ |
+
+ {$line.qty}
+ |
+
+ {$line.unit_price|crmMoney}
+ |
+ {if $dataArray}
+
+ {$line.unit_price*$line.qty|crmMoney}
+ |
+ {if $line.tax_rate != "" || $line.tax_amount != ""}
+
+ {$line.tax_rate|string_format:"%.2f"}%
+ |
+
+ {$line.tax_amount|crmMoney}
+ |
+ {else}
+ |
+ |
+ {/if}
+ {/if}
+
+ {$line.line_total+$line.tax_amount|crmMoney}
+ |
+ {if $pricesetFieldsCount }
+
+ {$line.participant_count}
+ |
+ {/if}
+
+ {/foreach}
+
+ |
+
+ {/if}
+ {/foreach}
+ {if $dataArray}
+
+
+ {ts}Amount Before Tax:{/ts}
+ |
+
+ {$totalAmount-$totalTaxAmount|crmMoney}
+ |
+
+ {foreach from=$dataArray item=value key=priceset}
+
+ {if $priceset || $priceset == 0}
+ {$taxTerm} {$priceset|string_format:"%.2f"}% |
+ {$value|crmMoney:$currency} |
+ {else}
+ {ts}No{/ts} {$taxTerm} |
+ {$value|crmMoney:$currency} |
+ {/if}
+
+ {/foreach}
+ {/if}
+ {/if}
+
+ {if $amount && !$lineItem}
+ {foreach from=$amount item=amnt key=level}
+
+
+ {$amnt.amount|crmMoney} {$amnt.label}
+ |
+
+ {/foreach}
+ {/if}
+ {if $totalTaxAmount}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+ {if $isPrimary}
+
+
+ {if $balanceAmount}
+ {ts}Total Paid{/ts}
+ {else}
+ {ts}Total Amount{/ts}
+ {/if}
+ |
+
+ {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+ |
+
+ {if $balanceAmount}
+
+
+ {ts}Balance{/ts}
+ |
+
+ {$balanceAmount|crmMoney}
+ |
+
+ {/if}
+ {if $pricesetFieldsCount }
+
+
+ {ts}Total Participants{/ts} |
+
+ {assign var="count" value= 0}
+ {foreach from=$lineItem item=pcount}
+ {assign var="lineItemCount" value=0}
+ {if $pcount neq 'skip'}
+ {foreach from=$pcount item=p_count}
+ {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
+ {/foreach}
+ {if $lineItemCount < 1 }
+ assign var="lineItemCount" value=1}
+ {/if}
+ {assign var="count" value=$count+$lineItemCount}
+ {/if}
+ {/foreach}
+ {$count}
+ |
+
+ {/if}
+ {if $is_pay_later}
+
+
+ {$pay_later_receipt}
+ |
+
+ {/if}
+
+ {if $register_date}
+
+
+ {ts}Registration Date{/ts}
+ |
+
+ {$register_date|crmDate}
+ |
+
+ {/if}
+
+ {if $receive_date}
+
+
+ {ts}Transaction Date{/ts}
+ |
+
+ {$receive_date|crmDate}
+ |
+
+ {/if}
+
+ {if $financialTypeName}
+
+
+ {ts}Financial Type{/ts}
+ |
+
+ {$financialTypeName}
+ |
+
+ {/if}
+
+ {if $trxn_id}
+
+
+ {ts}Transaction #{/ts}
+ |
+
+ {$trxn_id}
+ |
+
+ {/if}
+
+ {if $paidBy}
+
+
+ {ts}Paid By{/ts}
+ |
+
+ {$paidBy}
+ |
+
+ {/if}
+
+ {if $checkNumber}
+
+
+ {ts}Check Number{/ts}
+ |
+
+ {$checkNumber}
+ |
+
+ {/if}
+
+ {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ |
+
+ {/if}
+
+ {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+ {/if}
+
+ {/if} {* End of conditional section for Paid events *}
+
+ {if $customPre}
+
+
+ {$customPre_grouptitle}
+ |
+
+ {foreach from=$customPre item=value key=customName}
+ {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$value}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $customPost}
+
+
+ {$customPost_grouptitle}
+ |
+
+ {foreach from=$customPost item=value key=customName}
+ {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$value}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $customProfile}
+ {foreach from=$customProfile item=value key=customName}
+
+
+ {ts 1=$customName+1}Participant Information - Participant %1{/ts}
+ |
+
+ {foreach from=$value item=val key=field}
+ {if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost'}
+
+
+ {if $field eq 'additionalCustomPre'}
+ {$additionalCustomPre_grouptitle}
+ {else}
+ {$additionalCustomPost_grouptitle}
+ {/if}
+ |
+
+ {foreach from=$val item=v key=f}
+
+
+ {$f}
+ |
+
+ {$v}
+ |
+
+ {/foreach}
+ {/if}
+ {/foreach}
+ {/foreach}
+ {/if}
+
+ {if $customGroup}
+ {foreach from=$customGroup item=value key=customName}
+
+
+ {$customName}
+ |
+
+ {foreach from=$value item=v key=n}
+
+
+ {$n}
+ |
+
+ {$v}
+ |
+
+ {/foreach}
+ {/foreach}
+ {/if}
+
+
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_text.tpl
new file mode 100644
index 0000000000..ceb48e0c20
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_offline_receipt_text.tpl
@@ -0,0 +1,292 @@
+{contact.email_greeting}
+{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{$event.confirm_email_text}
+{/if}
+
+{if $isOnWaitlist}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}You have been added to the WAIT LIST for this event.{/ts}
+
+{if $isPrimary}
+{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
+
+{/if}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{elseif $isRequireApproval}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Your registration has been submitted.{/ts}
+
+{if $isPrimary}
+{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
+
+{/if}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{elseif $is_pay_later}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$pay_later_receipt}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{else}
+
+{ts}Please print this confirmation for your records.{/ts}
+{/if}
+
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Event Information and Location{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+
+{if $event.participant_role neq 'Attendee' and $defaultRole}
+{ts}Participant Role{/ts}: {$event.participant_role}
+{/if}
+
+{if $isShowLocation}
+{$location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $location.phone.1.phone || $location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+{/foreach}
+{foreach from=$location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $event.is_public}
+{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+{ts}Download iCalendar File:{/ts} {$icalFeed}
+{/if}
+
+{if $email}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Registered Email{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$email}
+{/if}
+{if $event.is_monetary} {* This section for Paid events only.*}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$event.fee_label}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+
+{if $value neq 'skip'}
+{if $isPrimary}
+{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
+{ts 1=$priceset+1}Participant %1{/ts}
+{/if}
+{/if}
+---------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{capture assign=ts_item}{ts}Item{/ts}{/capture}
+{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
+{capture assign=ts_each}{ts}Each{/ts}{/capture}
+{if $dataArray}
+{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
+{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
+{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
+{/if}
+{capture assign=ts_total}{ts}Total{/ts}{/capture}
+{capture assign=ts_participant_total}{if $pricesetFieldsCount }{ts}Total Participants{/ts}{/if}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{foreach from=$value item=line}
+{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {$ts_participant_count|string_format:"%10s"}
+{/foreach}
+{/if}
+{/foreach}
+
+{if $dataArray}
+{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
+
+{foreach from=$dataArray item=value key=priceset}
+{if $priceset || $priceset == 0}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{else}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{/if}
+{/foreach}
+{/if}
+{/if}
+
+{if $amount && !$lineItem}
+{foreach from=$amount item=amnt key=level}{$amnt.amount|crmMoney} {$amnt.label}
+{/foreach}
+{/if}
+
+{if $totalTaxAmount}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
+{if $isPrimary}
+
+{if $balanceAmount}{ts}Total Paid{/ts}{else}{ts}Total Amount{/ts}{/if}: {$totalAmount|crmMoney} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+
+{if $balanceAmount}
+{ts}Balance{/ts}: {$balanceAmount|crmMoney}
+{/if}
+
+{if $pricesetFieldsCount }
+ {assign var="count" value= 0}
+ {foreach from=$lineItem item=pcount}
+ {assign var="lineItemCount" value=0}
+ {if $pcount neq 'skip'}
+ {foreach from=$pcount item=p_count}
+ {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
+ {/foreach}
+ {if $lineItemCount < 1 }
+ {assign var="lineItemCount" value=1}
+ {/if}
+ {assign var="count" value=$count+$lineItemCount}
+ {/if}
+ {/foreach}
+
+{ts}Total Participants{/ts}: {$count}
+{/if}
+
+{if $is_pay_later }
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$pay_later_receipt}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{/if}
+
+{if $register_date}
+{ts}Registration Date{/ts}: {$register_date|crmDate}
+{/if}
+{if $receive_date}
+{ts}Transaction Date{/ts}: {$receive_date|crmDate}
+{/if}
+{if $financialTypeName}
+{ts}Financial Type{/ts}: {$financialTypeName}
+{/if}
+{if $trxn_id}
+{ts}Transaction #{/ts}: {$trxn_id}
+{/if}
+{if $paidBy}
+{ts}Paid By{/ts}: {$paidBy}
+{/if}
+{if $checkNumber}
+{ts}Check Number{/ts}: {$checkNumber}
+{/if}
+{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Billing Name and Address{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$billingName}
+{$address}
+{/if}
+
+{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+===========================================================
+{ts}Credit Card Information{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+{/if}
+{/if} {* End of conditional section for Paid events *}
+
+{if $customPre}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customPre_grouptitle}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$customPre item=value key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{$customName}: {$value}
+{/if}
+{/foreach}
+{/if}
+
+{if $customPost}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customPost_grouptitle}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$customPost item=value key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+{$customName}: {$value}
+{/if}
+{/foreach}
+{/if}
+{if $customProfile}
+
+{foreach from=$customProfile item=value key=customName}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts 1=$customName+1}Participant Information - Participant %1{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$value item=val key=field}
+{if $field eq 'additionalCustomPre' or $field eq 'additionalCustomPost' }
+{if $field eq 'additionalCustomPre' }
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{$additionalCustomPre_grouptitle}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{else}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{$additionalCustomPost_grouptitle}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{/if}
+{foreach from=$val item=v key=f}
+{$f}: {$v}
+{/foreach}
+{/if}
+{/foreach}
+{/foreach}
+{/if}
+{if $customGroup}
+{foreach from=$customGroup item=value key=customName}
+=========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customName}
+=========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$value item=v key=n}
+{$n}: {$v}
+{/foreach}
+{/foreach}
+{/if}
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_html.tpl
new file mode 100644
index 0000000000..f7ebf3663e
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_html.tpl
@@ -0,0 +1,514 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+{capture assign=tdfirstStyle}style="width: 180px; padding-bottom: 15px;"{/capture}
+{capture assign=tdStyle}style="width: 100px;"{/capture}
+{capture assign=participantTotal}style="margin: 0.5em 0 0.5em;padding: 0.5em;background-color: #999999;font-weight: bold;color: #FAFAFA;border-radius: 2px;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+
+ {if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+ {$event.confirm_email_text|htmlize}
+
+ {else}
+ {ts}Thank you for your participation.{/ts}
+ {if $participant_status}{ts 1=$participant_status}This letter is a confirmation that your registration has been received and your status has been updated to %1.{/ts}
+ {else}{if $isOnWaitlist}{ts}This letter is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This letter is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}{/if}.
+
+ {/if}
+
+
+ {if $isOnWaitlist}
+ {ts}You have been added to the WAIT LIST for this event.{/ts}
+ {if $isPrimary}
+ {ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
+ {/if}
+ {elseif $isRequireApproval}
+ {ts}Your registration has been submitted.{/ts}
+ {if $isPrimary}
+ {ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
+ {/if}
+ {elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
+ {$pay_later_receipt} {* FIXME: this might be text rather than HTML *}
+ {else}
+ {ts}Please print this confirmation for your records.{/ts}
+ {/if}
+
+ |
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|date_format:"%A"} {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|date_format:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+
+ {if $conference_sessions}
+
+
+ {ts}Your schedule:{/ts}
+ |
+
+
+
+ {assign var='group_by_day' value='NA'}
+ {foreach from=$conference_sessions item=session}
+ {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
+ {assign var='group_by_day' value=$session.start_date}
+ {$group_by_day|date_format:"%m/%d/%Y"}
+ {/if}
+ {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location} {$session.location} {/if}
+ {/foreach}
+ |
+
+ {/if}
+
+ {if $event.participant_role neq 'Attendee' and $defaultRole}
+
+
+ {ts}Participant Role{/ts}
+ |
+
+ {$event.participant_role}
+ |
+
+ {/if}
+
+ {if $isShowLocation}
+
+
+ {$location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $location.phone.1.phone || $location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}
+ {$phone.phone_type_display}
+ {else}
+ {ts}Phone{/ts}
+ {/if}
+ |
+
+ {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $event.is_public}
+
+
+ {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+ {ts}Download iCalendar File{/ts}
+ |
+
+ {/if}
+
+ {if $event.is_share}
+
+
+ {capture assign=eventUrl}{crmURL p='civicrm/event/info' q="id=`$event.id`&reset=1" a=true fe=1 h=1}{/capture}
+ {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$eventUrl title=$event.title pageURL=$eventUrl}
+ |
+
+ {/if}
+ {if $payer.name}
+
+
+ {ts}You were registered by:{/ts}
+ |
+
+
+
+ {$payer.name}
+ |
+
+ {/if}
+ {if $event.is_monetary}
+
+
+
+ {$event.fee_label}
+ |
+
+
+ {if $lineItem}
+ {foreach from=$lineItem item=value key=priceset}
+ {if $value neq 'skip'}
+ {if $isPrimary}
+ {if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
+
+
+ {ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
+ |
+
+ {/if}
+ {/if}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Qty{/ts} |
+ {ts}Each{/ts} |
+ {if $dataArray}
+ {ts}SubTotal{/ts} |
+ {ts}Tax Rate{/ts} |
+ {ts}Tax Amount{/ts} |
+ {/if}
+ {ts}Total{/ts} |
+ {if $pricesetFieldsCount }{ts}Total Participants{/ts} | {/if}
+
+ {foreach from=$value item=line}
+
+
+ {if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description|truncate:30:"..."} {/if}
+ |
+
+ {$line.qty}
+ |
+
+ {$line.unit_price|crmMoney:$currency}
+ |
+ {if $dataArray}
+
+ {$line.unit_price*$line.qty|crmMoney}
+ |
+ {if $line.tax_rate != "" || $line.tax_amount != ""}
+
+ {$line.tax_rate|string_format:"%.2f"}%
+ |
+
+ {$line.tax_amount|crmMoney}
+ |
+ {else}
+ |
+ |
+ {/if}
+ {/if}
+
+ {$line.line_total+$line.tax_amount|crmMoney:$currency}
+ |
+ {if $pricesetFieldsCount }{$line.participant_count} | {/if}
+
+ {/foreach}
+ {if $individual}
+
+ {ts}Participant Total{/ts} |
+ {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney} |
+ {$individual.$priceset.totalTaxAmt|crmMoney} |
+ {$individual.$priceset.totalAmtWithTax|crmMoney} |
+
+ {/if}
+
+ |
+
+ {/if}
+ {/foreach}
+ {if $dataArray}
+
+
+ {ts} Amount Before Tax: {/ts}
+ |
+
+ {$totalAmount-$totalTaxAmount|crmMoney}
+ |
+
+ {foreach from=$dataArray item=value key=priceset}
+
+ {if $priceset || $priceset == 0}
+ {$taxTerm} {$priceset|string_format:"%.2f"}% |
+ {$value|crmMoney:$currency} |
+ {else}
+ {ts}No{/ts} {$taxTerm} |
+ {$value|crmMoney:$currency} |
+ {/if}
+
+ {/foreach}
+ {/if}
+ {/if}
+
+ {if $amounts && !$lineItem}
+ {foreach from=$amounts item=amnt key=level}
+
+
+ {$amnt.amount|crmMoney:$currency} {$amnt.label}
+ |
+
+ {/foreach}
+ {/if}
+
+ {if $totalTaxAmount}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+ {if $isPrimary}
+
+
+ {ts}Total Amount{/ts}
+ |
+
+ {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+ |
+
+ {if $pricesetFieldsCount }
+
+
+ {ts}Total Participants{/ts} |
+
+ {assign var="count" value= 0}
+ {foreach from=$lineItem item=pcount}
+ {assign var="lineItemCount" value=0}
+ {if $pcount neq 'skip'}
+ {foreach from=$pcount item=p_count}
+ {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
+ {/foreach}
+ {if $lineItemCount < 1 }
+ {assign var="lineItemCount" value=1}
+ {/if}
+ {assign var="count" value=$count+$lineItemCount}
+ {/if}
+ {/foreach}
+ {$count}
+ |
+ {/if}
+
+ {if $register_date}
+
+
+ {ts}Registration Date{/ts}
+ |
+
+ {$register_date|crmDate}
+ |
+
+ {/if}
+
+ {if $receive_date}
+
+
+ {ts}Transaction Date{/ts}
+ |
+
+ {$receive_date|crmDate}
+ |
+
+ {/if}
+
+ {if $financialTypeName}
+
+
+ {ts}Financial Type{/ts}
+ |
+
+ {$financialTypeName}
+ |
+
+ {/if}
+
+ {if $trxn_id}
+
+
+ {ts}Transaction #{/ts}
+ |
+
+ {$trxn_id}
+ |
+
+ {/if}
+
+ {if $paidBy}
+
+
+ {ts}Paid By{/ts}
+ |
+
+ {$paidBy}
+ |
+
+ {/if}
+
+ {if $checkNumber}
+
+
+ {ts}Check Number{/ts}
+ |
+
+ {$checkNumber}
+ |
+
+ {/if}
+
+ {if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ |
+
+ {/if}
+
+ {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+ {/if}
+
+ {/if} {* End of conditional section for Paid events *}
+
+
+{if $customPre}
+{foreach from=$customPre item=customPr key=i}
+ {$customPre_grouptitle.$i} |
+ {foreach from=$customPr item=customValue key=customName}
+ {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+
+ {$customName} |
+ {$customValue} |
+
+ {/if}
+ {/foreach}
+{/foreach}
+{/if}
+
+{if $customPost}
+{foreach from=$customPost item=customPos key=j}
+ {$customPost_grouptitle.$j} |
+ {foreach from=$customPos item=customValue key=customName}
+ {if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+
+ {$customName} |
+ {$customValue} |
+
+{/if}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $customProfile}
+{foreach from=$customProfile.profile item=eachParticipant key=participantID}
+ {ts 1=$participantID+2}Participant %1{/ts} |
+ {foreach from=$eachParticipant item=eachProfile key=pid}
+ {$customProfile.title.$pid} |
+ {foreach from=$eachProfile item=val key=field}
+ {foreach from=$val item=v key=f}
+ {$field} |
+ {$v} |
+ {/foreach}
+
+ {/foreach}
+{/foreach}
+{/foreach}
+{/if}
+
+ {if $customGroup}
+ {foreach from=$customGroup item=value key=customName}
+
+
+ {$customName}
+ |
+
+ {foreach from=$value item=v key=n}
+
+
+ {$n}
+ |
+
+ {$v}
+ |
+
+ {/foreach}
+ {/foreach}
+ {/if}
+
+ {if $event.allow_selfcancelxfer }
+ |
+
+ {ts 1=$event.selfcancelxfer_time}You may transfer your registration to another participant or cancel your registration up to %1 hours before the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+ {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
+ {ts}Click here to transfer or cancel your registration.{/ts}
+ |
+
+ {/if}
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_text.tpl
new file mode 100644
index 0000000000..b0233b41ea
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_online_receipt_text.tpl
@@ -0,0 +1,302 @@
+{contact.email_greeting},
+
+{if $event.confirm_email_text AND (not $isOnWaitlist AND not $isRequireApproval)}
+{$event.confirm_email_text}
+
+{else}
+ {ts}Thank you for your participation.{/ts}
+ {if $participant_status}{ts 1=$participant_status}This letter is a confirmation that your registration has been received and your status has been updated to %1.{/ts}
+ {else}{if $isOnWaitlist}{ts}This letter is a confirmation that your registration has been received and your status has been updated to waitlisted.{/ts}{else}{ts}This letter is a confirmation that your registration has been received and your status has been updated to registered.{/ts}{/if}
+ {/if}.
+
+{/if}
+
+{if $isOnWaitlist}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}You have been added to the WAIT LIST for this event.{/ts}
+
+{if $isPrimary}
+{ts}If space becomes available you will receive an email with a link to a web page where you can complete your registration.{/ts}
+{/if}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{elseif $isRequireApproval}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Your registration has been submitted.{/ts}
+
+{if $isPrimary}
+{ts}Once your registration has been reviewed, you will receive an email with a link to a web page where you can complete the registration process.{/ts}
+
+{/if}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{elseif $is_pay_later && !$isAmountzero && !$isAdditionalParticipant}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$pay_later_receipt}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{else}
+
+{ts}Please print this confirmation for your records.{/ts}
+{/if}
+
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Event Information and Location{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$event.event_title}
+{$event.event_start_date|date_format:"%A"} {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|date_format:"%A"} {$event.event_end_date|crmDate}{/if}{/if}
+{if $conference_sessions}
+
+
+{ts}Your schedule:{/ts}
+{assign var='group_by_day' value='NA'}
+{foreach from=$conference_sessions item=session}
+{if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
+{assign var='group_by_day' value=$session.start_date}
+
+{$group_by_day|date_format:"%m/%d/%Y"}
+
+
+{/if}
+{$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+{if $session.location} {$session.location}{/if}
+{/foreach}
+{/if}
+
+{if $event.participant_role neq 'Attendee' and $defaultRole}
+{ts}Participant Role{/ts}: {$event.participant_role}
+{/if}
+
+{if $isShowLocation}
+{$location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $location.phone.1.phone || $location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+{/foreach}
+{foreach from=$location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $event.is_public}
+{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+{ts}Download iCalendar File:{/ts} {$icalFeed}
+{/if}
+
+{if $payer.name}
+You were registered by: {$payer.name}
+{/if}
+{if $event.is_monetary} {* This section for Paid events only.*}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$event.fee_label}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{if $lineItem}{foreach from=$lineItem item=value key=priceset}
+
+{if $value neq 'skip'}
+{if $isPrimary}
+{if $lineItem|@count GT 1} {* Header for multi participant registration cases. *}
+{ts 1=$priceset+1}Participant %1{/ts} {$part.$priceset.info}
+
+{/if}
+{/if}
+-----------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+
+{capture assign=ts_item}{ts}Item{/ts}{/capture}
+{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
+{capture assign=ts_each}{ts}Each{/ts}{/capture}
+{if $dataArray}
+{capture assign=ts_subtotal}{ts}Subtotal{/ts}{/capture}
+{capture assign=ts_taxRate}{ts}Tax Rate{/ts}{/capture}
+{capture assign=ts_taxAmount}{ts}Tax Amount{/ts}{/capture}
+{/if}
+{capture assign=ts_total}{ts}Total{/ts}{/capture}
+{if $pricesetFieldsCount }{capture assign=ts_participant_total}{ts}Total Participants{/ts}{/capture}{/if}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"} {$ts_participant_total|string_format:"%10s"}
+-----------------------------------------------------------{if $pricesetFieldsCount }-----------------------------------------------------{/if}
+
+{foreach from=$value item=line}
+{if $pricesetFieldsCount }{capture assign=ts_participant_count}{$line.participant_count}{/capture}{/if}
+{capture assign=ts_item}{if $line.html_type eq 'Text'}{$line.label}{else}{$line.field_title} - {$line.label}{/if} {if $line.description} {$line.description}{/if}{/capture}{$ts_item|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney:$currency|string_format:"%10s"} {if $dataArray} {$line.unit_price*$line.qty|crmMoney:$currency|string_format:"%10s"} {if $line.tax_rate != "" || $line.tax_amount != ""} {$line.tax_rate|string_format:"%.2f"} % {$line.tax_amount|crmMoney:$currency|string_format:"%10s"} {else} {/if} {/if} {$line.line_total+$line.tax_amount|crmMoney:$currency|string_format:"%10s"}{$ts_participant_count|string_format:"%10s"}
+{/foreach}
+----------------------------------------------------------------------------------------------------------------
+{if $individual}{ts}Participant Total{/ts} {$individual.$priceset.totalAmtWithTax-$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%29s"} {$individual.$priceset.totalTaxAmt|crmMoney:$currency|string_format:"%33s"} {$individual.$priceset.totalAmtWithTax|crmMoney:$currency|string_format:"%12s"}{/if}
+{/if}
+{""|string_format:"%120s"}
+{/foreach}
+{""|string_format:"%120s"}
+
+{if $dataArray}
+{ts}Amount before Tax{/ts}: {$totalAmount-$totalTaxAmount|crmMoney:$currency}
+
+{foreach from=$dataArray item=value key=priceset}
+{if $priceset || $priceset == 0}
+{$taxTerm} {$priceset|string_format:"%.2f"}%: {$value|crmMoney:$currency}
+{else}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{/if}
+{/foreach}
+{/if}
+{/if}
+
+{if $amounts && !$lineItem}
+{foreach from=$amounts item=amnt key=level}{$amnt.amount|crmMoney:$currency} {$amnt.label}
+{/foreach}
+{/if}
+
+{if $totalTaxAmount}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
+{if $isPrimary }
+
+{ts}Total Amount{/ts}: {$totalAmount|crmMoney:$currency} {if $hookDiscount.message}({$hookDiscount.message}){/if}
+
+{if $pricesetFieldsCount }
+ {assign var="count" value= 0}
+ {foreach from=$lineItem item=pcount}
+ {assign var="lineItemCount" value=0}
+ {if $pcount neq 'skip'}
+ {foreach from=$pcount item=p_count}
+ {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count}
+ {/foreach}
+ {if $lineItemCount < 1 }
+ {assign var="lineItemCount" value=1}
+ {/if}
+ {assign var="count" value=$count+$lineItemCount}
+ {/if}
+ {/foreach}
+
+{ts}Total Participants{/ts}: {$count}
+{/if}
+
+{if $register_date}
+{ts}Registration Date{/ts}: {$register_date|crmDate}
+{/if}
+{if $receive_date}
+{ts}Transaction Date{/ts}: {$receive_date|crmDate}
+{/if}
+{if $financialTypeName}
+{ts}Financial Type{/ts}: {$financialTypeName}
+{/if}
+{if $trxn_id}
+{ts}Transaction #{/ts}: {$trxn_id}
+{/if}
+{if $paidBy}
+{ts}Paid By{/ts}: {$paidBy}
+{/if}
+{if $checkNumber}
+{ts}Check Number{/ts}: {$checkNumber}
+{/if}
+{if $contributeMode ne 'notify' and !$isAmountzero and (!$is_pay_later or $isBillingAddressRequiredForPayLater) and !$isOnWaitlist and !$isRequireApproval}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Billing Name and Address{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$billingName}
+{$address}
+{/if}
+
+{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later and !$isOnWaitlist and !$isRequireApproval}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts}Credit Card Information{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+{/if}
+{/if} {* End of conditional section for Paid events *}
+
+{if $customPre}
+{foreach from=$customPre item=customPr key=i}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customPre_grouptitle.$i}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$customPr item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $customPost}
+{foreach from=$customPost item=customPos key=j}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customPost_grouptitle.$j}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$customPos item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/foreach}
+{/if}
+{if $customProfile}
+
+{foreach from=$customProfile.profile item=eachParticipant key=participantID}
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{ts 1=$participantID+2}Participant Information - Participant %1{/ts}
+
+==========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$eachParticipant item=eachProfile key=pid}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{$customProfile.title.$pid}
+----------------------------------------------------------{if $pricesetFieldsCount }--------------------{/if}
+
+{foreach from=$eachProfile item=val key=field}
+{foreach from=$val item=v key=f}
+{$field}: {$v}
+{/foreach}
+{/foreach}
+{/foreach}
+{/foreach}
+{/if}
+{if $customGroup}
+{foreach from=$customGroup item=value key=customName}
+=========================================================={if $pricesetFieldsCount }===================={/if}
+
+{$customName}
+=========================================================={if $pricesetFieldsCount }===================={/if}
+
+{foreach from=$value item=v key=n}
+{$n}: {$v}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $event.allow_selfcancelxfer }
+{ts 1=$event.selfcancelxfer_time}You may transfer your registration to another participant or cancel your registration up to %1 hours before the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+ {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
+{ts}Transfer or cancel your registration:{/ts} {$selfService}
+{/if}
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_html.tpl
new file mode 100644
index 0000000000..3436a19034
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_html.tpl
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+ {capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+ {capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+ {capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+ Dear {contact.display_name},
+ {if $is_pay_later}
+
+ This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received.
+
+ {else}
+
+ This is being sent to you as a {if $is_refund}confirmation of refund{else}receipt of payment made{/if} for the following workshop, event registration or purchase.
+
+ {/if}
+
+ {if $is_pay_later}
+ {$pay_later_receipt}
+ {/if}
+
+ Your order number is #{$transaction_id}. Please print this confirmation for your records.{if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
+ Here's a summary of your transaction placed on {$transaction_date|date_format:"%D %I:%M %p %Z"}:
+
+
+{if $billing_name}
+
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billing_name}
+ {$billing_street_address}
+ {$billing_city}, {$billing_state} {$billing_postal_code}
+
+ {$email}
+ |
+
+
+{/if}
+{if $credit_card_type}
+
+
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date.M}/{$credit_card_exp_date.Y}
+ |
+
+
+{/if}
+{if $source}
+
+ {$source}
+{/if}
+
+
+
+
+{if $line_items}
+
+ Event
+ |
+
+ Participants
+ |
+{/if}
+
+ Price
+ |
+
+ Total
+ |
+
+
+
+ {foreach from=$line_items item=line_item}
+
+
+ {$line_item.event->title} ({$line_item.event->start_date|date_format:"%D"})
+ {if $line_item.event->is_show_location}
+ {$line_item.location.address.1.display|nl2br}
+ {/if}{*End of isShowLocation condition*}
+ {$line_item.event->start_date|date_format:"%D %I:%M %p"} - {$line_item.event->end_date|date_format:"%I:%M %p"}
+ |
+
+ {$line_item.num_participants}
+ {if $line_item.num_participants > 0}
+
+ {foreach from=$line_item.participants item=participant}
+ {$participant.display_name}
+ {/foreach}
+
+ {/if}
+ {if $line_item.num_waiting_participants > 0}
+ Waitlisted:
+
+ {foreach from=$line_item.waiting_participants item=participant}
+ {$participant.display_name}
+ {/foreach}
+
+ {/if}
+ |
+
+ {$line_item.cost|crmMoney:$currency|string_format:"%10s"}
+ |
+
+ {$line_item.amount|crmMoney:$currency|string_format:"%10s"}
+ |
+
+ {/foreach}
+
+
+ {if $discounts}
+
+
+ |
+
+ |
+
+ Subtotal:
+ |
+
+ {$sub_total|crmMoney:$currency|string_format:"%10s"}
+ |
+
+ {foreach from=$discounts key=myId item=i}
+
+
+ {$i.title}
+ |
+
+ |
+
+ |
+
+ -{$i.amount}
+ |
+
+ {/foreach}
+ {/if}
+
+{if $line_items}
+
+ |
+
+ |
+{/if}
+
+ Total:
+ |
+
+ {$total|crmMoney:$currency|string_format:"%10s"}
+ |
+
+
+
+
+ If you have questions about the status of your registration or purchase please feel free to contact us.
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_text.tpl
new file mode 100644
index 0000000000..695b53d604
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/event_registration_receipt_text.tpl
@@ -0,0 +1,80 @@
+Dear {contact.display_name},
+{if $is_pay_later}
+ This is being sent to you as an acknowledgement that you have registered one or more members for the following workshop, event or purchase. Please note, however, that the status of your payment is pending, and the registration for this event will not be completed until your payment is received.
+{else}
+ This is being sent to you as a {if $is_refund}confirmation of refund{else}receipt of payment made{/if} for the following workshop, event registration or purchase.
+{/if}
+
+{if $is_pay_later}
+ {$pay_later_receipt}
+{/if}
+
+ Your order number is #{$transaction_id}. Please print this confirmation for your records.{if $line_items && !$is_refund} Information about the workshops will be sent separately to each participant.{/if}
+ Here's a summary of your transaction placed on {$transaction_date|date_format:"%D %I:%M %p %Z"}:
+
+{if $billing_name}
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billing_name}
+
+{$billing_street_address}
+
+{$billing_city}, {$billing_state} {$billing_postal_code}
+
+{$email}
+{/if}
+
+{if $source}
+{$source}
+{/if}
+
+
+{foreach from=$line_items item=line_item}
+{$line_item.event->title} ({$line_item.event->start_date|date_format:"%D"})
+{if $line_item.event->is_show_location}
+ {$line_item.location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+{$line_item.event->start_date|date_format:"%D %I:%M %p"} - {$line_item.event->end_date|date_format:"%I:%M %p"}
+
+ Quantity: {$line_item.num_participants}
+
+{if $line_item.num_participants > 0}
+ {foreach from=$line_item.participants item=participant}
+ {$participant.display_name}
+ {/foreach}
+{/if}
+{if $line_item.num_waiting_participants > 0}
+ Waitlisted:
+ {foreach from=$line_item.waiting_participants item=participant}
+ {$participant.display_name}
+ {/foreach}
+{/if}
+Cost: {$line_item.cost|crmMoney:$currency|string_format:"%10s"}
+Total For This Event: {$line_item.amount|crmMoney:$currency|string_format:"%10s"}
+
+{/foreach}
+
+{if $discounts}
+Subtotal: {$sub_total|crmMoney:$currency|string_format:"%10s"}
+--------------------------------------
+Discounts
+{foreach from=$discounts key=myId item=i}
+ {$i.title}: -{$i.amount|crmMoney:$currency|string_format:"%10s"}
+{/foreach}
+{/if}
+======================================
+Total: {$total|crmMoney:$currency|string_format:"%10s"}
+
+{if $credit_card_type}
+===========================================================
+{ts}Payment Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date.M}/{$credit_card_exp_date.Y}
+{/if}
+
+ If you have questions about the status of your registration or purchase please feel free to contact us.
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_html.tpl
new file mode 100644
index 0000000000..4a882c1259
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_html.tpl
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+ {ts 1=$contact.display_name}Dear %1{/ts},
+ {ts}Your Event Registration has been cancelled.{/ts}
+ |
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+
+ {ts}Participant Role{/ts}:
+ |
+
+ {$participant.role}
+ |
+
+
+ {if $isShowLocation}
+
+
+ {$event.location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $event.location.phone.1.phone || $event.location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$event.location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}
+ |
+
+ {$phone.phone}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$event.location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $contact.email}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$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}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_text.tpl
new file mode 100644
index 0000000000..b4430b33d1
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_cancelled_text.tpl
@@ -0,0 +1,47 @@
+{ts 1=$contact.display_name}Dear %1{/ts},
+
+{ts}Your Event Registration has been cancelled.{/ts}
+
+
+===========================================================
+{ts}Event Information and Location{/ts}
+
+===========================================================
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+
+{ts}Participant Role{/ts}: {$participant.role}
+
+{if $isShowLocation}
+{$event.location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $event.location.phone.1.phone || $event.location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$event.location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
+{/foreach}
+{foreach from=$event.location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $contact.email}
+
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$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}
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_html.tpl
new file mode 100644
index 0000000000..ca6816d166
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_html.tpl
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+ {ts 1=$contact.display_name}Dear %1{/ts},
+ |
+
+ {if !$isAdditional and $participant.id}
+
+
+ {ts}Confirm Your Registration{/ts}
+ |
+
+
+
+ {capture assign=confirmUrl}{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$participant.id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture}
+ Go to a web page where you can confirm your registration online
+ |
+
+ {/if}
+ {if $event.allow_selfcancelxfer }
+ This event allows for self-cancel or transfer
+ {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participantID`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
+ {ts}Self service cancel transfer{/ts}
+ {/if}
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+ {if $conference_sessions}
+
+
+ {ts}Your schedule:{/ts}
+ |
+
+
+
+ {assign var='group_by_day' value='NA'}
+ {foreach from=$conference_sessions item=session}
+ {if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
+ {assign var='group_by_day' value=$session.start_date}
+ {$group_by_day|date_format:"%m/%d/%Y"}
+ {/if}
+ {$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+ {if $session.location} {$session.location} {/if}
+ {/foreach}
+ |
+
+ {/if}
+
+
+ {ts}Participant Role{/ts}:
+ |
+
+ {$participant.role}
+ |
+
+
+ {if $isShowLocation}
+
+
+ {$event.location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $event.location.phone.1.phone || $event.location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$event.location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}
+ |
+
+ {$phone.phone}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$event.location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $event.is_public}
+
+
+ {capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+ {ts}Download iCalendar File{/ts}
+ |
+
+ {/if}
+
+ {if $contact.email}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$contact.email}
+ |
+
+ {/if}
+
+ {if $register_date}
+
+
+ {ts}Registration Date{/ts}
+ |
+
+ {$participant.register_date|crmDate}
+ |
+
+ {/if}
+
+
+ |
+
+ {if $event.allow_selfcancelxfer }
+
+
+ {ts 1=$event.selfcancelxfer_time}You may transfer your registration to another participant or cancel your registration up to %1 hours before the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+ {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
+ {ts}Click here to transfer or cancel your registration.{/ts}
+ |
+
+ {/if}
+
+
+ {ts 1=$domain.phone 2=$domain.email}Please contact us at %1 or send email to %2 if you have questions.{/ts}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_text.tpl
new file mode 100644
index 0000000000..e8f90132b5
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_confirm_text.tpl
@@ -0,0 +1,81 @@
+{ts 1=$contact.display_name}Dear %1{/ts},
+{if !$isAdditional and $participant.id}
+
+===========================================================
+{ts}Confirm Your Registration{/ts}
+
+===========================================================
+{capture assign=confirmUrl}{crmURL p='civicrm/event/confirm' q="reset=1&participantId=`$participant.id`&cs=`$checksumValue`" a=true h=0 fe=1}{/capture}
+Click this link to go to a web page where you can confirm your registration online:
+{$confirmUrl}
+{/if}
+{if $event.allow_selfcancelxfer }
+{ts 1=$event.selfcancelxfer_time}You may transfer your registration to another participant or cancel your registration up to %1 hours before the event.{/ts} {if $totalAmount}{ts}Cancellations are not refundable.{/ts}{/if}
+ {capture assign=selfService}{crmURL p='civicrm/event/selfsvcupdate' q="reset=1&pid=`$participant.id`&{contact.checksum}" h=0 a=1 fe=1}{/capture}
+{ts}Transfer or cancel your registration:{/ts} {$selfService}
+{/if}
+===========================================================
+{ts}Event Information and Location{/ts}
+
+===========================================================
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+{if $conference_sessions}
+
+
+{ts}Your schedule:{/ts}
+{assign var='group_by_day' value='NA'}
+{foreach from=$conference_sessions item=session}
+{if $session.start_date|date_format:"%Y/%m/%d" != $group_by_day|date_format:"%Y/%m/%d"}
+{assign var='group_by_day' value=$session.start_date}
+
+{$group_by_day|date_format:"%m/%d/%Y"}
+
+
+{/if}
+{$session.start_date|crmDate:0:1}{if $session.end_date}-{$session.end_date|crmDate:0:1}{/if} {$session.title}
+{if $session.location} {$session.location}{/if}
+{/foreach}
+{/if}
+
+
+{ts}Participant Role{/ts}: {$participant.role}
+
+{if $isShowLocation}
+{$event.location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $event.location.phone.1.phone || $event.location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$event.location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
+{/foreach}
+{foreach from=$event.location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $event.is_public}
+{capture assign=icalFeed}{crmURL p='civicrm/event/ical' q="reset=1&id=`$event.id`" h=0 a=1 fe=1}{/capture}
+{ts}Download iCalendar File:{/ts} {$icalFeed}
+{/if}
+
+{if $contact.email}
+
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$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}
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_html.tpl
new file mode 100644
index 0000000000..a11ff72685
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_html.tpl
@@ -0,0 +1,132 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+ {ts 1=$contact.display_name}Dear %1{/ts},
+ {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
+or want to inquire about reinstating your registration for this event.{/ts}
+ |
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+
+ {ts}Participant Role{/ts}:
+ |
+
+ {$participant.role}
+ |
+
+
+ {if $isShowLocation}
+
+
+ {$event.location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $event.location.phone.1.phone || $event.location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$event.location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}
+ |
+
+ {$phone.phone}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$event.location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $contact.email}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$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}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_text.tpl
new file mode 100644
index 0000000000..be649c11da
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_expired_text.tpl
@@ -0,0 +1,51 @@
+{ts 1=$contact.display_name}Dear %1{/ts},
+
+{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
+or want to inquire about reinstating your registration for this event.{/ts}
+
+===========================================================
+{ts}Event Information and Location{/ts}
+
+===========================================================
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+
+{ts}Participant Role{/ts}: {$participant.role}
+
+{if $isShowLocation}
+{$event.location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $event.location.phone.1.phone || $event.location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$event.location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
+{/foreach}
+{foreach from=$event.location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $contact.email}
+
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$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}
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_html.tpl
new file mode 100644
index 0000000000..26cbf37e15
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_html.tpl
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+
+
+
+
+
+
+
+
+
+
+
+
+ {ts 1=$contact.display_name}Dear %1{/ts},
+ {ts 1=$to_participant}Your Event Registration has been Transferred to %1.{/ts}
+ |
+
+
+
+
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+
+ {ts}Participant Role{/ts}:
+ |
+
+ {$participant.role}
+ |
+
+
+ {if $isShowLocation}
+
+
+ {$event.location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $event.location.phone.1.phone || $event.location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$event.location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}
+ |
+
+ {$phone.phone}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$event.location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $contact.email}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$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}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_text.tpl
new file mode 100644
index 0000000000..aeac8a7ba1
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/participant_transferred_text.tpl
@@ -0,0 +1,45 @@
+{ts 1=$contact.display_name}Dear %1{/ts},
+
+{ts 1=$to_participant}Your Event Registration has been transferred to %1.{/ts}
+
+===========================================================
+{ts}Event Information and Location{/ts}
+
+===========================================================
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+
+{ts}Participant Role{/ts}: {$participant.role}
+
+{if $isShowLocation}
+{$event.location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $event.location.phone.1.phone || $event.location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$event.location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if}
+{/foreach}
+{foreach from=$event.location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+
+{if $contact.email}
+
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$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}
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_html.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_html.tpl
new file mode 100644
index 0000000000..6d6efeb52d
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_html.tpl
@@ -0,0 +1,255 @@
+
+
+
+
+
+
+
+
+{capture assign=headerStyle}colspan="2" style="text-align: left; padding: 4px; border-bottom: 1px solid #999; background-color: #eee;"{/capture}
+{capture assign=labelStyle }style="padding: 4px; border-bottom: 1px solid #999; background-color: #f7f7f7;"{/capture}
+{capture assign=valueStyle }style="padding: 4px; border-bottom: 1px solid #999;"{/capture}
+{capture assign=emptyBlockStyle }style="padding: 10px; border-bottom: 1px solid #999;background-color: #f7f7f7;"{/capture}
+{capture assign=emptyBlockValueStyle }style="padding: 10px; border-bottom: 1px solid #999;"{/capture}
+
+Dear {$contactDisplayName}
+
+
+
+
+
+
+
+
+
+
+
+ {if $paymentConfig.confirm_email_text}
+ {$paymentConfig.confirm_email_text|htmlize}
+ {elseif $isRefund}
+ {ts}A refund has been issued based on changes in your registration selections.{/ts}
+ {else}
+ {ts}A payment has been received.{/ts}
+ {/if}
+ {ts}Please print this confirmation for your records.{/ts}
+ |
+
+
+
+
+ {if $isRefund}
+
+ {ts}Refund Details{/ts} |
+
+
+
+ {ts}Total Fees{/ts}
+ |
+
+ {$totalAmount|crmMoney}
+ |
+
+
+
+ {ts}You Paid{/ts}
+ |
+
+ {$totalPaid|crmMoney}
+ |
+
+
+
+ {ts}Refund Amount{/ts}
+ |
+
+ {$refundAmount|crmMoney}
+ |
+ |
+ {else}
+
+ {ts}Payment Details{/ts} |
+
+
+
+ {ts}{if $component eq 'event'}Total Fees{/if}{/ts}
+ |
+
+ {$totalAmount|crmMoney}
+ |
+
+
+
+ {ts}This Payment Amount{/ts}
+ |
+
+ {$paymentAmount|crmMoney}
+ |
+
+
+
+ {ts}Balance Owed{/ts}
+ |
+
+ {$amountOwed|crmMoney}
+ | {* This will be zero after final payment. *}
+
+ |
+ |
+ {if $paymentsComplete}
+
+
+ {ts}Thank-you. This completes your payment for {if $component eq 'event'}{$event.event_title}{/if}.{/ts}
+ |
+
+ {/if}
+ {/if}
+ {if $receive_date}
+
+
+ {ts}Transaction Date{/ts}
+ |
+
+ {$receive_date|crmDate}
+ |
+
+ {/if}
+ {if $trxn_id}
+
+
+ {ts}Transaction #{/ts}
+ |
+
+ {$trxn_id}
+ |
+
+ {/if}
+ {if $paidBy}
+
+
+ {ts}Paid By{/ts}
+ |
+
+ {$paidBy}
+ |
+
+ {/if}
+ {if $checkNumber}
+
+
+ {ts}Check Number{/ts}
+ |
+
+ {$checkNumber}
+ |
+
+ {/if}
+
+ |
+
+
+
+
+ {if $contributeMode eq 'direct' and !$isAmountzero}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ |
+
+ {/if}
+ {if $contributeMode eq'direct' and !$isAmountzero}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires:{/ts} {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+ {if $component eq 'event'}
+
+
+ {ts}Event Information and Location{/ts}
+ |
+
+
+
+ {$event.event_title}
+ {$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+ |
+
+
+ {if $event.participant_role neq 'Attendee' and $defaultRole}
+
+
+ {ts}Participant Role{/ts}
+ |
+
+ {$event.participant_role}
+ |
+
+ {/if}
+
+ {if $isShowLocation}
+
+
+ {$location.address.1.display|nl2br}
+ |
+
+ {/if}
+
+ {if $location.phone.1.phone || $location.email.1.email}
+
+
+ {ts}Event Contacts:{/ts}
+ |
+
+ {foreach from=$location.phone item=phone}
+ {if $phone.phone}
+
+
+ {if $phone.phone_type}
+ {$phone.phone_type_display}
+ {else}
+ {ts}Phone{/ts}
+ {/if}
+ |
+
+ {$phone.phone} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+ |
+
+ {/if}
+ {/foreach}
+ {foreach from=$location.email item=eventEmail}
+ {if $eventEmail.email}
+
+
+ {ts}Email{/ts}
+ |
+
+ {$eventEmail.email}
+ |
+
+ {/if}
+ {/foreach}
+ {/if} {*phone block close*}
+ {/if}
+
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_text.tpl b/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_text.tpl
new file mode 100644
index 0000000000..a09ad9e162
--- /dev/null
+++ b/CRM/Upgrade/4.7.11.msg_template/message_templates/payment_or_refund_notification_text.tpl
@@ -0,0 +1,104 @@
+Dear {$contactDisplayName}
+{if $paymentConfig.confirm_email_text}
+{$paymentConfig.confirm_email_text}
+{elseif $isRefund}
+{ts}A refund has been issued based on changes in your registration selections.{/ts}
+{else}
+{ts}A payment has been received.{/ts}
+{/if}
+
+{ts}Please print this confirmation for your records.{/ts}
+
+{if $isRefund}
+===============================================================================
+
+{ts}Refund Details{/ts}
+
+===============================================================================
+{ts}Total Fees{/ts}: {$totalAmount|crmMoney}
+{ts}You Paid{/ts}: {$totalPaid|crmMoney}
+------------------------------------------------------------------------------------
+{ts}Refund Amount{/ts}: {$refundAmount|crmMoney}
+
+{else}
+===============================================================================
+
+{ts}Payment Details{/ts}
+
+===============================================================================
+{ts}Total Fees{/ts}: {$totalAmount|crmMoney}
+{ts}This Payment Amount{/ts}: {$paymentAmount|crmMoney}
+------------------------------------------------------------------------------------
+{ts}Balance Owed{/ts}: {$amountOwed|crmMoney} {* This will be zero after final payment. *}
+
+{if $paymentsComplete}
+
+{ts}Thank-you. This completes your payment for {/ts}{if $component eq 'event'}{$event.event_title}{/if}.
+{/if}
+{/if}
+{if $receive_date}
+{ts}Transaction Date{/ts}: {$receive_date|crmDate}
+{/if}
+{if $trxn_id}
+{ts}Transaction #{/ts}: {$trxn_id}
+{/if}
+{if $paidBy}
+{ts}Paid By{/ts}: {$paidBy}
+{/if}
+{if $checkNumber}
+{ts}Check Number{/ts}: {$checkNumber}
+{/if}
+{if $contributeMode eq 'direct' and !$isAmountzero}
+
+===============================================================================
+
+{ts}Billing Name and Address{/ts}
+
+===============================================================================
+
+{$billingName}
+{$address}
+{/if}
+
+{if $contributeMode eq 'direct' and !$isAmountzero}
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===============================================================================
+
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+{if $component eq 'event'}
+===============================================================================
+
+{ts}Event Information and Location{/ts}
+
+===============================================================================
+
+{$event.event_title}
+{$event.event_start_date|crmDate}{if $event.event_end_date}-{if $event.event_end_date|date_format:"%Y%m%d" == $event.event_start_date|date_format:"%Y%m%d"}{$event.event_end_date|crmDate:0:1}{else}{$event.event_end_date|crmDate}{/if}{/if}
+
+{if $event.participant_role neq 'Attendee' and $defaultRole}
+{ts}Participant Role{/ts}: {$event.participant_role}
+{/if}
+
+{if $isShowLocation}
+{$location.address.1.display|strip_tags:false}
+{/if}{*End of isShowLocation condition*}
+
+{if $location.phone.1.phone || $location.email.1.email}
+
+{ts}Event Contacts:{/ts}
+{foreach from=$location.phone item=phone}
+{if $phone.phone}
+
+{if $phone.phone_type}{$phone.phone_type_display}{else}{ts}Phone{/ts}{/if}: {$phone.phone}{/if} {if $phone.phone_ext} {ts}ext.{/ts} {$phone.phone_ext}{/if}
+{/foreach}
+{foreach from=$location.email item=eventEmail}
+{if $eventEmail.email}
+
+{ts}Email{/ts}: {$eventEmail.email}{/if}{/foreach}
+{/if}
+{/if}
diff --git a/CRM/Upgrade/Incremental/sql/4.7.11.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.7.11.mysql.tpl
index cec120984c..f61c3ac6ff 100644
--- a/CRM/Upgrade/Incremental/sql/4.7.11.mysql.tpl
+++ b/CRM/Upgrade/Incremental/sql/4.7.11.mysql.tpl
@@ -7,3 +7,6 @@ INSERT INTO civicrm_state_province (id, country_id, abbreviation, name) VALUES
(NULL, 1076, "GF", "Guyane"),
(NULL, 1076, "RE", "La Réunion"),
(NULL, 1076, "YT", "Mayotte");
+
+-- CRM-18508 Display State/Province in event address in registration emails
+{include file='../CRM/Upgrade/4.7.11.msg_template/civicrm_msg_template.tpl'}
\ No newline at end of file
diff --git a/xml/templates/message_templates/event_registration_receipt_html.tpl b/xml/templates/message_templates/event_registration_receipt_html.tpl
index 56159a7aea..3436a19034 100644
--- a/xml/templates/message_templates/event_registration_receipt_html.tpl
+++ b/xml/templates/message_templates/event_registration_receipt_html.tpl
@@ -93,21 +93,7 @@
{$line_item.event->title} ({$line_item.event->start_date|date_format:"%D"})
{if $line_item.event->is_show_location}
- {if $line_item.location.address.1.name}
- {$line_item.location.address.1.name}
- {/if}
- {if $line_item.location.address.1.street_address}
- {$line_item.location.address.1.street_address}
- {/if}
- {if $line_item.location.address.1.supplemental_address_1}
- {$line_item.location.address.1.supplemental_address_1}
- {/if}
- {if $line_item.location.address.1.supplemental_address_2}
- {$line_item.location.address.1.supplemental_address_2}
- {/if}
- {if $line_item.location.address.1.city}
- {$line_item.location.address.1.city}, {$line_item.location.address.1.state_province} {$location.address.1.postal_code}
- {/if}
+ {$line_item.location.address.1.display|nl2br}
{/if}{*End of isShowLocation condition*}
{$line_item.event->start_date|date_format:"%D %I:%M %p"} - {$line_item.event->end_date|date_format:"%I:%M %p"}
|
diff --git a/xml/templates/message_templates/event_registration_receipt_text.tpl b/xml/templates/message_templates/event_registration_receipt_text.tpl
index 9620798772..695b53d604 100644
--- a/xml/templates/message_templates/event_registration_receipt_text.tpl
+++ b/xml/templates/message_templates/event_registration_receipt_text.tpl
@@ -34,21 +34,7 @@ Dear {contact.display_name},
{foreach from=$line_items item=line_item}
{$line_item.event->title} ({$line_item.event->start_date|date_format:"%D"})
{if $line_item.event->is_show_location}
- {if $line_item.location.address.1.name}
- {$line_item.location.address.1.name}
- {/if}
- {if $line_item.location.address.1.street_address}
- {$line_item.location.address.1.street_address}
- {/if}
- {if $line_item.location.address.1.supplemental_address_1}
- {$line_item.location.address.1.supplemental_address_1}
- {/if}
- {if $line_item.location.address.1.supplemental_address_2}
- {$line_item.location.address.1.supplemental_address_2}
- {/if}
- {if $line_item.location.address.1.city}
- {$line_item.location.address.1.city}, {$line_item.location.address.1.state_province} {$line_item.location.address.1.postal_code}
- {/if}
+ {$line_item.location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{$line_item.event->start_date|date_format:"%D %I:%M %p"} - {$line_item.event->end_date|date_format:"%I:%M %p"}
diff --git a/xml/templates/message_templates/participant_cancelled_html.tpl b/xml/templates/message_templates/participant_cancelled_html.tpl
index d7af3a7859..4a882c1259 100644
--- a/xml/templates/message_templates/participant_cancelled_html.tpl
+++ b/xml/templates/message_templates/participant_cancelled_html.tpl
@@ -51,24 +51,7 @@
{if $isShowLocation}
- {if $event.location.address.1.name}
- {$event.location.address.1.name}
- {/if}
- {if $event.location.address.1.street_address}
- {$event.location.address.1.street_address}
- {/if}
- {if $event.location.address.1.supplemental_address_1}
- {$event.location.address.1.supplemental_address_1}
- {/if}
- {if $event.location.address.1.supplemental_address_2}
- {$event.location.address.1.supplemental_address_2}
- {/if}
- {if $event.location.address.1.city}
- {$event.location.address.1.city} {$event.location.address.1.postal_code}
- {if $event.location.address.1.postal_code_suffix}
- - {$event.location.address.1.postal_code_suffix}
- {/if}
- {/if}
+ {$event.location.address.1.display|nl2br}
|
{/if}
diff --git a/xml/templates/message_templates/participant_cancelled_text.tpl b/xml/templates/message_templates/participant_cancelled_text.tpl
index f79abd2c02..b4430b33d1 100644
--- a/xml/templates/message_templates/participant_cancelled_text.tpl
+++ b/xml/templates/message_templates/participant_cancelled_text.tpl
@@ -13,19 +13,7 @@
{ts}Participant Role{/ts}: {$participant.role}
{if $isShowLocation}
-{if $event.location.address.1.name}
-
-{$event.location.address.1.name}
-{/if}
-{if $event.location.address.1.street_address}{$event.location.address.1.street_address}
-{/if}
-{if $event.location.address.1.supplemental_address_1}{$event.location.address.1.supplemental_address_1}
-{/if}
-{if $event.location.address.1.supplemental_address_2}{$event.location.address.1.supplemental_address_2}
-{/if}
-{if $event.location.address.1.city}{$event.location.address.1.city} {$event.location.address.1.postal_code}{if $event.location.address.1.postal_code_suffix} - {$event.location.address.1.postal_code_suffix}{/if}
-{/if}
-
+{$event.location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{if $event.location.phone.1.phone || $event.location.email.1.email}
diff --git a/xml/templates/message_templates/participant_confirm_html.tpl b/xml/templates/message_templates/participant_confirm_html.tpl
index 7585ee306f..ca6816d166 100644
--- a/xml/templates/message_templates/participant_confirm_html.tpl
+++ b/xml/templates/message_templates/participant_confirm_html.tpl
@@ -89,24 +89,7 @@
{if $isShowLocation}
- {if $event.location.address.1.name}
- {$event.location.address.1.name}
- {/if}
- {if $event.location.address.1.street_address}
- {$event.location.address.1.street_address}
- {/if}
- {if $event.location.address.1.supplemental_address_1}
- {$event.location.address.1.supplemental_address_1}
- {/if}
- {if $event.location.address.1.supplemental_address_2}
- {$event.location.address.1.supplemental_address_2}
- {/if}
- {if $event.location.address.1.city}
- {$event.location.address.1.city} {$event.location.address.1.postal_code}
- {if $event.location.address.1.postal_code_suffix}
- - {$event.location.address.1.postal_code_suffix}
- {/if}
- {/if}
+ {$event.location.address.1.display|nl2br}
|
{/if}
diff --git a/xml/templates/message_templates/participant_confirm_text.tpl b/xml/templates/message_templates/participant_confirm_text.tpl
index cb4795b824..e8f90132b5 100644
--- a/xml/templates/message_templates/participant_confirm_text.tpl
+++ b/xml/templates/message_templates/participant_confirm_text.tpl
@@ -42,19 +42,7 @@ Click this link to go to a web page where you can confirm your registration onli
{ts}Participant Role{/ts}: {$participant.role}
{if $isShowLocation}
-{if $event.location.address.1.name}
-
-{$event.location.address.1.name}
-{/if}
-{if $event.location.address.1.street_address}{$event.location.address.1.street_address}
-{/if}
-{if $event.location.address.1.supplemental_address_1}{$event.location.address.1.supplemental_address_1}
-{/if}
-{if $event.location.address.1.supplemental_address_2}{$event.location.address.1.supplemental_address_2}
-{/if}
-{if $event.location.address.1.city}{$event.location.address.1.city} {$event.location.address.1.postal_code}{if $event.location.address.1.postal_code_suffix} - {$event.location.address.1.postal_code_suffix}{/if}
-{/if}
-
+{$event.location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{if $event.location.phone.1.phone || $event.location.email.1.email}
diff --git a/xml/templates/message_templates/participant_expired_html.tpl b/xml/templates/message_templates/participant_expired_html.tpl
index ca2621f9e5..a11ff72685 100644
--- a/xml/templates/message_templates/participant_expired_html.tpl
+++ b/xml/templates/message_templates/participant_expired_html.tpl
@@ -54,24 +54,7 @@ or want to inquire about reinstating your registration for this event.{/ts}
{if $isShowLocation}
- {if $event.location.address.1.name}
- {$event.location.address.1.name}
- {/if}
- {if $event.location.address.1.street_address}
- {$event.location.address.1.street_address}
- {/if}
- {if $event.location.address.1.supplemental_address_1}
- {$event.location.address.1.supplemental_address_1}
- {/if}
- {if $event.location.address.1.supplemental_address_2}
- {$event.location.address.1.supplemental_address_2}
- {/if}
- {if $event.location.address.1.city}
- {$event.location.address.1.city} {$event.location.address.1.postal_code}
- {if $event.location.address.1.postal_code_suffix}
- - {$event.location.address.1.postal_code_suffix}
- {/if}
- {/if}
+ {$event.location.address.1.display|nl2br}
|
{/if}
diff --git a/xml/templates/message_templates/participant_expired_text.tpl b/xml/templates/message_templates/participant_expired_text.tpl
index 534c1c6578..be649c11da 100644
--- a/xml/templates/message_templates/participant_expired_text.tpl
+++ b/xml/templates/message_templates/participant_expired_text.tpl
@@ -17,19 +17,7 @@ or want to inquire about reinstating your registration for this event.{/ts}
{ts}Participant Role{/ts}: {$participant.role}
{if $isShowLocation}
-{if $event.location.address.1.name}
-
-{$event.location.address.1.name}
-{/if}
-{if $event.location.address.1.street_address}{$event.location.address.1.street_address}
-{/if}
-{if $event.location.address.1.supplemental_address_1}{$event.location.address.1.supplemental_address_1}
-{/if}
-{if $event.location.address.1.supplemental_address_2}{$event.location.address.1.supplemental_address_2}
-{/if}
-{if $event.location.address.1.city}{$event.location.address.1.city} {$event.location.address.1.postal_code}{if $event.location.address.1.postal_code_suffix} - {$event.location.address.1.postal_code_suffix}{/if}
-{/if}
-
+{$event.location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{if $event.location.phone.1.phone || $event.location.email.1.email}
diff --git a/xml/templates/message_templates/participant_transferred_html.tpl b/xml/templates/message_templates/participant_transferred_html.tpl
index efb55af315..26cbf37e15 100644
--- a/xml/templates/message_templates/participant_transferred_html.tpl
+++ b/xml/templates/message_templates/participant_transferred_html.tpl
@@ -51,24 +51,7 @@
{if $isShowLocation}
- {if $event.location.address.1.name}
- {$event.location.address.1.name}
- {/if}
- {if $event.location.address.1.street_address}
- {$event.location.address.1.street_address}
- {/if}
- {if $event.location.address.1.supplemental_address_1}
- {$event.location.address.1.supplemental_address_1}
- {/if}
- {if $event.location.address.1.supplemental_address_2}
- {$event.location.address.1.supplemental_address_2}
- {/if}
- {if $event.location.address.1.city}
- {$event.location.address.1.city} {$event.location.address.1.postal_code}
- {if $event.location.address.1.postal_code_suffix}
- - {$event.location.address.1.postal_code_suffix}
- {/if}
- {/if}
+ {$event.location.address.1.display|nl2br}
|
{/if}
diff --git a/xml/templates/message_templates/participant_transferred_text.tpl b/xml/templates/message_templates/participant_transferred_text.tpl
index 6c50c9b450..aeac8a7ba1 100644
--- a/xml/templates/message_templates/participant_transferred_text.tpl
+++ b/xml/templates/message_templates/participant_transferred_text.tpl
@@ -12,19 +12,7 @@
{ts}Participant Role{/ts}: {$participant.role}
{if $isShowLocation}
-{if $event.location.address.1.name}
-
-{$event.location.address.1.name}
-{/if}
-{if $event.location.address.1.street_address}{$event.location.address.1.street_address}
-{/if}
-{if $event.location.address.1.supplemental_address_1}{$event.location.address.1.supplemental_address_1}
-{/if}
-{if $event.location.address.1.supplemental_address_2}{$event.location.address.1.supplemental_address_2}
-{/if}
-{if $event.location.address.1.city}{$event.location.address.1.city} {$event.location.address.1.postal_code}{if $event.location.address.1.postal_code_suffix} - $event.location.address.1.postal_code_suffix}{/if}
-{/if}
-
+{$event.location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{if $event.location.phone.1.phone || $event.location.email.1.email}
diff --git a/xml/templates/message_templates/payment_or_refund_notification_html.tpl b/xml/templates/message_templates/payment_or_refund_notification_html.tpl
index 56d344d311..6d6efeb52d 100644
--- a/xml/templates/message_templates/payment_or_refund_notification_html.tpl
+++ b/xml/templates/message_templates/payment_or_refund_notification_html.tpl
@@ -203,21 +203,7 @@
{if $isShowLocation}
- {if $location.address.1.name}
- {$location.address.1.name}
- {/if}
- {if $location.address.1.street_address}
- {$location.address.1.street_address}
- {/if}
- {if $location.address.1.supplemental_address_1}
- {$location.address.1.supplemental_address_1}
- {/if}
- {if $location.address.1.supplemental_address_2}
- {$location.address.1.supplemental_address_2}
- {/if}
- {if $location.address.1.city}
- {$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
- {/if}
+ {$location.address.1.display|nl2br}
|
{/if}
diff --git a/xml/templates/message_templates/payment_or_refund_notification_text.tpl b/xml/templates/message_templates/payment_or_refund_notification_text.tpl
index 35a37f5e5f..a09ad9e162 100644
--- a/xml/templates/message_templates/payment_or_refund_notification_text.tpl
+++ b/xml/templates/message_templates/payment_or_refund_notification_text.tpl
@@ -85,19 +85,7 @@ Dear {$contactDisplayName}
{/if}
{if $isShowLocation}
-{if $location.address.1.name}
-
-{$location.address.1.name}
-{/if}
-{if $location.address.1.street_address}{$location.address.1.street_address}
-{/if}
-{if $location.address.1.supplemental_address_1}{$location.address.1.supplemental_address_1}
-{/if}
-{if $location.address.1.supplemental_address_2}{$location.address.1.supplemental_address_2}
-{/if}
-{if $location.address.1.city}{$location.address.1.city} {$location.address.1.postal_code}{if $location.address.1.postal_code_suffix} - {$location.address.1.postal_code_suffix}{/if}
-{/if}
-
+{$location.address.1.display|strip_tags:false}
{/if}{*End of isShowLocation condition*}
{if $location.phone.1.phone || $location.email.1.email}
--
2.25.1