From f73b40570b465808d8226a87fda2e84be491ade4 Mon Sep 17 00:00:00 2001 From: larssandergreen Date: Wed, 14 Jun 2023 22:15:09 -0600 Subject: [PATCH] Cleanup Invoice Email form --- CRM/Contribute/Form/Task/Invoice.php | 7 +++---- templates/CRM/Contribute/Form/Task/Invoice.hlp | 4 ++++ templates/CRM/Contribute/Form/Task/Invoice.tpl | 5 +++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CRM/Contribute/Form/Task/Invoice.php b/CRM/Contribute/Form/Task/Invoice.php index c67b0a10ff..c43a24be99 100644 --- a/CRM/Contribute/Form/Task/Invoice.php +++ b/CRM/Contribute/Form/Task/Invoice.php @@ -138,7 +138,7 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $this->preventAjaxSubmit(); $this->assign('isAdmin', CRM_Core_Permission::check('administer CiviCRM')); - $this->add('select', 'from_email_address', ts('From'), $this->_fromEmails, TRUE); + $this->add('select', 'from_email_address', ts('From'), $this->_fromEmails, TRUE, ['class' => 'crm-select2 huge']); if ($this->_selectedOutput != 'email') { $this->addElement('radio', 'output', NULL, ts('Email Invoice'), 'email_invoice'); $this->addElement('radio', 'output', NULL, ts('PDF Invoice'), 'pdf_invoice'); @@ -149,13 +149,12 @@ class CRM_Contribute_Form_Task_Invoice extends CRM_Contribute_Form_Task { $this->addRule('from_email_address', ts('From Email Address is required'), 'required'); } - $attributes = ['class' => 'huge']; $this->addEntityRef('cc_id', ts('CC'), [ 'entity' => 'Email', 'multiple' => TRUE, ]); - $this->add('text', 'subject', ts('Subject'), $attributes + ['placeholder' => ts('Optional')]); - $this->add('wysiwyg', 'email_comment', ts('If you would like to add personal message to email please add it here. (If sending to more then one receipient the same message will be sent to each contact.)'), [ + $this->add('text', 'subject', ts('Replace Subject'), ['class' => 'huge', 'placeholder' => ts('Optional')]); + $this->add('wysiwyg', 'email_comment', ts('Additional Message'), [ 'rows' => 2, 'cols' => 40, ]); diff --git a/templates/CRM/Contribute/Form/Task/Invoice.hlp b/templates/CRM/Contribute/Form/Task/Invoice.hlp index fd235fe855..9f91f656bd 100644 --- a/templates/CRM/Contribute/Form/Task/Invoice.hlp +++ b/templates/CRM/Contribute/Form/Task/Invoice.hlp @@ -32,3 +32,7 @@

{ts}You can send your email as a simple text-only message, as an HTML formatted message, or both. Text-only messages are sufficient for most email communication, and some recipients may prefer not to receive HTML formatted messages.{/ts}

{ts}HTML messages have more visual impact, allow you to include images, and may be more readable if you are including links to website pages. However, different email programs may interpret HTML formats differently, so use this option cautiously unless you have a template format that has been tested with different web and desktop email programs.{/ts}

{/htxt} + +{htxt id="id-email_comment"} +{ts}You can add a message that will appear at the top of the invoice email. This message will be the same for all recipients.{/ts} +{/htxt} diff --git a/templates/CRM/Contribute/Form/Task/Invoice.tpl b/templates/CRM/Contribute/Form/Task/Invoice.tpl index 208d0a8223..ad8a6d90ef 100644 --- a/templates/CRM/Contribute/Form/Task/Invoice.tpl +++ b/templates/CRM/Contribute/Form/Task/Invoice.tpl @@ -16,7 +16,7 @@ {ts}You may choose to email invoice to contributors OR download a PDF file containing one invoice per page to your local computer by clicking Process Invoice(s) . Your browser may display the file for you automatically, or you may need to open it for printing using any PDF reader (such as Adobe® Reader).{/ts} {/if} - +
{if $selectedOutput ne 'email'} @@ -41,7 +41,7 @@ - + {if $selectedOutput ne 'email'} @@ -55,6 +55,7 @@
{$form.pdf_format_id.html}
+
-- 2.25.1