From 2b99bb42af1617cb9461d4f07d729f06ac8aa0cc Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Thu, 11 Dec 2014 17:37:00 -0800 Subject: [PATCH] CRM-13984 - Add help regarding use of receipt message, AND cleanup the Thank-you and Receipting form (move inline help strings to help pop-ups). ---------------------------------------- * CRM-13984: https://issues.civicrm.org/jira/browse/CRM-13984 --- .../Form/ContributionPage/ThankYou.php | 14 ++- .../Form/ContributionPage/ThankYou.hlp | 105 ++++++++++++++++++ .../Form/ContributionPage/ThankYou.tpl | 58 ++++------ 3 files changed, 136 insertions(+), 41 deletions(-) create mode 100644 templates/CRM/Contribute/Form/ContributionPage/ThankYou.hlp diff --git a/CRM/Contribute/Form/ContributionPage/ThankYou.php b/CRM/Contribute/Form/ContributionPage/ThankYou.php index f65978fcfd..e8999678f2 100644 --- a/CRM/Contribute/Form/ContributionPage/ThankYou.php +++ b/CRM/Contribute/Form/ContributionPage/ThankYou.php @@ -63,8 +63,18 @@ class CRM_Contribute_Form_ContributionPage_ThankYou extends CRM_Contribute_Form_ // thank you title and text (html allowed in text) $this->add('text', 'thankyou_title', ts('Thank-you Page Title'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_title'), TRUE); - $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_text')); - $this->addWysiwyg('thankyou_footer', ts('Thank-you Page Footer'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_footer')); + + $attributes = CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'thankyou_text'); + $attributes['click_wysiwyg'] = true; + $this->addWysiwyg('thankyou_text', ts('Thank-you Message'), $attributes); + // FIXME: This hack forces height of editor to 175px. Need to modify QF classes for editors to allow passing + // explicit height and width. + $footerAttribs = array( + 'rows' => 2, + 'cols' => 40, + 'click_wysiwyg' => true, + ); + $this->addWysiwyg('thankyou_footer', ts('Thank-you Footer'), $footerAttribs); $this->addElement('checkbox', 'is_email_receipt', ts('Email Receipt to Contributor?'), NULL, array('onclick' => "showReceipt()")); $this->add('text', 'receipt_from_name', ts('Receipt From Name'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionPage', 'receipt_from_name')); diff --git a/templates/CRM/Contribute/Form/ContributionPage/ThankYou.hlp b/templates/CRM/Contribute/Form/ContributionPage/ThankYou.hlp new file mode 100644 index 0000000000..465d40f992 --- /dev/null +++ b/templates/CRM/Contribute/Form/ContributionPage/ThankYou.hlp @@ -0,0 +1,105 @@ +{* + +--------------------------------------------------------------------+ + | CiviCRM version 4.5 | + +--------------------------------------------------------------------+ + | Copyright CiviCRM LLC (c) 2004-2014 | + +--------------------------------------------------------------------+ + | This file is a part of CiviCRM. | + | | + | CiviCRM is free software; you can copy, modify, and distribute it | + | under the terms of the GNU Affero General Public License | + | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | + | | + | CiviCRM is distributed in the hope that it will be useful, but | + | WITHOUT ANY WARRANTY; without even the implied warranty of | + | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | + | See the GNU Affero General Public License for more details. | + | | + | You should have received a copy of the GNU Affero General Public | + | License and the CiviCRM Licensing Exception along | + | with this program; if not, contact CiviCRM LLC | + | at info[AT]civicrm[DOT]org. If you have questions about the | + | GNU Affero General Public License or the licensing of CiviCRM, | + | see the CiviCRM license FAQ at http://civicrm.org/licensing | + +--------------------------------------------------------------------+ +*} + +{htxt id="id_thankyou-title-title"} + {ts}Thank-you Page Title{/ts} +{/htxt} +{htxt id="id_thankyou-title"} +

{ts}This title will be displayed at the top of the thank-you / transaction confirmation page.{/ts}

+{/htxt} + +{htxt id="id_thankyou-text-title"} + {ts}Thank-you Message{/ts} +{/htxt} +{htxt id="id_thankyou-text"} +

{ts}Enter text (and optional HTML layout) for the thank-you block that will appear at the top of the Thank-you page.{/ts}

+{/htxt} + +{htxt id="id_footer-text-title"} + {ts}Thank-you Page Footer{/ts} +{/htxt} +{htxt id="id_footer-text"} +

{ts}Enter link(s) and/or text that you want to appear at the bottom of the thank-you page. You can use this content area to encourage contributors to visit a tell-a-friend + page or take some other action.{/ts}

+

{ts}NOTE: Social media links will be automatically included if you have enabled 'Social media sharing' for this page (see the 'Title' tab).{/ts}

+{/htxt} + +{capture assign=msgUrl}{crmURL p='civicrm/admin/messageTemplates' q="reset=1"}{/capture} +{htxt id="id_is-email-receipt-title"} + {ts}Automatic Receipting{/ts} +{/htxt} +{htxt id="id_is-email-receipt"} +

{ts}Check this box if you want an electronic receipt to be sent automatically to the contributor's email address.{/ts}

+

{ts 1=$msgUrl}The "Contributions - Receipt (on-line)" System Workflow Message Template provides content and formatting for the receipt. + You can modify it from Administer > Communications > Message Templates > System Workflow Messages. You can also provide + specific messaging for contributions received via this contribution page using the "Receipt Message" field below.{/ts}

+{/htxt} + +{htxt id="id_receipt-from-name-title"} + {ts}Name of Receipt Sender{/ts} +{/htxt} +{htxt id="id_receipt-from-name"} +

