' separator cannot otherwise work
* Calculate the number of times it appears IN the cell & the number of times it appears - should be the same!
*
- * @param $token
- * @param $entity
- * @param $textToSearch
+ * @param string $token
+ * @param string $entity
+ * @param string $textToSearch
*
* @return bool
*/
public static function isHtmlTokenInTableCell($token, $entity, $textToSearch) {
- $tokenToMatch = $entity . '.' . $token;
- $dontCare = array();
- $within = preg_match_all("|
).)*\{' . $tokenToMatch . '\}.*?|si';
+ $within = preg_match_all($pattern, $textToSearch);
+ $total = preg_match_all("|{" . $tokenToMatch . "}|", $textToSearch);
return ($within == $total);
}
diff --git a/CRM/Core/BAO/CustomOption.php b/CRM/Core/BAO/CustomOption.php
index 6b7f0f8d7564..6cee5cf2eb2c 100644
--- a/CRM/Core/BAO/CustomOption.php
+++ b/CRM/Core/BAO/CustomOption.php
@@ -159,7 +159,7 @@ static public function getOptionListSelector(&$params) {
$options[$dao->id]['is_default'] = '';
}
}
-
+ $options[$dao->id]['description'] = $dao->description;
$options[$dao->id]['class'] = $dao->id . ',' . $class;
$options[$dao->id]['is_active'] = empty($dao->is_active) ? ts('No') : ts('Yes');
$options[$dao->id]['links'] = CRM_Core_Action::formLink($links,
diff --git a/CRM/Core/OptionGroup.php b/CRM/Core/OptionGroup.php
index a6fdb677f807..c9a95591b820 100644
--- a/CRM/Core/OptionGroup.php
+++ b/CRM/Core/OptionGroup.php
@@ -342,7 +342,7 @@ public static function lookupValues(&$params, $names, $flip = FALSE) {
* @return null
*/
public static function getLabel($groupName, $value, $onlyActiveValue = TRUE) {
- Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getLabel', array('civi.tag' => 'deprecated'));
+ Civi::log()->warning('Deprecated function CRM_Core_OptionGroup::getLabel, use CRM_Core_PseudoConstant::getLabel', array('civi.tag' => 'deprecated'));
if (empty($groupName) ||
empty($value)
) {
@@ -396,7 +396,7 @@ public static function getValue(
return NULL;
}
- Civi::log()->warning('Deprecated function, use CRM_Core_PseudoConstant::getKey', array('civi.tag' => 'deprecated'));
+ Civi::log()->warning('Deprecated function CRM_Core_OptionGroup::getValue, use CRM_Core_PseudoConstant::getKey', array('civi.tag' => 'deprecated'));
$query = "
SELECT v.label as label ,v.{$valueField} as value
diff --git a/CRM/Custom/Form/Option.php b/CRM/Custom/Form/Option.php
index 7426b98b3130..7d81cb606938 100644
--- a/CRM/Custom/Form/Option.php
+++ b/CRM/Custom/Form/Option.php
@@ -181,6 +181,7 @@ public function buildQuickForm() {
$this->add('text', 'value', ts('Option Value'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'value'), TRUE);
+ $this->add('textarea', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'description'));
// weight
$this->add('text', 'weight', ts('Order'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_OptionValue', 'weight'), TRUE);
$this->addRule('weight', ts('is a numeric field'), 'numeric');
@@ -406,6 +407,7 @@ public function postProcess() {
$customOption->label = $params['label'];
$customOption->name = CRM_Utils_String::titleToVar($params['label']);
$customOption->weight = $params['weight'];
+ $customOption->description = $params['description'];
$customOption->value = $params['value'];
$customOption->is_active = CRM_Utils_Array::value('is_active', $params, FALSE);
diff --git a/CRM/Custom/Page/AJAX.php b/CRM/Custom/Page/AJAX.php
index fba5e2b10821..653971cde599 100644
--- a/CRM/Custom/Page/AJAX.php
+++ b/CRM/Custom/Page/AJAX.php
@@ -57,6 +57,7 @@ public static function getOptionList() {
$selectorElements = array(
'label',
'value',
+ 'description',
'is_default',
'is_active',
'links',
diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index de3f13bcccea..3ecdfc01d80c 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -703,12 +703,20 @@ private function createLogTableFor($table) {
// - prepend the name with log_
// - drop AUTO_INCREMENT columns
// - drop non-column rows of the query (keys, constraints, etc.)
- // - set the ENGINE to the specified engine (default is archive)
+ // - set the ENGINE to the specified engine (default is archive or if archive is disabled or nor installed INNODB)
// - add log-specific columns (at the end of the table)
+ $mysqlEngines = [];
+ $engines = CRM_Core_DAO::executeQuery("SHOW ENGINES");
+ while ($engines->fetch()) {
+ if ($engines->Support == 'YES' || $engines->Support == 'DEFAULT') {
+ $mysqlEngines[] = $engines->Engine;
+ }
+ }
+ $logEngine = in_array('ARCHIVE', $mysqlEngines) ? 'ARCHIVE' : 'INNODB';
$query = preg_replace("/^CREATE TABLE `$table`/i", "CREATE TABLE `{$this->db}`.log_$table", $query);
$query = preg_replace("/ AUTO_INCREMENT/i", '', $query);
$query = preg_replace("/^ [^`].*$/m", '', $query);
- $engine = strtoupper(CRM_Utils_Array::value('engine', $this->logTableSpec[$table], 'ARCHIVE'));
+ $engine = strtoupper(CRM_Utils_Array::value('engine', $this->logTableSpec[$table], $logEngine));
$engine .= " " . CRM_Utils_Array::value('engine_config', $this->logTableSpec[$table]);
$query = preg_replace("/^\) ENGINE=[^ ]+ /im", ') ENGINE=' . $engine . ' ', $query);
diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php
index e87e0310679a..84b1ce6b3e02 100644
--- a/CRM/Report/Form/Contribute/Detail.php
+++ b/CRM/Report/Form/Contribute/Detail.php
@@ -73,7 +73,7 @@ public function __construct() {
'fields_defaults' => array('sort_name'),
'fields_excluded' => array('id'),
'fields_required' => array('id'),
- 'filters_defaults' => array('is_deleted' => FALSE),
+ 'filters_defaults' => array('is_deleted' => 0),
'no_field_disambiguation' => TRUE,
)), array(
'civicrm_email' => array(
diff --git a/CRM/Report/Form/Member/Detail.php b/CRM/Report/Form/Member/Detail.php
index 344af45dda37..d882af61ca30 100644
--- a/CRM/Report/Form/Member/Detail.php
+++ b/CRM/Report/Form/Member/Detail.php
@@ -81,6 +81,11 @@ public function __construct() {
'title' => ts('Contact Name'),
'operator' => 'like',
),
+ 'is_deleted' => array(
+ 'title' => ts('Is Deleted'),
+ 'default' => 0,
+ 'type' => CRM_Utils_Type::T_BOOLEAN,
+ ),
'id' => array('no_display' => TRUE),
),
'order_bys' => array(
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 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}
+
{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}
+
{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}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}
+
+
{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}
+
{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 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 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}
{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}
+
+ {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}
+
+
+
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/php/FiveOne.php b/CRM/Upgrade/Incremental/php/FiveOne.php
new file mode 100644
index 000000000000..cb3d6f92d8a2
--- /dev/null
+++ b/CRM/Upgrade/Incremental/php/FiveOne.php
@@ -0,0 +1,87 @@
+' . ts('A new permission has been added called %1 This Permission is now used to control access to the Manage Tags screen', array(1 => 'manage tags')) . '
';
+ // }
+ }
+
+ /**
+ * Compute any messages which should be displayed after upgrade.
+ *
+ * @param string $postUpgradeMessage
+ * alterable.
+ * @param string $rev
+ * an intermediate version; note that setPostUpgradeMessage is called repeatedly with different $revs.
+ */
+ public function setPostUpgradeMessage(&$postUpgradeMessage, $rev) {
+ // Example: Generate a post-upgrade message.
+ // if ($rev == '5.12.34') {
+ // $postUpgradeMessage .= '
' . ts("By default, CiviCRM now disables the ability to import directly from SQL. To use this feature, you must explicitly grant permission 'import SQL datasource'.");
+ // }
+ }
+
+ /*
+ * Important! All upgrade functions MUST add a 'runSql' task.
+ * Uncomment and use the following template for a new upgrade version
+ * (change the x in the function name):
+ */
+
+ // /**
+ // * Upgrade function.
+ // *
+ // * @param string $rev
+ // */
+ // public function upgrade_5_0_x($rev) {
+ // $this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
+ // $this->addTask('Do the foo change', 'taskFoo', ...);
+ // // Additional tasks here...
+ // // Note: do not use ts() in the addTask description because it adds unnecessary strings to transifex.
+ // // The above is an exception because 'Upgrade DB to %1: SQL' is generic & reusable.
+ // }
+
+ // public static function taskFoo(CRM_Queue_TaskContext $ctx, ...) {
+ // return TRUE;
+ // }
+
+}
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/CRM/Upgrade/Incremental/sql/5.1.alpha1.mysql.tpl b/CRM/Upgrade/Incremental/sql/5.1.alpha1.mysql.tpl
new file mode 100644
index 000000000000..38caa89e4018
--- /dev/null
+++ b/CRM/Upgrade/Incremental/sql/5.1.alpha1.mysql.tpl
@@ -0,0 +1 @@
+{* file to handle db changes in 5.1.alpha1 during upgrade *}
diff --git a/js/Common.js b/js/Common.js
index 15f3528b2d6e..43cc526b7213 100644
--- a/js/Common.js
+++ b/js/Common.js
@@ -1260,7 +1260,8 @@ if (!CRM.vars) CRM.vars = {};
if (title.length) {
text = title + "\n" + text;
}
- alert(text);
+ // strip html tags as they are not parsed in standard alerts
+ alert($("").html(text).text());
return null;
}
};
diff --git a/sql/civicrm_generated.mysql b/sql/civicrm_generated.mysql
index f6218ab6d998..fc29d0a4b19c 100644
--- a/sql/civicrm_generated.mysql
+++ b/sql/civicrm_generated.mysql
@@ -398,7 +398,7 @@ UNLOCK TABLES;
LOCK TABLES `civicrm_domain` WRITE;
/*!40000 ALTER TABLE `civicrm_domain` DISABLE KEYS */;
-INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.0.beta1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
+INSERT INTO `civicrm_domain` (`id`, `name`, `description`, `config_backend`, `version`, `contact_id`, `locales`, `locale_custom_strings`) VALUES (1,'Default Domain Name',NULL,NULL,'5.1.alpha1',1,NULL,'a:1:{s:5:\"en_US\";a:0:{}}');
/*!40000 ALTER TABLE `civicrm_domain` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/templates/CRM/Activity/Selector/Selector.tpl b/templates/CRM/Activity/Selector/Selector.tpl
index a9a7c883994b..6cc3b32be39e 100644
--- a/templates/CRM/Activity/Selector/Selector.tpl
+++ b/templates/CRM/Activity/Selector/Selector.tpl
@@ -37,9 +37,9 @@
{ts}This is the first step in creating a new online Contribution Page. You can create one or more different Contribution Pages for different purposes, audiences, campaigns, etc. Each page can have it's own introductory message, pre-configured contribution amounts, custom data collection fields, etc.{/ts}
@@ -34,6 +33,8 @@
{ts}Use this form to edit the page title, financial type (e.g. donation, campaign contribution, etc.), goal amount, introduction, and status (active/inactive) for this online contribution page.{/ts}
{/if}
{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}