jenkins-bot has submitted this change and it was merged.

Change subject: Update backoffice message template to allow receipt resends.
......................................................................


Update backoffice message template to allow receipt resends.

Bug: T137496
Change-Id: I023e75b855b862e110234dedd6cd47faf2092832
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 80 insertions(+), 0 deletions(-)

Approvals:
  Ejegg: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 07b770f..d0d0dda 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -59,6 +59,7 @@
     wmf_civicrm_update_7220();
     wmf_civicrm_update_7230();
     wmf_civicrm_update_7235();
+    wmf_civicrm_update_7280();
 }
 
 /**
@@ -2308,3 +2309,82 @@
   // Just a single oddity.
   CRM_Core_DAO::executeQuery("UPDATE civicrm_contact SET preferred_language = 
'zh_CN' WHERE preferred_language = '恩_CN'");
 }
+
+/**
+ * Update offline message template to match thank you letter.
+ *
+ * The template is cut down from our standard thank you in the following ways
+ *
+ * 1) I pretty much by-passed translation - I’m thinking this is mostly for a 
small number of English language receipts
+ * to be manually generated. I’d need to do something more complex to get it 
translating well
+ * 2) I ditched the RecurringRestarted & UnrecordedCharge logic. I figured you 
would be sending these on request.
+ * 3)I have assumed we have a first name & not done the fall-back to donor (on 
assumption manual sends know the name).
+ * 4) I did not include "{% if recurring %}<p> This donation is part of a 
recurring subscription.
+ * Monthly payments will be debited by the Wikimedia Foundation until you 
notify us to stop.
+ * If you’d like to cancel the payments please see our
+ * <a 
href="https://wikimediafoundation.org/wiki/Special:LandingCheck?landing_page=Cancel_or_change_recurring_payment..
+ *
+ * In other words this is a pretty-simple English language solution.
+ *
+ * Bug T137496
+ */
+function wmf_civicrm_update_7280() {
+  civicrm_initialize();
+  $msg_html = '<html>
+<p>Dear {contact.first_name},</p>
+
+<p>Thank you for your donation of 
{$formValues.total_amount-$totalTaxAmount|crmMoney:$currency} to the Wikimedia 
Foundation. The Wikimedia Foundation is the non-profit organization that 
supports Wikipedia and other free knowledge projects. Our mission is to build 
the most accessible and comprehensive source of free knowledge in the world.</p>
+
+<p>We believe that knowledge is a fundamental human right. As humanity rushes 
into our digital future, we need open, accessible, public spaces to access 
knowledge online. Wikimedia is such a space. Wikipedia delivers free knowledge 
to people, by people, in hundreds of languages around our planet.</p>
+
+<p>Over the course of a year, Wikipedia is edited and read by people on every 
continent, including Antarctica. Nearly half a billion people visit Wikipedia 
every month for everything from preserving cultural heritage, to improving 
cancer detection, to researching homework. They come to learn. They stay and 
discover.</p>
+
+<p>Everyone is a potential Wikipedian. If you don\\\'t find what you\\\'re 
looking for on Wikipedia, you can <a class=\"external text\" 
href=\"https://en.wikipedia.org/wiki/Special:UserLogin?type=signup&amp;campaign=lila2015\";>start
 creating it yourself</a>. The articles, words, pictures and data are created 
by a diverse community of people who volunteer to share their knowledge with 
the world.</p>
+
+<p>Every day, we ask ourselves how we can increase our impact, and ensure 
Wikipedia and its sister projects are even more accurate, rich, and accessible 
tomorrow than they are today. Your donation will help us get there.</p>
+
+<p>Thank you for keeping us growing and impacting lives another year.</p>
+
+<p>Wikimedia Foundation<br/></p>
+
+<p>Many employers will match employee contributions: please check with your 
company to see if they have a <a class=\"external text\" 
href=\"https://wikimediafoundation.org/wiki/Matching_Gifts/form\";>corporate 
matching gift program</a>.</p>
+
+<p>For your records: Your donation, number CNT-{$contactID}, on 
{$receive_date|truncate:10:\\\'\\\'|crmDate} 
+was {$formValues.total_amount - $totalTaxAmount|crmMoney:$currency}.</p>
+
+
+<p>This letter may serve as a record of your donation. No goods or services 
were provided, in whole or in part, for this contribution. The Wikimedia 
Foundation, Inc. is a non-profit charitable corporation with 501(c)(3) tax 
exempt status in the United States. Our address is 149 New Montgomery, 6th 
Floor, San Francisco, CA, 94105. U.S. tax-exempt number: 20-0049703</p>
+
+</html>';
+
+  $msg_text = 'Dear {contact.first_name},
+
+Thank you for your donation of 
{$formValues.total_amount-$totalTaxAmount|crmMoney:$currency} to the Wikimedia 
Foundation. The Wikimedia Foundation is the non-profit organization that 
supports Wikipedia and other free knowledge projects. Our mission is to build 
the most accessible and comprehensive source of free knowledge in the world.
+
+We believe that knowledge is a fundamental human right. As humanity rushes 
into our digital future, we need open, accessible, public spaces to access 
knowledge online. Wikimedia is such a space. Wikipedia delivers free knowledge 
to people, by people, in hundreds of languages around our planet.
+
+Over the course of a year, Wikipedia is edited and read by people on every 
continent, including Antarctica. Nearly half a billion people visit Wikipedia 
every month for everything from preserving cultural heritage, to improving 
cancer detection, to researching homework. They come to learn. They stay and 
discover.
+
+Everyone is a potential Wikipedian. If you don\\\'t find what you\\\'re 
looking for on Wikipedia, you can start creating it yourself. The articles, 
words, pictures and data are created by a diverse community of people who 
volunteer to share their knowledge with the world.
+
+Every day, we ask ourselves how we can increase our impact, and ensure 
Wikipedia and its sister projects are even more accurate, rich, and accessible 
tomorrow than they are today. Your donation will help us get there.
+
+Thank you for keeping us growing and impacting lives another year.
+
+Wikimedia Foundation
+
+Many employers will match employee contributions: please check with your 
company to see if they have a corporate matching gift program 
(https://wikimediafoundation.org/wiki/Matching_Gifts/form).
+
+For your records: Your donation, number CNT-{$contactID}, on 
{$receive_date|truncate:10:\\\'\\\'|crmDate} was 
{$formValues.total_amount-$totalTaxAmount|crmMoney:$currency}.
+
+
+This letter may serve as a record of your donation. No goods or services were 
provided, in whole or in part, for this contribution. The Wikimedia Foundation, 
Inc. is a non-profit charitable corporation with 501(c)(3) tax exempt status in 
the United States. Our address is 149 New Montgomery, 6th Floor, San Francisco, 
CA, 94105. U.S. tax-exempt number: 20-0049703';
+
+  CRM_Core_DAO::executeQuery("
+  UPDATE civicrm_msg_template
+  SET msg_html = '$msg_html'
+  , msg_text = '$msg_text'
+  WHERE msg_title = 'Contributions - Receipt (off-line)' AND is_default = 1
+
+  ");
+}

-- 
To view, visit https://gerrit.wikimedia.org/r/312952
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I023e75b855b862e110234dedd6cd47faf2092832
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>
Gerrit-Reviewer: Awight <awi...@wikimedia.org>
Gerrit-Reviewer: Cdentinger <cdentin...@wikimedia.org>
Gerrit-Reviewer: Eileen <emcnaugh...@wikimedia.org>
Gerrit-Reviewer: Ejegg <eeggles...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to