diff --git a/CRM/Upgrade/5.0.beta1.msg_template/civicrm_msg_template.tpl b/CRM/Upgrade/5.0.beta1.msg_template/civicrm_msg_template.tpl
new file mode 100644
index 000000000000..82348a290e27
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/civicrm_msg_template.tpl
@@ -0,0 +1,16 @@
+{php}
+ $dir = SMARTY_DIR . '/../../CRM/Upgrade/5.0.beta1.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/5.0.beta1.msg_template/message_templates/contribution_invoice_receipt_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_invoice_receipt_subject.tpl
new file mode 100644
index 000000000000..80d07865574d
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_invoice_receipt_subject.tpl
@@ -0,0 +1,12 @@
+{if $title}
+ {if $component}
+ {if $component == 'event'}
+ {ts 1=$title}Event Registration Invoice: %1{/ts}
+ {else}
+ {ts 1=$title}Contribution Invoice: %1{/ts}
+ {/if}
+ {/if}
+{else}
+ {ts}Invoice{/ts}
+{/if}
+- {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_html.tpl
new file mode 100644
index 000000000000..a4cbeee05ed5
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_html.tpl
@@ -0,0 +1,319 @@
+
+
+
+
+
+
+
+
+{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 $formValues.receipt_text}
+ {$formValues.receipt_text|htmlize}
+ {else}
+ {ts}Thank you for your support.{/ts}
+ {/if}
+
+ {ts}Please print this receipt for your records.{/ts}
+
+ |
+
+
+
+
+
+
+ {ts}Contribution Information{/ts}
+ |
+
+
+
+ {ts}Financial Type{/ts}
+ |
+
+ {$formValues.contributionType_name}
+ |
+
+
+ {if $lineItem and !$is_quick_config}
+ {foreach from=$lineItem item=value key=priceset}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Qty{/ts} |
+ {ts}Each{/ts} |
+ {if $getTaxDetails}
+ {ts}Subtotal{/ts} |
+ {ts}Tax Rate{/ts} |
+ {ts}Tax Amount{/ts} |
+ {/if}
+ {ts}Total{/ts} |
+
+ {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 $getTaxDetails}
+
+ {$line.unit_price*$line.qty|crmMoney:$currency}
+ |
+ {if $line.tax_rate != "" || $line.tax_amount != ""}
+
+ {$line.tax_rate|string_format:"%.2f"}%
+ |
+
+ {$line.tax_amount|crmMoney:$currency}
+ |
+ {else}
+ |
+ |
+ {/if}
+ {/if}
+
+ {$line.line_total+$line.tax_amount|crmMoney:$currency}
+ |
+
+ {/foreach}
+
+ |
+
+ {/foreach}
+ {/if}
+ {if $getTaxDetails && $dataArray}
+
+
+ {ts} Amount before Tax : {/ts}
+ |
+
+ {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
+ |
+
+
+ {foreach from=$dataArray item=value key=priceset}
+
+ {if $priceset || $priceset == 0 || $value != ''}
+ {$taxTerm} {$priceset|string_format:"%.2f"}% |
+ {$value|crmMoney:$currency} |
+ {else}
+ {ts}No{/ts} {$taxTerm} |
+ {$value|crmMoney:$currency} |
+ {/if}
+
+ {/foreach}
+ {/if}
+
+ {if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+
+
+
+ {ts}Total Amount{/ts}
+ |
+
+ {$formValues.total_amount|crmMoney:$currency}
+ |
+
+
+ {if $receive_date}
+
+
+ {ts}Date Received{/ts}
+ |
+
+ {$receive_date|truncate:10:''|crmDate}
+ |
+
+ {/if}
+
+ {if $receipt_date}
+
+
+ {ts}Receipt Date{/ts}
+ |
+
+ {$receipt_date|truncate:10:''|crmDate}
+ |
+
+ {/if}
+
+ {if $formValues.paidBy and !$formValues.hidden_CreditCard}
+
+
+ {ts}Paid By{/ts}
+ |
+
+ {$formValues.paidBy}
+ |
+
+ {if $formValues.check_number}
+
+
+ {ts}Check Number{/ts}
+ |
+
+ {$formValues.check_number}
+ |
+
+ {/if}
+ {/if}
+
+ {if $formValues.trxn_id}
+
+
+ {ts}Transaction ID{/ts}
+ |
+
+ {$formValues.trxn_id}
+ |
+
+ {/if}
+
+ {if $ccContribution}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ |
+
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+ {if $softCreditTypes and $softCredits}
+ {foreach from=$softCreditTypes item=softCreditType key=n}
+
+
+ {$softCreditType}
+ |
+
+ {foreach from=$softCredits.$n item=value key=label}
+
+
+ {$label}
+ |
+
+ {$value}
+ |
+
+ {/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 $formValues.product_name}
+
+
+ {ts}Premium Information{/ts}
+ |
+
+
+
+ {$formValues.product_name}
+ |
+
+ {if $formValues.product_option}
+
+
+ {ts}Option{/ts}
+ |
+
+ {$formValues.product_option}
+ |
+
+ {/if}
+ {if $formValues.product_sku}
+
+
+ {ts}SKU{/ts}
+ |
+
+ {$formValues.product_sku}
+ |
+
+ {/if}
+ {if $fulfilled_date}
+
+
+ {ts}Sent{/ts}
+ |
+
+ {$fulfilled_date|truncate:10:''|crmDate}
+ |
+
+ {/if}
+ {/if}
+
+
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_subject.tpl
new file mode 100644
index 000000000000..2a19c6e6c3b2
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_subject.tpl
@@ -0,0 +1 @@
+{ts}Contribution Receipt{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_text.tpl
new file mode 100644
index 000000000000..5bfac13c7357
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_offline_receipt_text.tpl
@@ -0,0 +1,120 @@
+{contact.email_greeting},
+
+{if $formValues.receipt_text}
+{$formValues.receipt_text}
+{else}{ts}Thank you for your support.{/ts}{/if}
+
+{ts}Please print this receipt for your records.{/ts}
+
+
+===========================================================
+{ts}Contribution Information{/ts}
+
+===========================================================
+{ts}Financial Type{/ts}: {$formValues.contributionType_name}
+{if $lineItem}
+{foreach from=$lineItem item=value key=priceset}
+---------------------------------------------------------
+{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 $getTaxDetails}
+{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}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $getTaxDetails} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+----------------------------------------------------------
+{foreach from=$value item=line}
+{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 $getTaxDetails}{$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"}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $getTaxDetails && $dataArray}
+{ts}Amount before Tax{/ts} : {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
+
+{foreach from=$dataArray item=value key=priceset}
+{if $priceset || $priceset == 0 || $value != ''}
+{$taxTerm} {$priceset|string_format:"%.2f"}% : {$value|crmMoney:$currency}
+{else}
+{ts}No{/ts} {$taxTerm} : {$value|crmMoney:$currency}
+{/if}
+{/foreach}
+{/if}
+
+{if isset($totalTaxAmount) && $totalTaxAmount !== 'null'}
+{ts}Total Tax Amount{/ts} : {$totalTaxAmount|crmMoney:$currency}
+{/if}
+{ts}Total Amount{/ts} : {$formValues.total_amount|crmMoney:$currency}
+{if $receive_date}
+{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
+{/if}
+{if $receipt_date}
+{ts}Receipt Date{/ts}: {$receipt_date|truncate:10:''|crmDate}
+{/if}
+{if $formValues.paidBy and !$formValues.hidden_CreditCard}
+{ts}Paid By{/ts}: {$formValues.paidBy}
+{if $formValues.check_number}
+{ts}Check Number{/ts}: {$formValues.check_number}
+{/if}
+{/if}
+{if $formValues.trxn_id}
+{ts}Transaction ID{/ts}: {$formValues.trxn_id}
+{/if}
+
+{if $ccContribution}
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+{if $customGroup}
+{foreach from=$customGroup item=value key=customName}
+===========================================================
+{$customName}
+===========================================================
+{foreach from=$value item=v key=n}
+{$n}: {$v}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $softCreditTypes and $softCredits}
+{foreach from=$softCreditTypes item=softCreditType key=n}
+===========================================================
+{$softCreditType}
+===========================================================
+{foreach from=$softCredits.$n item=value key=label}
+{$label}: {$value}
+{/foreach}
+{/foreach}
+{/if}
+
+{if $formValues.product_name}
+===========================================================
+{ts}Premium Information{/ts}
+
+===========================================================
+{$formValues.product_name}
+{if $formValues.product_option}
+{ts}Option{/ts}: {$formValues.product_option}
+{/if}
+{if $formValues.product_sku}
+{ts}SKU{/ts}: {$formValues.product_sku}
+{/if}
+{if $fulfilled_date}
+{ts}Sent{/ts}: {$fulfilled_date|crmDate}
+{/if}
+{/if}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_html.tpl
new file mode 100644
index 000000000000..61dc72d657b4
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_html.tpl
@@ -0,0 +1,473 @@
+
+
+
+
+
+
+
+
+{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 $receipt_text}
+ {$receipt_text|htmlize}
+ {/if}
+
+ {if $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}
+
+ |
+
+
+
+
+ {if $amount}
+
+
+
+
+ {ts}Contribution Information{/ts}
+ |
+
+
+ {if $lineItem and $priceSetID and !$is_quick_config}
+
+ {foreach from=$lineItem item=value key=priceset}
+
+
+ {* 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} |
+
+ {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 $getTaxDetails}
+
+ {$line.unit_price*$line.qty|crmMoney:$currency}
+ |
+ {if $line.tax_rate != "" || $line.tax_amount != ""}
+
+ {$line.tax_rate|string_format:"%.2f"}%
+ |
+
+ {$line.tax_amount|crmMoney:$currency}
+ |
+ {else}
+ |
+ |
+ {/if}
+ {/if}
+
+ {$line.line_total+$line.tax_amount|crmMoney:$currency}
+ |
+
+ {/foreach}
+
+ |
+
+ {/foreach}
+ {if $dataArray}
+
+
+ {ts} Amount before Tax : {/ts}
+ |
+
+ {$amount-$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 $totalTaxAmount}
+
+
+ {ts}Total Tax{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+
+
+ {ts}Total Amount{/ts}
+ |
+
+ {$amount|crmMoney:$currency}
+ |
+
+
+ {else}
+
+ {if $totalTaxAmount}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+
+
+ {ts}Amount{/ts}
+ |
+
+ {$amount|crmMoney:$currency} {if $amount_level} - {$amount_level}{/if}
+ |
+
+
+ {/if}
+
+ {/if}
+
+
+ {if $receive_date}
+
+
+ {ts}Date{/ts}
+ |
+
+ {$receive_date|crmDate}
+ |
+
+ {/if}
+
+ {if $is_monetary and $trxn_id}
+
+
+ {ts}Transaction #{/ts}
+ |
+
+ {$trxn_id}
+ |
+
+ {/if}
+
+ {if $is_recur}
+ {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
+
+
+ {ts 1=$cancelSubscriptionUrl}This is a recurring contribution. You can cancel future contributions by visiting this web page.{/ts}
+ |
+ {if $updateSubscriptionBillingUrl}
+
+
+
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}
+ |
+ {/if}
+
+
+
+ {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by visiting this web page.{/ts}
+ |
+
+ {/if}
+ {/if}
+
+ {if $honor_block_is_active}
+
+
+ {$soft_credit_type}
+ |
+
+ {foreach from=$honoreeProfile item=value key=label}
+
+
+ {$label}
+ |
+
+ {$value}
+ |
+
+ {/foreach}
+ {elseif $softCreditTypes and $softCredits}
+ {foreach from=$softCreditTypes item=softCreditType key=n}
+
+
+ {$softCreditType}
+ |
+
+ {foreach from=$softCredits.$n item=value key=label}
+
+
+ {$label}
+ |
+
+ {$value}
+ |
+
+ {/foreach}
+ {/foreach}
+ {/if}
+
+ {if $pcpBlock}
+
+
+ {ts}Personal Campaign Page{/ts}
+ |
+
+
+
+ {ts}Display In Honor Roll{/ts}
+ |
+
+ {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
+ |
+
+ {if $pcp_roll_nickname}
+
+
+ {ts}Nickname{/ts}
+ |
+
+ {$pcp_roll_nickname}
+ |
+
+ {/if}
+ {if $pcp_personal_note}
+
+
+ {ts}Personal Note{/ts}
+ |
+
+ {$pcp_personal_note}
+ |
+
+ {/if}
+ {/if}
+
+ {if $onBehalfProfile}
+
+
+ {$onBehalfProfile_grouptitle}
+ |
+
+ {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
+
+
+ {$onBehalfName}
+ |
+
+ {$onBehalfValue}
+ |
+
+ {/foreach}
+ {/if}
+
+ {if $isShare}
+
+
+ {capture assign=contributionUrl}{crmURL p='civicrm/contribute/transact' q="reset=1&id=`$contributionPageId`" a=true fe=1 h=1}{/capture}
+ {include file="CRM/common/SocialNetwork.tpl" emailMode=true url=$contributionUrl title=$title pageURL=$contributionUrl}
+ |
+
+ {/if}
+
+ {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
+ {if $is_pay_later && !$isBillingAddressRequiredForPayLater}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$email}
+ |
+
+ {elseif $amount GT 0}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ {$email}
+ |
+
+ {/if}
+ {/if}
+
+ {if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+ {if $selectPremium}
+
+
+ {ts}Premium Information{/ts}
+ |
+
+
+
+ {$product_name}
+ |
+
+ {if $option}
+
+
+ {ts}Option{/ts}
+ |
+
+ {$option}
+ |
+
+ {/if}
+ {if $sku}
+
+
+ {ts}SKU{/ts}
+ |
+
+ {$sku}
+ |
+
+ {/if}
+ {if $start_date}
+
+
+ {ts}Start Date{/ts}
+ |
+
+ {$start_date|crmDate}
+ |
+
+ {/if}
+ {if $end_date}
+
+
+ {ts}End Date{/ts}
+ |
+
+ {$end_date|crmDate}
+ |
+
+ {/if}
+ {if $contact_email OR $contact_phone}
+
+
+ {ts}For information about this premium, contact:{/ts}
+ {if $contact_email}
+ {$contact_email}
+ {/if}
+ {if $contact_phone}
+ {$contact_phone}
+ {/if}
+ |
+
+ {/if}
+ {if $is_deductible AND $price}
+
+
+ {ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}
+ |
+
+ {/if}
+ {/if}
+
+ {if $customPre}
+
+
+ {$customPre_grouptitle}
+ |
+
+ {foreach from=$customPre item=customValue key=customName}
+ {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$customValue}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $customPost}
+
+
+ {$customPost_grouptitle}
+ |
+
+ {foreach from=$customPost item=customValue key=customName}
+ {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$customValue}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_subject.tpl
new file mode 100644
index 000000000000..052dce5bd748
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_subject.tpl
@@ -0,0 +1 @@
+{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_text.tpl
new file mode 100644
index 000000000000..2820950ed170
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_online_receipt_text.tpl
@@ -0,0 +1,211 @@
+{contact.email_greeting},
+
+{if $receipt_text}
+{$receipt_text}
+{/if}
+{if $is_pay_later}
+
+===========================================================
+{$pay_later_receipt}
+===========================================================
+{else}
+
+{ts}Please print this receipt for your records.{/ts}
+{/if}
+
+{if $amount}
+===========================================================
+{ts}Contribution Information{/ts}
+
+===========================================================
+{if $lineItem and $priceSetID and !$is_quick_config}
+{foreach from=$lineItem item=value key=priceset}
+---------------------------------------------------------
+{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}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate} {$ts_taxAmount|string_format:"%10s"} {/if} {$ts_total|string_format:"%10s"}
+----------------------------------------------------------
+{foreach from=$value item=line}
+{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"}
+{/foreach}
+{/foreach}
+
+{if $dataArray}
+{ts}Amount before Tax{/ts}: {$amount-$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 $totalTaxAmount}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
+
+{ts}Total Amount{/ts}: {$amount|crmMoney:$currency}
+{else}
+{ts}Amount{/ts}: {$amount|crmMoney:$currency} {if $amount_level } - {$amount_level} {/if}
+{/if}
+{/if}
+{if $receive_date}
+
+{ts}Date{/ts}: {$receive_date|crmDate}
+{/if}
+{if $is_monetary and $trxn_id}
+{ts}Transaction #{/ts}: {$trxn_id}
+{/if}
+
+{if $is_recur and ($contributeMode eq 'notify' or $contributeMode eq 'directIPN')}
+{ts}This is a recurring contribution. You can cancel future contributions at:{/ts}
+
+{$cancelSubscriptionUrl}
+
+{if $updateSubscriptionBillingUrl}
+{ts}You can update billing details for this recurring contribution at:{/ts}
+
+{$updateSubscriptionBillingUrl}
+
+{/if}
+{ts}You can update recurring contribution amount or change the number of installments for this recurring contribution at:{/ts}
+
+{$updateSubscriptionUrl}
+
+{/if}
+
+{if $honor_block_is_active}
+===========================================================
+{$soft_credit_type}
+===========================================================
+{foreach from=$honoreeProfile item=value key=label}
+{$label}: {$value}
+{/foreach}
+{elseif $softCreditTypes and $softCredits}
+{foreach from=$softCreditTypes item=softCreditType key=n}
+===========================================================
+{$softCreditType}
+===========================================================
+{foreach from=$softCredits.$n item=value key=label}
+{$label}: {$value}
+{/foreach}
+{/foreach}
+{/if}
+{if $pcpBlock}
+===========================================================
+{ts}Personal Campaign Page{/ts}
+
+===========================================================
+{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
+
+{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
+
+{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
+
+{/if}
+{if $onBehalfProfile}
+===========================================================
+{ts}On Behalf Of{/ts}
+
+===========================================================
+{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
+{$onBehalfName}: {$onBehalfValue}
+{/foreach}
+{/if}
+
+{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
+{if $is_pay_later && !$isBillingAddressRequiredForPayLater}
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$email}
+{elseif $amount GT 0}
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+
+{$email}
+{/if} {* End ! is_pay_later condition. *}
+{/if}
+{if $contributeMode eq 'direct' AND !$is_pay_later AND $amount GT 0}
+
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+
+{if $selectPremium }
+===========================================================
+{ts}Premium Information{/ts}
+
+===========================================================
+{$product_name}
+{if $option}
+{ts}Option{/ts}: {$option}
+{/if}
+{if $sku}
+{ts}SKU{/ts}: {$sku}
+{/if}
+{if $start_date}
+{ts}Start Date{/ts}: {$start_date|crmDate}
+{/if}
+{if $end_date}
+{ts}End Date{/ts}: {$end_date|crmDate}
+{/if}
+{if $contact_email OR $contact_phone}
+
+{ts}For information about this premium, contact:{/ts}
+
+{if $contact_email}
+ {$contact_email}
+{/if}
+{if $contact_phone}
+ {$contact_phone}
+{/if}
+{/if}
+{if $is_deductible AND $price}
+
+{ts 1=$price|crmMoney:$currency}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
+{/if}
+
+{if $customPre}
+===========================================================
+{$customPre_grouptitle}
+
+===========================================================
+{foreach from=$customPre item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/if}
+
+
+{if $customPost}
+===========================================================
+{$customPost_grouptitle}
+
+===========================================================
+{foreach from=$customPost item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/if}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_html.tpl
new file mode 100644
index 000000000000..c7b962f4857e
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_html.tpl
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+{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},
+ {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts}
+ |
+
+
+
+
+
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ {$email}
+ |
+
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+
+
+ {ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts}
+ |
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_subject.tpl
new file mode 100644
index 000000000000..0a2a03b06449
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_subject.tpl
@@ -0,0 +1 @@
+{ts}Recurring Contribution Billing Updates{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_text.tpl
new file mode 100644
index 000000000000..d4732cc615b8
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_billing_text.tpl
@@ -0,0 +1,23 @@
+{contact.email_greeting},
+
+{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts}
+
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+
+{$email}
+
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+
+
+{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_html.tpl
new file mode 100644
index 000000000000..99bd2f84150e
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_html.tpl
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+{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},
+ {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_subject.tpl
new file mode 100644
index 000000000000..2b5a4d805fba
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_subject.tpl
@@ -0,0 +1 @@
+{ts}Recurring Contribution Cancellation Notification{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_text.tpl
new file mode 100644
index 000000000000..40c2986c7023
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_cancelled_text.tpl
@@ -0,0 +1,3 @@
+{contact.email_greeting},
+
+{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Your recurring contribution of %1, every %2 %3 has been cancelled as requested.{/ts}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_html.tpl
new file mode 100644
index 000000000000..894157b0b5b5
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_html.tpl
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+{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},
+ {ts}Your recurring contribution has been updated as requested:{/ts}
+ {ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts}{if $installments}{ts 1=$installments} for %1 installments{/ts}{/if}.
+
+ {ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_subject.tpl
new file mode 100644
index 000000000000..304649521623
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_subject.tpl
@@ -0,0 +1 @@
+{ts}Recurring Contribution Update Notification{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_text.tpl
new file mode 100644
index 000000000000..74b7f51bdce2
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_edit_text.tpl
@@ -0,0 +1,8 @@
+{contact.email_greeting},
+
+{ts}Your recurring contribution has been updated as requested:{/ts}
+
+{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Recurring contribution is for %1, every %2 %3(s){/ts}
+{if $installments}{ts 1=$installments} for %1 installments.{/ts}{/if}
+
+{ts 1=$receipt_from_email}If you have questions please contact us at %1.{/ts}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_html.tpl
new file mode 100644
index 000000000000..2582e7cbba33
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+ |
+
+
+
+ |
+
+
+ {if $recur_txnType eq 'START'}
+ {if $auto_renew_membership}
+
+
+ {ts}Thanks for your auto renew membership sign-up.{/ts}
+ {ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s). {/ts}
+ |
+
+
+
+ {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page.{/ts}
+ |
+
+ {if $updateSubscriptionBillingUrl}
+
+
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}
+ |
+
+ {/if}
+ {else}
+
+
+ {ts}Thanks for your recurring contribution sign-up.{/ts}
+ {ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments }{ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.
+ {ts}Start Date{/ts}: {$recur_start_date|crmDate}
+ |
+
+
+
+ {ts 1=$cancelSubscriptionUrl} You can cancel the recurring contribution option by visiting this web page.{/ts}
+ |
+
+ {if $updateSubscriptionBillingUrl}
+
+
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}
+ |
+
+ {/if}
+
+
+ {ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments details for this recurring contribution by visiting this web page.{/ts}
+ |
+
+ {/if}
+
+ {elseif $recur_txnType eq 'END'}
+
+ {if $auto_renew_membership}
+
+
+ {ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}
+ |
+
+ {else}
+
+
+ {ts}Your recurring contribution term has ended.{/ts}
+ {ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you for your support.{/ts}
+ |
+
+
+
+
+
+
+ {ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
+ |
+
+
+
+ {ts}Start Date{/ts}
+ |
+
+ {$recur_start_date|crmDate}
+ |
+
+
+
+ {ts}End Date{/ts}
+ |
+
+ {$recur_end_date|crmDate}
+ |
+
+
+ |
+
+
+ {/if}
+ {/if}
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_subject.tpl
new file mode 100644
index 000000000000..c9a9d927ad0e
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_subject.tpl
@@ -0,0 +1 @@
+{ts}Recurring Contribution Notification{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_text.tpl
new file mode 100644
index 000000000000..cf54ba592dd9
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/contribution_recurring_notify_text.tpl
@@ -0,0 +1,54 @@
+{contact.email_greeting},
+
+{if $recur_txnType eq 'START'}
+{if $auto_renew_membership}
+{ts}Thanks for your auto renew membership sign-up.{/ts}
+
+
+{ts 1=$recur_frequency_interval 2=$recur_frequency_unit}This membership will be automatically renewed every %1 %2(s).{/ts}
+
+{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page.{/ts}
+
+{if $updateSubscriptionBillingUrl}
+{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}
+
+{/if}
+{else}
+{ts}Thanks for your recurring contribution sign-up.{/ts}
+
+
+{ts 1=$recur_frequency_interval 2=$recur_frequency_unit 3=$recur_installments}This recurring contribution will be automatically processed every %1 %2(s){/ts}{if $recur_installments } {ts 1=$recur_installments} for a total of %1 installment(s){/ts}{/if}.
+
+{ts}Start Date{/ts}: {$recur_start_date|crmDate}
+
+{ts 1=$cancelSubscriptionUrl}You can cancel the recurring contribution option by visiting this web page.{/ts}
+
+{if $updateSubscriptionBillingUrl}
+{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this recurring contribution by visiting this web page.{/ts}
+
+{/if}
+{ts 1=$updateSubscriptionUrl}You can update recurring contribution amount or change the number of installments for this recurring contribution by visiting this web page.{/ts}
+{/if}
+
+{elseif $recur_txnType eq 'END'}
+{if $auto_renew_membership}
+{ts}Your auto renew membership sign-up has ended and your membership will not be automatically renewed.{/ts}
+
+
+{else}
+{ts}Your recurring contribution term has ended.{/ts}
+
+
+{ts 1=$recur_installments}You have successfully completed %1 recurring contributions. Thank you for your support.{/ts}
+
+
+==================================================
+{ts 1=$recur_installments}Interval of Subscription for %1 installment(s){/ts}
+
+==================================================
+{ts}Start Date{/ts}: {$recur_start_date|crmDate}
+
+{ts}End Date{/ts}: {$recur_end_date|crmDate}
+
+{/if}
+{/if}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/event_registration_receipt_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/event_registration_receipt_html.tpl
new file mode 100644
index 000000000000..121d07efa2a8
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.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}
+
+ {contact.email_greeting},
+ {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/5.0.beta1.msg_template/message_templates/event_registration_receipt_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/event_registration_receipt_text.tpl
new file mode 100644
index 000000000000..2a8d3f054581
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/event_registration_receipt_text.tpl
@@ -0,0 +1,80 @@
+{contact.email_greeting},
+{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/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_html.tpl
new file mode 100644
index 000000000000..2a126e61ea5b
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_html.tpl
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+{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},
+ {ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}
+ |
+
+
+
+
+
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ {$email}
+ |
+
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+
+
+ {ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts}
+ |
+
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_subject.tpl
new file mode 100644
index 000000000000..3579f9033090
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_subject.tpl
@@ -0,0 +1 @@
+{ts}Membership Autorenewal Billing Updates{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_text.tpl
new file mode 100644
index 000000000000..1100caf19107
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_billing_text.tpl
@@ -0,0 +1,23 @@
+{contact.email_greeting},
+
+{ts 1=$membershipType}Billing details for your automatically renewed %1 membership have been updated.{/ts}
+
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+
+{$email}
+
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+
+
+{ts 1=$receipt_from_email}If you have questions please contact us at %1{/ts}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_html.tpl
new file mode 100644
index 000000000000..b9709cfe60aa
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_html.tpl
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+{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},
+ {ts 1=$membershipType}The automatic renewal of your %1 membership has been cancelled as requested. This does not affect the status of your membership - you will receive a separate notification when your membership is up for renewal.{/ts}
+
+ |
+
+
+
+
+
+
+ {ts}Membership Information{/ts}
+ |
+
+
+
+ {ts}Membership Status{/ts}
+ |
+
+ {$membership_status}
+ |
+
+ {if $mem_start_date}
+
+
+ {ts}Membership Start Date{/ts}
+ |
+
+ {$mem_start_date|crmDate}
+ |
+
+ {/if}
+ {if $mem_end_date}
+
+
+ {ts}Membership End Date{/ts}
+ |
+
+ {$mem_end_date|crmDate}
+ |
+
+ {/if}
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_subject.tpl
new file mode 100644
index 000000000000..69c2ab8a3c1e
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_subject.tpl
@@ -0,0 +1 @@
+{ts}Autorenew Membership Cancellation Notification{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_text.tpl
new file mode 100644
index 000000000000..635767841175
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_autorenew_cancelled_text.tpl
@@ -0,0 +1,14 @@
+{contact.email_greeting},
+
+{ts 1=$membershipType}The automatic renewal of your %1 membership has been cancelled as requested. This does not affect the status of your membership - you will receive a separate notification when your membership is up for renewal.{/ts}
+
+===========================================================
+{ts}Membership Information{/ts}
+
+===========================================================
+{ts}Membership Status{/ts}: {$membership_status}
+{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
+{/if}
+{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
+{/if}
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_html.tpl
new file mode 100644
index 000000000000..4f7ed9eea917
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_html.tpl
@@ -0,0 +1,297 @@
+
+
+
+
+
+
+
+
+{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 $formValues.receipt_text_signup}
+ {$formValues.receipt_text_signup|htmlize}
+ {elseif $formValues.receipt_text_renewal}
+ {$formValues.receipt_text_renewal|htmlize}
+ {else}
+ {ts}Thank you for your support.{/ts}
+ {/if}
+ {if ! $cancelled}
+ {ts}Please print this receipt for your records.{/ts}
+ {/if}
+ |
+
+
+
+
+ {if !$lineItem}
+
+
+ {ts}Membership Information{/ts}
+ |
+
+
+
+ {ts}Membership Type{/ts}
+ |
+
+ {$membership_name}
+ |
+
+ {/if}
+ {if ! $cancelled}
+ {if !$lineItem}
+
+
+ {ts}Membership Start Date{/ts}
+ |
+
+ {$mem_start_date}
+ |
+
+
+
+ {ts}Membership End Date{/ts}
+ |
+
+ {$mem_end_date}
+ |
+
+ {/if}
+ {if $formValues.total_amount OR $formValues.total_amount eq 0 }
+
+
+ {ts}Membership Fee{/ts}
+ |
+
+ {if $formValues.contributionType_name}
+
+
+ {ts}Financial Type{/ts}
+ |
+
+ {$formValues.contributionType_name}
+ |
+
+ {/if}
+
+ {if $lineItem}
+ {foreach from=$lineItem item=value key=priceset}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Fee{/ts} |
+ {if $dataArray}
+ {ts}SubTotal{/ts} |
+ {ts}Tax Rate{/ts} |
+ {ts}Tax Amount{/ts} |
+ {ts}Total{/ts} |
+ {/if}
+ {ts}Membership Start Date{/ts} |
+ {ts}Membership End Date{/ts} |
+
+ {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.line_total|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}
+
+ {$line.line_total+$line.tax_amount|crmMoney}
+ |
+ {/if}
+
+ {$line.start_date}
+ |
+
+ {$line.end_date}
+ |
+
+ {/foreach}
+
+ |
+
+ {/foreach}
+ {if $dataArray}
+
+
+ {ts}Amount Before Tax:{/ts}
+ |
+
+ {$formValues.total_amount-$totalTaxAmount|crmMoney}
+ |
+
+ {foreach from=$dataArray item=value key=priceset}
+
+ {if $priceset}
+ {$taxTerm} {$priceset|string_format:"%.2f"}% |
+ {$value|crmMoney:$currency} |
+ {elseif $priceset == 0}
+ {ts}No{/ts} {$taxTerm} |
+ {$value|crmMoney:$currency} |
+ {/if}
+
+ {/foreach}
+ {/if}
+ {/if}
+ {if isset($totalTaxAmount)}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+
+
+ {ts}Amount{/ts}
+ |
+
+ {$formValues.total_amount|crmMoney}
+ |
+
+ {if $receive_date}
+
+
+ {ts}Date Received{/ts}
+ |
+
+ {$receive_date|truncate:10:''|crmDate}
+ |
+
+ {/if}
+ {if $formValues.paidBy}
+
+
+ {ts}Paid By{/ts}
+ |
+
+ {$formValues.paidBy}
+ |
+
+ {if $formValues.check_number}
+
+
+ {ts}Check Number{/ts}
+ |
+
+ {$formValues.check_number}
+ |
+
+ {/if}
+ {/if}
+ {/if}
+ {/if}
+
+ |
+
+
+ {if $isPrimary}
+
+
+
+
+ {if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address}
+ |
+
+ {/if}
+
+ {if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ |
+
+
+
+ {ts}Expires{/ts}
+ |
+
+ {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+
+ |
+
+ {/if}
+
+ {if $customValues}
+
+
+
+
+
+ {ts}Membership Options{/ts}
+ |
+
+ {foreach from=$customValues item=value key=customName}
+
+
+ {$customName}
+ |
+
+ {$value}
+ |
+
+ {/foreach}
+
+ |
+
+ {/if}
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_subject.tpl
new file mode 100644
index 000000000000..22f1b0b6a0af
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_subject.tpl
@@ -0,0 +1,6 @@
+{if $receiptType EQ 'membership signup'}
+{ts}Membership Confirmation and Receipt{/ts}
+{elseif $receiptType EQ 'membership renewal'}
+{ts}Membership Renewal Confirmation and Receipt{/ts}
+{/if}
+{contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_text.tpl
new file mode 100644
index 000000000000..057bb14b0440
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_offline_receipt_text.tpl
@@ -0,0 +1,115 @@
+{contact.email_greeting},
+
+{if $formValues.receipt_text_signup}
+{$formValues.receipt_text_signup}
+{elseif $formValues.receipt_text_renewal}
+{$formValues.receipt_text_renewal}
+{else}{ts}Thank you for your support.{/ts}{/if}
+
+{if ! $cancelled}{ts}Please print this receipt for your records.{/ts}
+
+
+{/if}
+{if !$lineItem}
+===========================================================
+{ts}Membership Information{/ts}
+
+===========================================================
+{ts}Membership Type{/ts}: {$membership_name}
+{/if}
+{if ! $cancelled}
+{if !$lineItem}
+{ts}Membership Start Date{/ts}: {$mem_start_date}
+{ts}Membership End Date{/ts}: {$mem_end_date}
+{/if}
+
+{if $formValues.total_amount OR $formValues.total_amount eq 0 }
+===========================================================
+{ts}Membership Fee{/ts}
+
+===========================================================
+{if $formValues.contributionType_name}
+{ts}Financial Type{/ts}: {$formValues.contributionType_name}
+{/if}
+{if $lineItem}
+{foreach from=$lineItem item=value key=priceset}
+{capture assign=ts_item}{ts}Item{/ts}{/capture}
+{capture assign=ts_total}{ts}Fee{/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}
+{capture assign=ts_total}{ts}Total{/ts}{/capture}
+{/if}
+{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
+{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+--------------------------------------------------------------------------------------------------
+
+{foreach from=$value item=line}
+{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.line_total|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} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{/foreach}
+{/foreach}
+
+{if $dataArray}
+{ts}Amount before Tax{/ts}: {$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}
+
+{foreach from=$dataArray item=value key=priceset}
+{if $priceset}
+{$taxTerm} {$priceset|string_format:"%.2f"} %: {$value|crmMoney:$currency}
+{elseif $priceset == 0}
+{ts}No{/ts} {$taxTerm}: {$value|crmMoney:$currency}
+{/if}
+{/foreach}
+{/if}
+--------------------------------------------------------------------------------------------------
+{/if}
+
+{if isset($totalTaxAmount)}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
+
+{ts}Amount{/ts}: {$formValues.total_amount|crmMoney}
+{if $receive_date}
+{ts}Date Received{/ts}: {$receive_date|truncate:10:''|crmDate}
+{/if}
+{if $formValues.paidBy}
+{ts}Paid By{/ts}: {$formValues.paidBy}
+{if $formValues.check_number}
+{ts}Check Number{/ts}: {$formValues.check_number}
+{/if}
+{/if}
+{/if}
+{/if}
+
+{if $isPrimary }
+{if $contributeMode ne 'notify' and !$isAmountzero and !$is_pay_later }
+
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+{/if}
+
+{if $contributeMode eq 'direct' and !$isAmountzero and !$is_pay_later}
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+{/if}
+
+{if $customValues}
+===========================================================
+{ts}Membership Options{/ts}
+
+===========================================================
+{foreach from=$customValues item=value key=customName}
+ {$customName} : {$value}
+{/foreach}
+{/if}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_html.tpl
new file mode 100644
index 000000000000..a1e20138885d
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_html.tpl
@@ -0,0 +1,556 @@
+
+
+
+
+
+
+
+
+{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 $receipt_text}
+ {$receipt_text|htmlize}
+ {/if}
+
+ {if $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}
+
+ |
+
+
+
+
+ {if $membership_assign && !$useForMember}
+
+
+ {ts}Membership Information{/ts}
+ |
+
+
+
+ {ts}Membership Type{/ts}
+ |
+
+ {$membership_name}
+ |
+
+ {if $mem_start_date}
+
+
+ {ts}Membership Start Date{/ts}
+ |
+
+ {$mem_start_date|crmDate}
+ |
+
+ {/if}
+ {if $mem_end_date}
+
+
+ {ts}Membership End Date{/ts}
+ |
+
+ {$mem_end_date|crmDate}
+ |
+
+ {/if}
+ {/if}
+
+
+ {if $amount}
+
+
+ {ts}Membership Fee{/ts}
+ |
+
+
+ {if !$useForMember and $membership_amount and $is_quick_config}
+
+
+
+ {ts 1=$membership_name}%1 Membership{/ts}
+ |
+
+ {$membership_amount|crmMoney}
+ |
+
+ {if $amount && !$is_separate_payment }
+
+
+ {ts}Contribution Amount{/ts}
+ |
+
+ {$amount|crmMoney}
+ |
+
+
+
+ {ts}Total{/ts}
+ |
+
+ {$amount+$membership_amount|crmMoney}
+ |
+
+ {/if}
+
+ {elseif !$useForMember && $lineItem and $priceSetID and !$is_quick_config}
+
+ {foreach from=$lineItem item=value key=priceset}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Qty{/ts} |
+ {ts}Each{/ts} |
+ {ts}Total{/ts} |
+
+ {foreach from=$value item=line}
+
+
+ {$line.description|truncate:30:"..."}
+ |
+
+ {$line.qty}
+ |
+
+ {$line.unit_price|crmMoney}
+ |
+
+ {$line.line_total|crmMoney}
+ |
+
+ {/foreach}
+
+ |
+
+ {/foreach}
+
+
+ {ts}Total Amount{/ts}
+ |
+
+ {$amount|crmMoney}
+ |
+
+
+ {else}
+ {if $useForMember && $lineItem and !$is_quick_config}
+ {foreach from=$lineItem item=value key=priceset}
+
+
+ {* FIXME: style this table so that it looks like the text version (justification, etc.) *}
+
+ {ts}Item{/ts} |
+ {ts}Fee{/ts} |
+ {if $dataArray}
+ {ts}SubTotal{/ts} |
+ {ts}Tax Rate{/ts} |
+ {ts}Tax Amount{/ts} |
+ {ts}Total{/ts} |
+ {/if}
+ {ts}Membership Start Date{/ts} |
+ {ts}Membership End Date{/ts} |
+
+ {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.line_total|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}
+
+ {$line.line_total+$line.tax_amount|crmMoney}
+ |
+ {/if}
+
+ {$line.start_date}
+ |
+
+ {$line.end_date}
+ |
+
+ {/foreach}
+
+ |
+
+ {/foreach}
+ {if $dataArray}
+
+
+ {ts}Amount Before Tax:{/ts}
+ |
+
+ {$amount-$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 $totalTaxAmount}
+
+
+ {ts}Total Tax Amount{/ts}
+ |
+
+ {$totalTaxAmount|crmMoney:$currency}
+ |
+
+ {/if}
+
+
+ {ts}Amount{/ts}
+ |
+
+ {$amount|crmMoney} {if $amount_level} - {$amount_level}{/if}
+ |
+
+
+ {/if}
+
+
+ {elseif $membership_amount}
+
+
+
+
+ {ts}Membership Fee{/ts}
+ |
+
+
+
+ {ts 1=$membership_name}%1 Membership{/ts}
+ |
+
+ {$membership_amount|crmMoney}
+ |
+
+
+
+ {/if}
+
+ {if $receive_date}
+
+
+ {ts}Date{/ts}
+ |
+
+ {$receive_date|crmDate}
+ |
+
+ {/if}
+
+ {if $is_monetary and $trxn_id}
+
+
+ {ts}Transaction #{/ts}
+ |
+
+ {$trxn_id}
+ |
+
+ {/if}
+
+ {if $membership_trx_id}
+
+
+ {ts}Membership Transaction #{/ts}
+ |
+
+ {$membership_trx_id}
+ |
+
+ {/if}
+ {if $is_recur}
+ {if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
+
+
+ {ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page.{/ts}
+ |
+
+ {if $updateSubscriptionBillingUrl}
+
+
+ {ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}
+ |
+
+ {/if}
+ {/if}
+ {/if}
+
+ {if $honor_block_is_active}
+
+
+ {$soft_credit_type}
+ |
+
+ {foreach from=$honoreeProfile item=value key=label}
+
+
+ {$label}
+ |
+
+ {$value}
+ |
+
+ {/foreach}
+ {/if}
+
+ {if $pcpBlock}
+
+
+ {ts}Personal Campaign Page{/ts}
+ |
+
+
+
+ {ts}Display In Honor Roll{/ts}
+ |
+
+ {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
+ |
+
+ {if $pcp_roll_nickname}
+
+
+ {ts}Nickname{/ts}
+ |
+
+ {$pcp_roll_nickname}
+ |
+
+ {/if}
+ {if $pcp_personal_note}
+
+
+ {ts}Personal Note{/ts}
+ |
+
+ {$pcp_personal_note}
+ |
+
+ {/if}
+ {/if}
+
+ {if $onBehalfProfile}
+
+
+ {$onBehalfProfile_grouptitle}
+ |
+
+ {foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
+
+
+ {$onBehalfName}
+ |
+
+ {$onBehalfValue}
+ |
+
+ {/foreach}
+ {/if}
+
+ {if ! ($contributeMode eq 'notify' OR $contributeMode eq 'directIPN') and $is_monetary}
+ {if $is_pay_later}
+
+
+ {ts}Registered Email{/ts}
+ |
+
+
+
+ {$email}
+ |
+
+ {elseif $amount GT 0 OR $membership_amount GT 0}
+
+
+ {ts}Billing Name and Address{/ts}
+ |
+
+
+
+ {$billingName}
+ {$address|nl2br}
+ {$email}
+ |
+
+ {/if}
+ {/if}
+
+ {if $contributeMode eq 'direct' AND !$is_pay_later AND ($amount GT 0 OR $membership_amount GT 0)}
+
+
+ {ts}Credit Card Information{/ts}
+ |
+
+
+
+ {$credit_card_type}
+ {$credit_card_number}
+ {ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+ |
+
+ {/if}
+
+ {if $selectPremium}
+
+
+ {ts}Premium Information{/ts}
+ |
+
+
+
+ {$product_name}
+ |
+
+ {if $option}
+
+
+ {ts}Option{/ts}
+ |
+
+ {$option}
+ |
+
+ {/if}
+ {if $sku}
+
+
+ {ts}SKU{/ts}
+ |
+
+ {$sku}
+ |
+
+ {/if}
+ {if $start_date}
+
+
+ {ts}Start Date{/ts}
+ |
+
+ {$start_date|crmDate}
+ |
+
+ {/if}
+ {if $end_date}
+
+
+ {ts}End Date{/ts}
+ |
+
+ {$end_date|crmDate}
+ |
+
+ {/if}
+ {if $contact_email OR $contact_phone}
+
+
+ {ts}For information about this premium, contact:{/ts}
+ {if $contact_email}
+ {$contact_email}
+ {/if}
+ {if $contact_phone}
+ {$contact_phone}
+ {/if}
+ |
+
+ {/if}
+ {if $is_deductible AND $price}
+
+
+ {ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}
+ |
+
+ {/if}
+ {/if}
+
+ {if $customPre}
+
+
+ {$customPre_grouptitle}
+ |
+
+ {foreach from=$customPre item=customValue key=customName}
+ {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$customValue}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+ {if $customPost}
+
+
+ {$customPost_grouptitle}
+ |
+
+ {foreach from=$customPost item=customValue key=customName}
+ {if ($trackingFields and ! in_array($customName, $trackingFields)) or ! $trackingFields}
+
+
+ {$customName}
+ |
+
+ {$customValue}
+ |
+
+ {/if}
+ {/foreach}
+ {/if}
+
+
+
+
+
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_subject.tpl
new file mode 100644
index 000000000000..052dce5bd748
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_subject.tpl
@@ -0,0 +1 @@
+{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_text.tpl
new file mode 100644
index 000000000000..5d8420876c2b
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/membership_online_receipt_text.tpl
@@ -0,0 +1,243 @@
+{contact.email_greeting},
+
+{if $receipt_text}
+{$receipt_text}
+{/if}
+{if $is_pay_later}
+
+===========================================================
+{$pay_later_receipt}
+===========================================================
+{else}
+
+{ts}Please print this receipt for your records.{/ts}
+{/if}
+
+{if $membership_assign && !$useForMember}
+===========================================================
+{ts}Membership Information{/ts}
+
+===========================================================
+{ts}Membership Type{/ts}: {$membership_name}
+{if $mem_start_date}{ts}Membership Start Date{/ts}: {$mem_start_date|crmDate}
+{/if}
+{if $mem_end_date}{ts}Membership End Date{/ts}: {$mem_end_date|crmDate}
+{/if}
+
+{/if}
+{if $amount}
+===========================================================
+{ts}Membership Fee{/ts}
+
+===========================================================
+{if !$useForMember && $membership_amount && $is_quick_config}
+{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
+{if $amount && !$is_separate_payment }
+{ts}Contribution Amount{/ts}: {$amount|crmMoney}
+-------------------------------------------
+{ts}Total{/ts}: {$amount+$membership_amount|crmMoney}
+{/if}
+{elseif !$useForMember && $lineItem and $priceSetID & !$is_quick_config}
+{foreach from=$lineItem item=value key=priceset}
+---------------------------------------------------------
+{capture assign=ts_item}{ts}Item{/ts}{/capture}
+{capture assign=ts_qty}{ts}Qty{/ts}{/capture}
+{capture assign=ts_each}{ts}Each{/ts}{/capture}
+{capture assign=ts_total}{ts}Total{/ts}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_qty|string_format:"%5s"} {$ts_each|string_format:"%10s"} {$ts_total|string_format:"%10s"}
+----------------------------------------------------------
+{foreach from=$value item=line}
+{$line.description|truncate:30:"..."|string_format:"%-30s"} {$line.qty|string_format:"%5s"} {$line.unit_price|crmMoney|string_format:"%10s"} {$line.line_total|crmMoney|string_format:"%10s"}
+{/foreach}
+{/foreach}
+
+{ts}Total Amount{/ts}: {$amount|crmMoney}
+{else}
+{if $useForMember && $lineItem && !$is_quick_config}
+{foreach from=$lineItem item=value key=priceset}
+{capture assign=ts_item}{ts}Item{/ts}{/capture}
+{capture assign=ts_total}{ts}Fee{/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}
+{capture assign=ts_total}{ts}Total{/ts}{/capture}
+{/if}
+{capture assign=ts_start_date}{ts}Membership Start Date{/ts}{/capture}
+{capture assign=ts_end_date}{ts}Membership End Date{/ts}{/capture}
+{$ts_item|string_format:"%-30s"} {$ts_total|string_format:"%10s"} {if $dataArray} {$ts_subtotal|string_format:"%10s"} {$ts_taxRate|string_format:"%10s"} {$ts_taxAmount|string_format:"%10s"} {$ts_total|string_format:"%10s"} {/if} {$ts_start_date|string_format:"%20s"} {$ts_end_date|string_format:"%20s"}
+--------------------------------------------------------------------------------------------------
+
+{foreach from=$value item=line}
+{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.line_total|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} {$line.line_total+$line.tax_amount|crmMoney|string_format:"%10s"} {/if} {$line.start_date|string_format:"%20s"} {$line.end_date|string_format:"%20s"}
+{/foreach}
+{/foreach}
+
+{if $dataArray}
+{ts}Amount before Tax{/ts}: {$amount-$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 $totalTaxAmount}
+{ts}Total Tax Amount{/ts}: {$totalTaxAmount|crmMoney:$currency}
+{/if}
+
+{ts}Amount{/ts}: {$amount|crmMoney} {if $amount_level } - {$amount_level} {/if}
+{/if}
+{elseif $membership_amount}
+===========================================================
+{ts}Membership Fee{/ts}
+
+===========================================================
+{ts 1=$membership_name}%1 Membership{/ts}: {$membership_amount|crmMoney}
+{/if}
+
+{if $receive_date}
+
+{ts}Date{/ts}: {$receive_date|crmDate}
+{/if}
+{if $is_monetary and $trxn_id}
+{ts}Transaction #{/ts}: {$trxn_id}
+
+{/if}
+{if $membership_trx_id}
+{ts}Membership Transaction #{/ts}: {$membership_trx_id}
+
+{/if}
+{if $is_recur}
+{if $contributeMode eq 'notify' or $contributeMode eq 'directIPN'}
+{ts 1=$cancelSubscriptionUrl}This membership will be renewed automatically. You can cancel the auto-renewal option by visiting this web page: %1.{/ts}
+{if $updateSubscriptionBillingUrl}
+
+{ts 1=$updateSubscriptionBillingUrl}You can update billing details for this automatically renewed membership by visiting this web page.{/ts}
+{/if}
+{/if}
+{/if}
+
+{if $honor_block_is_active }
+===========================================================
+{$soft_credit_type}
+===========================================================
+{foreach from=$honoreeProfile item=value key=label}
+{$label}: {$value}
+{/foreach}
+
+{/if}
+{if $pcpBlock}
+===========================================================
+{ts}Personal Campaign Page{/ts}
+
+===========================================================
+{ts}Display In Honor Roll{/ts}: {if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}
+
+{if $pcp_roll_nickname}{ts}Nickname{/ts}: {$pcp_roll_nickname}{/if}
+
+{if $pcp_personal_note}{ts}Personal Note{/ts}: {$pcp_personal_note}{/if}
+
+{/if}
+{if $onBehalfProfile}
+===========================================================
+{ts}On Behalf Of{/ts}
+
+===========================================================
+{foreach from=$onBehalfProfile item=onBehalfValue key=onBehalfName}
+{$onBehalfName}: {$onBehalfValue}
+{/foreach}
+{/if}
+
+{if !( $contributeMode eq 'notify' OR $contributeMode eq 'directIPN' ) and $is_monetary}
+{if $is_pay_later}
+===========================================================
+{ts}Registered Email{/ts}
+
+===========================================================
+{$email}
+{elseif $amount GT 0 OR $membership_amount GT 0 }
+===========================================================
+{ts}Billing Name and Address{/ts}
+
+===========================================================
+{$billingName}
+{$address}
+
+{$email}
+{/if} {* End ! is_pay_later condition. *}
+{/if}
+{if $contributeMode eq 'direct' AND !$is_pay_later AND ( $amount GT 0 OR $membership_amount GT 0 ) }
+
+===========================================================
+{ts}Credit Card Information{/ts}
+
+===========================================================
+{$credit_card_type}
+{$credit_card_number}
+{ts}Expires{/ts}: {$credit_card_exp_date|truncate:7:''|crmDate}
+{/if}
+
+{if $selectPremium }
+===========================================================
+{ts}Premium Information{/ts}
+
+===========================================================
+{$product_name}
+{if $option}
+{ts}Option{/ts}: {$option}
+{/if}
+{if $sku}
+{ts}SKU{/ts}: {$sku}
+{/if}
+{if $start_date}
+{ts}Start Date{/ts}: {$start_date|crmDate}
+{/if}
+{if $end_date}
+{ts}End Date{/ts}: {$end_date|crmDate}
+{/if}
+{if $contact_email OR $contact_phone}
+
+{ts}For information about this premium, contact:{/ts}
+
+{if $contact_email}
+ {$contact_email}
+{/if}
+{if $contact_phone}
+ {$contact_phone}
+{/if}
+{/if}
+{if $is_deductible AND $price}
+
+{ts 1=$price|crmMoney}The value of this premium is %1. This may affect the amount of the tax deduction you can claim. Consult your tax advisor for more information.{/ts}{/if}
+{/if}
+
+{if $customPre}
+===========================================================
+{$customPre_grouptitle}
+
+===========================================================
+{foreach from=$customPre item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/if}
+
+
+{if $customPost}
+===========================================================
+{$customPost_grouptitle}
+
+===========================================================
+{foreach from=$customPost item=customValue key=customName}
+{if ( $trackingFields and ! in_array( $customName, $trackingFields ) ) or ! $trackingFields}
+ {$customName}: {$customValue}
+{/if}
+{/foreach}
+{/if}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_html.tpl
new file mode 100644
index 000000000000..f6bc1b12172b
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+ {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/5.0.beta1.msg_template/message_templates/participant_cancelled_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_subject.tpl
new file mode 100644
index 000000000000..e39740983922
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_subject.tpl
@@ -0,0 +1 @@
+{ts 1=$event.event_title}Event Registration Cancelled for %1{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_text.tpl
new file mode 100644
index 000000000000..566fdfd7372f
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_cancelled_text.tpl
@@ -0,0 +1,47 @@
+{contact.email_greeting},
+
+{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/5.0.beta1.msg_template/message_templates/participant_confirm_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_confirm_html.tpl
new file mode 100644
index 000000000000..af4fa8b53550
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+ |
+
+ {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/5.0.beta1.msg_template/message_templates/participant_confirm_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_confirm_text.tpl
new file mode 100644
index 000000000000..3dc53a1999e0
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_confirm_text.tpl
@@ -0,0 +1,81 @@
+{contact.email_greeting},
+{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/5.0.beta1.msg_template/message_templates/participant_expired_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_expired_html.tpl
new file mode 100644
index 000000000000..7af4dea95cb5
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+ {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/5.0.beta1.msg_template/message_templates/participant_expired_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_expired_text.tpl
new file mode 100644
index 000000000000..bc8e673f982a
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_expired_text.tpl
@@ -0,0 +1,51 @@
+{contact.email_greeting},
+
+{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/5.0.beta1.msg_template/message_templates/participant_transferred_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_html.tpl
new file mode 100644
index 000000000000..ff1a1596084d
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {contact.email_greeting},
+ {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/5.0.beta1.msg_template/message_templates/participant_transferred_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_subject.tpl
new file mode 100644
index 000000000000..2e2bf244d575
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_subject.tpl
@@ -0,0 +1 @@
+{ts 1=$event.event_title}Event Registration Transferred for %1{/ts} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_text.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_text.tpl
new file mode 100644
index 000000000000..eaaec828dc74
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/participant_transferred_text.tpl
@@ -0,0 +1,45 @@
+{contact.email_greeting},
+
+{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/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_html.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_html.tpl
new file mode 100644
index 000000000000..d32860804575
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_html.tpl
@@ -0,0 +1,253 @@
+
+
+
+
+
+
+
+
+{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}
+
+
+
+
+
+
+
+
+
+
+
+
+ {if $isRefund}
+ {contact.email_greeting},
+ {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 Amount{/ts}
+ |
+
+ {$totalAmount|crmMoney}
+ |
+
+
+
+ {ts}You Paid{/ts}
+ |
+
+ {$totalPaid|crmMoney}
+ |
+
+
+
+ {ts}Refund Amount{/ts}
+ |
+
+ {$refundAmount|crmMoney}
+ |
+ |
+ {else}
+
+ {ts}Payment Details{/ts} |
+
+
+
+ {ts}Total Amount{/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 for completing payment.{/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}
+
+
+ {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/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_subject.tpl
new file mode 100644
index 000000000000..0bd6ab689f0b
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/payment_or_refund_notification_subject.tpl
@@ -0,0 +1,2 @@
+{if $isRefund}{ts}Refund Notification{/ts}{else}{ts}Payment Receipt{/ts}{/if} - {if $component eq 'event'}{$event.title}{/if} - {contact.display_name}
+
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_confirmation_needed_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_confirmation_needed_subject.tpl
new file mode 100644
index 000000000000..2d39e4c4dcf2
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_confirmation_needed_subject.tpl
@@ -0,0 +1 @@
+Confirmation of signature needed for {$petition.title} - {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_sign_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_sign_subject.tpl
new file mode 100644
index 000000000000..4b53e92119c6
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/petition_sign_subject.tpl
@@ -0,0 +1 @@
+Thank you for signing {$petition.title}, {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_acknowledge_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_acknowledge_subject.tpl
new file mode 100644
index 000000000000..60864d3e988e
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_acknowledge_subject.tpl
@@ -0,0 +1 @@
+{ts}Thank you for your Pledge{/ts}, {contact.display_name}
diff --git a/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_reminder_subject.tpl b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_reminder_subject.tpl
new file mode 100644
index 000000000000..e648dc2dea9b
--- /dev/null
+++ b/CRM/Upgrade/5.0.beta1.msg_template/message_templates/pledge_reminder_subject.tpl
@@ -0,0 +1 @@
+{ts}Pledge Payment Reminder{/ts} {ts}for{/ts} {contact.display_name}
diff --git a/CRM/Upgrade/Incremental/sql/5.0.beta1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.0.beta1.mysql.tpl
index b58251174b72..72b6a4edf8cf 100644
--- a/CRM/Upgrade/Incremental/sql/5.0.beta1.mysql.tpl
+++ b/CRM/Upgrade/Incremental/sql/5.0.beta1.mysql.tpl
@@ -1 +1,5 @@
{* file to handle db changes in 5.0.beta1 during upgrade *}
+
+-- CRM-20184 Missing email_greeting in Workflow Templates
+{include file='../CRM/Upgrade/5.0.beta1.msg_template/civicrm_msg_template.tpl'}
+
diff --git a/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl b/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl
index f99fe4475025..80d07865574d 100644
--- a/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl
+++ b/xml/templates/message_templates/contribution_invoice_receipt_subject.tpl
@@ -9,3 +9,4 @@
{else}
{ts}Invoice{/ts}
{/if}
+- {contact.display_name}
diff --git a/xml/templates/message_templates/contribution_offline_receipt_html.tpl b/xml/templates/message_templates/contribution_offline_receipt_html.tpl
index 8a840cef62c2..a4cbeee05ed5 100644
--- a/xml/templates/message_templates/contribution_offline_receipt_html.tpl
+++ b/xml/templates/message_templates/contribution_offline_receipt_html.tpl
@@ -21,7 +21,7 @@
-
+ {contact.email_greeting},
{if $formValues.receipt_text}
{$formValues.receipt_text|htmlize}
{else}
diff --git a/xml/templates/message_templates/contribution_offline_receipt_subject.tpl b/xml/templates/message_templates/contribution_offline_receipt_subject.tpl
index a2e2f61c7650..2a19c6e6c3b2 100644
--- a/xml/templates/message_templates/contribution_offline_receipt_subject.tpl
+++ b/xml/templates/message_templates/contribution_offline_receipt_subject.tpl
@@ -1 +1 @@
-{ts}Contribution Receipt{/ts}
+{ts}Contribution Receipt{/ts} - {contact.display_name}
diff --git a/xml/templates/message_templates/contribution_offline_receipt_text.tpl b/xml/templates/message_templates/contribution_offline_receipt_text.tpl
index 6b46e34259eb..5bfac13c7357 100644
--- a/xml/templates/message_templates/contribution_offline_receipt_text.tpl
+++ b/xml/templates/message_templates/contribution_offline_receipt_text.tpl
@@ -1,3 +1,5 @@
+{contact.email_greeting},
+
{if $formValues.receipt_text}
{$formValues.receipt_text}
{else}{ts}Thank you for your support.{/ts}{/if}
diff --git a/xml/templates/message_templates/contribution_online_receipt_html.tpl b/xml/templates/message_templates/contribution_online_receipt_html.tpl
index ec976ed0e525..61dc72d657b4 100644
--- a/xml/templates/message_templates/contribution_online_receipt_html.tpl
+++ b/xml/templates/message_templates/contribution_online_receipt_html.tpl
@@ -21,7 +21,7 @@
|
-
+ {contact.email_greeting},
{if $receipt_text}
{$receipt_text|htmlize}
{/if}
diff --git a/xml/templates/message_templates/contribution_online_receipt_subject.tpl b/xml/templates/message_templates/contribution_online_receipt_subject.tpl
index 32d4e402a82c..052dce5bd748 100644
--- a/xml/templates/message_templates/contribution_online_receipt_subject.tpl
+++ b/xml/templates/message_templates/contribution_online_receipt_subject.tpl
@@ -1 +1 @@
-{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title}
+{if $is_pay_later}{ts}Invoice{/ts}{else}{ts}Receipt{/ts}{/if} - {$title} - {contact.display_name}
diff --git a/xml/templates/message_templates/contribution_online_receipt_text.tpl b/xml/templates/message_templates/contribution_online_receipt_text.tpl
index c6328bc46e89..2820950ed170 100644
--- a/xml/templates/message_templates/contribution_online_receipt_text.tpl
+++ b/xml/templates/message_templates/contribution_online_receipt_text.tpl
@@ -1,3 +1,5 @@
+{contact.email_greeting},
+
{if $receipt_text}
{$receipt_text}
{/if}
@@ -206,4 +208,4 @@
{$customName}: {$customValue}
{/if}
{/foreach}
-{/if}
\ No newline at end of file
+{/if}
diff --git a/xml/templates/message_templates/contribution_recurring_billing_html.tpl b/xml/templates/message_templates/contribution_recurring_billing_html.tpl
index f2b9d4884239..c7b962f4857e 100644
--- a/xml/templates/message_templates/contribution_recurring_billing_html.tpl
+++ b/xml/templates/message_templates/contribution_recurring_billing_html.tpl
@@ -21,7 +21,7 @@
|
- {ts 1=$contact.display_name}Dear %1{/ts},
+ {contact.email_greeting},
{ts 1=$amount 2=$recur_frequency_interval 3=$recur_frequency_unit}Billing details for your recurring contribution of %1, every %2 %3 have been updated.{/ts}
|
@@ -62,4 +62,4 @@