CRM-15578 - crmMailing2 - Respect $config->replyTo option
authorTim Otten <totten@civicrm.org>
Thu, 11 Dec 2014 02:26:56 +0000 (18:26 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 11 Dec 2014 02:26:56 +0000 (18:26 -0800)
CRM/Mailing/Info.php
partials/crmMailing2/mailing.html

index 9316ebf49aa94e9f7c79bd7cbf7feb6b56a9c927..758c092bdbf576c7be08278e5b7dc38a4ccf4776 100644 (file)
@@ -82,6 +82,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
       'css' => array('css/angular-crmMailingAB.css'),
     );
 
+    $config = CRM_Core_Config::singleton();
     $session = CRM_Core_Session::singleton();
     $contactID = $session->get('userID');
     $civiMails = civicrm_api3('Mailing', 'get', array());
@@ -132,6 +133,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
         'mailGrp' => array_values($mailGrp['values']),
         'mailTokens' => array_values($mailTokens),
         'contactid' => $contactID,
+        'enableReplyTo' => $config->replyTo,
         'fromAddress' => array_values($fromAddress['values'][0]['api.OptionValue.get']['values']),
         'defaultTestEmail' => civicrm_api3('Contact', 'getvalue', array('id' => 'user_contact_id', 'return' => 'email')),
         'visibility' => array(
index 3d7a50a482fb4f1c867aeab8f26de9fa76cbf890..7ab238ac10119b5e3f0a628cffb486390a708343 100644 (file)
@@ -21,7 +21,7 @@ Required vars: mailing, crmMailingConst
         <option value=""></option>
       </select>
     </div>
-    <div crm-ui-field="replyTo" crm-title="ts('Reply-To')">
+    <div crm-ui-field="replyTo" crm-title="ts('Reply-To')" ng-show="crmMailingConst.enableReplyTo">
       <select
         name="replyTo"
         ui-jq="select2"