{ts}Enter the FROM name to be used in receipt emails.{/ts}

+{/htxt} + +{htxt id="id_receipt-from-email-title"} + {ts}Email Address of Receipt Sender{/ts} +{/htxt} +{htxt id="id_receipt-from-email"} +

{ts}Enter the FROM email address to be used in receipt emails.{/ts}

+{/htxt} + +{htxt id="id_receipt-text-title"} + {ts}Additional Receipt Message{/ts} +{/htxt} +{htxt id="id_receipt-text"} +

{ts}Enter a message you want included at the beginning of emailed receipts. This message will be inserted at the top of the "Contributions - Receipt (on-line)" + System Workflow Message.{/ts}

+

{ts}IMPORTANT: Keep in mind that this message will be included in ALL of the following types of receipts related to this online contribution page{/ts}: +

+

+

{ts}NOTE: The text entered here will be used for both TEXT and HTML versions of receipt emails so we do not recommend including HTML tags / formatting here.{/ts}

+{/htxt} + +{htxt id="id_receipt-cc-title"} + {ts}CC Receipts{/ts} +{/htxt} +{htxt id="id_receipt-cc"} +

{ts}If you want member(s) of your organization to receive a carbon copy of each emailed receipt, enter one or more email addresses here. Multiple email +addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts}

+{/htxt} + +{htxt id="id_receipt-bcc-title"} + {ts}BCC Receipts{/ts} +{/htxt} +{htxt id="id_receipt-bcc"} +

{ts}If you want member(s) of your organization to receive a BLIND carbon copy of each emailed receipt, enter one or more email addresses here. Multiple email + addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts}

+{/htxt} diff --git a/templates/CRM/Contribute/Form/ContributionPage/ThankYou.tpl b/templates/CRM/Contribute/Form/ContributionPage/ThankYou.tpl index 15844dfdb7..8ee05572b6 100644 --- a/templates/CRM/Contribute/Form/ContributionPage/ThankYou.tpl +++ b/templates/CRM/Contribute/Form/ContributionPage/ThankYou.tpl @@ -29,68 +29,48 @@

{ts}Use this form to configure the thank-you message and receipting options. Contributors will see a confirmation and thank-you page after whenever an online contribution is successfully processed. You provide the content and layout of the thank-you section below. You also control whether an electronic receipt is automatically emailed to each contributor - and can add a custom message to that receipt.{/ts}

{include file="CRM/common/formButtons.tpl" location="top"}
- +
- - + - - + + - - + + -
{$form.thankyou_title.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='thankyou_title' id=$contributionPageID}{/if}{$form.thankyou_title.html}
- {ts}This title will be displayed at the top of the thank-you / transaction confirmation page.{/ts} +
{$form.thankyou_title.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='thankyou_title' id=$contributionPageID}{/if} {help id="id_thankyou-title"}{$form.thankyou_title.html}
{$form.thankyou_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='thankyou_text' id=$contributionPageID}{/if}{$form.thankyou_text.html}
- {ts}Enter text (and optional HTML layout tags) for the thank-you message that will appear at the top of the confirmation page.{/ts} -
{$form.thankyou_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='thankyou_text' id=$contributionPageID}{/if}
{help id="id_thankyou-text"}
{$form.thankyou_text.html}
{$form.is_email_receipt.html}{$form.is_email_receipt.label}
- {ts}Check this box if you want an electronic receipt to be sent automatically.{/ts} +
{$form.is_email_receipt.html}{$form.is_email_receipt.label} {help id="id_is-email-receipt"}
- +
- - - - + + - - + + - - + + - - + +
{$form.receipt_from_name.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='receipt_from_name' id=$contributionPageID}{/if} + {$form.receipt_from_name.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='receipt_from_name' id=$contributionPageID}{/if} {help id="id_receipt-from-name"} {$form.receipt_from_name.html}
- {ts}Enter the FROM name to be used when receipts are emailed to contributors.{/ts} +
{$form.receipt_from_name.html}
{$form.receipt_from_email.label}{$reqMark} - {$form.receipt_from_email.html}
- {ts}Enter the FROM email address to be used when receipts are emailed to contributors.{/ts} -
{$form.receipt_from_email.label}{$reqMark} {help id="id_receipt-from-email"}{$form.receipt_from_email.html}
{$form.receipt_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='receipt_text' id=$contributionPageID}{/if} - {$form.receipt_text.html}
- {ts}Enter a message you want included at the beginning of emailed receipts. NOTE: This text will be included in both TEXT and HTML versions of receipt emails so we do not recommend including HTML tags / formatting here.{/ts}
-
{$form.receipt_text.label}{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_contribution_page' field='receipt_text' id=$contributionPageID}{/if} {help id="id_receipt-text"}{$form.receipt_text.html}
{$form.cc_receipt.label} - {$form.cc_receipt.html}
- {ts}If you want member(s) of your organization to receive a carbon copy of each emailed receipt, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts} - -
{$form.cc_receipt.label} {help id="id_receipt-cc"}{$form.cc_receipt.html}
{$form.bcc_receipt.label} - {$form.bcc_receipt.html}
- {ts}If you want member(s) of your organization to receive a BLIND carbon copy of each emailed receipt, enter one or more email addresses here. Multiple email addresses should be separated by a comma (e.g. jane@example.org, paula@example.org).{/ts} -
{$form.bcc_receipt.label} {help id="id_receipt-bcc"}{$form.bcc_receipt.html}
{include file="CRM/common/formButtons.tpl" location="bottom"}
-- 2.25.1