From 46a41ec5a4fdad581c1123bfeea35eebc4063d95 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sun, 1 Apr 2018 07:27:27 +1000 Subject: [PATCH] Update documetnation so it makes sense when setting is disabled --- CRM/Admin/Page/Options.php | 1 + templates/CRM/Admin/Page/Options.tpl | 6 +++++- templates/CRM/Contact/Form/Task/Email.hlp | 14 +++++++++++--- templates/CRM/Contact/Form/Task/Email.tpl | 3 ++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CRM/Admin/Page/Options.php b/CRM/Admin/Page/Options.php index 7eb50a7e00..dbfe1b9005 100644 --- a/CRM/Admin/Page/Options.php +++ b/CRM/Admin/Page/Options.php @@ -151,6 +151,7 @@ class CRM_Admin_Page_Options extends CRM_Core_Page_Basic { $this->assign('showCounted', TRUE); } $this->assign('isLocked', self::$_isLocked); + $this->assign('allowLoggedIn', Civi::settings()->get('allow_mail_from_logged_in_contact')); $config = CRM_Core_Config::singleton(); if (self::$_gName == 'activity_type') { $this->assign('showComponent', TRUE); diff --git a/templates/CRM/Admin/Page/Options.tpl b/templates/CRM/Admin/Page/Options.tpl index 00a9185af2..d1e7af21c8 100644 --- a/templates/CRM/Admin/Page/Options.tpl +++ b/templates/CRM/Admin/Page/Options.tpl @@ -59,7 +59,11 @@ {elseif $gName eq 'participant_status'} {ts}Define statuses for event participants here (e.g. Registered, Attended, Cancelled...). You can then assign statuses and search for participants by status.{/ts} {ts}"Counted?" controls whether a person with that status is counted as participant for the purpose of controlling the Maximum Number of Participants.{/ts} {elseif $gName eq 'from_email_address'} - {ts}By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. However, you can use this page to define one or more general Email Addresses that can be selected as an alternative. EXAMPLE: "Client Services" <clientservices@example.org>{/ts} + {if $allowLoggedIn} + {ts}By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. However, you can use this page to define one or more general Email Addresses that can be selected as an alternative. EXAMPLE: "Client Services" <clientservices@example.org>{/ts} + {else} + {ts}You can use this page to define one or more general Email Addresses that can be selected as the From Address. EXAMPLE: "Client Services" <clientservices@example.org>{/ts} + {/if} {elseif $isLocked} {ts}This option group is reserved for system use. You cannot add or delete options in this list.{/ts} {else} diff --git a/templates/CRM/Contact/Form/Task/Email.hlp b/templates/CRM/Contact/Form/Task/Email.hlp index 4931100cd5..37a5ddecfa 100644 --- a/templates/CRM/Contact/Form/Task/Email.hlp +++ b/templates/CRM/Contact/Form/Task/Email.hlp @@ -27,10 +27,18 @@ {ts}From Address{/ts} {/htxt} {htxt id="id-from_email"} -

{ts}By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. However, users with Administer CiviCRM permission can configure one or more general email addresses that can be selected as an alternative. EXAMPLE: "Client Services" <clientservices@example.org>{/ts}

+{if $params.logged_in_email_setting == "1"} +

{ts}By default, CiviCRM uses the primary email address of the logged in user as the FROM address when sending emails to contacts. However, users with Administer CiviCRM permission can configure one or more general email addresses that can be selected as an alternative. EXAMPLE: "Client Services" <clientservices@example.org>{/ts}

+{else} +

{ts}CiviCRM is currently configured to only use the defined From Email addresses. If you wish to be able to use the email address of the logged in user as the From Address you will need to set the setting "Allow mail from loged in contact" setting. Users with Administer CiviCRM can set this setting in the SMTP settings.{/ts}

+ {if $params.isAdmin} + {capture assign="smtpUrl"}{crmURL p="civicrm/admin/setting/smtp" q="reset=1"}{/capture} +

{ts 1=$smtpUrl}Go to Settings - Outbound Mail to enable the usage of the logged in contact's email address as the from email{/ts}

+ {/if} +{/if} {if $params.isAdmin} - {capture assign="fromConfig"}{crmURL p="civicrm/admin/options/from_email_address" q="reset=1"}{/capture} -

{ts 1=$fromConfig}Go to Administer CiviCRM » Communications » FROM Email Addresses to add or edit general email addresses. Make sure these email addresses are valid email accounts with your email service provider.{/ts}

+ {capture assign="fromConfig"}{crmURL p="civicrm/admin/options/from_email_address" q="reset=1"}{/capture} +

{ts 1=$fromConfig}Go to Administer CiviCRM » Communications » FROM Email Addresses to add or edit general email addresses. Make sure these email addresses are valid email accounts with your email service provider.{/ts}

{/if} {/htxt} diff --git a/templates/CRM/Contact/Form/Task/Email.tpl b/templates/CRM/Contact/Form/Task/Email.tpl index 96622dbd87..107d23f7dc 100644 --- a/templates/CRM/Contact/Form/Task/Email.tpl +++ b/templates/CRM/Contact/Form/Task/Email.tpl @@ -30,10 +30,11 @@

{ts count=$suppressedEmails plural='Email will NOT be sent to %count contacts - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased).'}Email will NOT be sent to %count contact - (no email address on file, or communication preferences specify DO NOT EMAIL, or contact is deceased).{/ts}

{/if} +{crmSetting var="logged_in_email_setting" name="allow_mail_from_logged_in_contact"} - + -- 2.25.1
{if $single eq false}{ts}Recipient(s){/ts}{else}{$form.to.label}{/if}