From: Tim Otten Date: Thu, 12 Feb 2015 21:47:12 +0000 (-0800) Subject: CRM-15856 - crmMailing - "Reply-To" and "Track Replies" are mutually exclusive X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=87391d86a3a71092d3ee56acd11766be9b92be10;p=civicrm-core.git CRM-15856 - crmMailing - "Reply-To" and "Track Replies" are mutually exclusive --- diff --git a/js/angular-crmMailing.js b/js/angular-crmMailing.js index 3077d4d11b..86ff87168e 100644 --- a/js/angular-crmMailing.js +++ b/js/angular-crmMailing.js @@ -428,8 +428,31 @@ setTimeout(scopeApply(init), 0); }); - angular.module('crmMailing').controller('EmailAddrCtrl', function EmailAddrCtrl($scope, crmFromAddresses) { + angular.module('crmMailing').controller('EmailAddrCtrl', function EmailAddrCtrl($scope, crmFromAddresses, crmUiAlert) { + var ts = CRM.ts(null); + function changeAlert(winnerField, loserField) { + crmUiAlert({ + title: ts('Conflict'), + text: ts('The "%1" option conflicts with the "%2" option. The "%2" option has been disabled.', { + 1: winnerField, + 2: loserField + }) + }); + } + $scope.crmFromAddresses = crmFromAddresses; + $scope.checkReplyToChange = function checkReplyToChange(mailing) { + if (!_.isEmpty(mailing.replyto_email) && mailing.override_verp == '0') { + mailing.override_verp = '1'; + changeAlert(ts('Reply-To'), ts('Track Replies')) + } + }; + $scope.checkVerpChange = function checkVerpChange(mailing) { + if (!_.isEmpty(mailing.replyto_email) && mailing.override_verp == '0') { + mailing.replyto_email = ''; + changeAlert(ts('Track Replies'), ts('Reply-To')); + } + }; }); var lastEmailTokenAlert = null; diff --git a/partials/crmMailing/mailing.html b/partials/crmMailing/mailing.html index de2068fdda..84b855b69f 100644 --- a/partials/crmMailing/mailing.html +++ b/partials/crmMailing/mailing.html @@ -25,13 +25,12 @@ It could perhaps be thinned by 30-60% by making more directives.
@@ -39,13 +38,13 @@ It could perhaps be thinned by 30-60% by making more directives.
diff --git a/partials/crmMailing/responses.html b/partials/crmMailing/responses.html index 5bebd50724..43d8f7ddf6 100644 --- a/partials/crmMailing/responses.html +++ b/partials/crmMailing/responses.html @@ -6,7 +6,16 @@ Required vars: mailing, crmMailingConst
- + + +
{{ts('Recipients\' replies are sent to a CiviMail specific address instead of the sender\'s address so they can be stored within CiviCRM.')}}