From b8b2e316611d3cb2c580ce4f5d59300e8c27f372 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 13 Feb 2015 10:46:10 -0800 Subject: [PATCH] CRM-15857 - Move "Dedupe by email" into a dialog --- js/angular-crmMailing.js | 16 +++++++++++++++ .../crmMailing/dialog/recipientOptions.html | 20 +++++++++++++++++++ partials/crmMailing/recipients.html | 14 +++---------- 3 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 partials/crmMailing/dialog/recipientOptions.html diff --git a/js/angular-crmMailing.js b/js/angular-crmMailing.js index 68c351dd68..5623e42fa9 100644 --- a/js/angular-crmMailing.js +++ b/js/angular-crmMailing.js @@ -259,6 +259,16 @@ }; dialogService.open('recipDialog', '~/crmMailing/dialog/recipients.html', model, options); }; + + // Open a dialog for editing the advanced recipient options. + $scope.editOptions = function editOptions(mailing) { + var options = { + autoOpen: false, + modal: true, + title: ts('Edit Options') + }; + dialogService.open('previewComponentDialog', '~/crmMailing/dialog/recipientOptions.html', mailing, options); + }; }); // Controller for the "Preview Recipients" dialog @@ -277,6 +287,12 @@ $scope.ts = CRM.ts(null); }); + // Controller for the "Recipients: Edit Options" dialog + // Note: Expects $scope.model to be a mailing object. + angular.module('crmMailing').controller('EditRecipOptionsDialogCtrl', function EditRecipOptionsDialogCtrl($scope) { + $scope.ts = CRM.ts(null); + }); + // Controller for the "Preview Mailing Component" segment // which displays header/footer/auto-responder angular.module('crmMailing').controller('PreviewComponentCtrl', function PreviewComponentCtrl($scope, dialogService) { diff --git a/partials/crmMailing/dialog/recipientOptions.html b/partials/crmMailing/dialog/recipientOptions.html new file mode 100644 index 0000000000..ad898f3c2e --- /dev/null +++ b/partials/crmMailing/dialog/recipientOptions.html @@ -0,0 +1,20 @@ +
+
+
+ +
+ +
+
+

{{ts('Multiple people -- such as spouses, parents, or children -- may sometimes share the same email address.')}}

+

{{ts('To send only one message to the shared address, enable this option. Mail-merge tokens will be filled for only one person.')}}

+

{{ts('To send separate messages for each person, disable this option. Mail-merge tokens will be filled separately for each person.')}}

+
+
+
+
diff --git a/partials/crmMailing/recipients.html b/partials/crmMailing/recipients.html index 90d1918540..9d14bc25c0 100644 --- a/partials/crmMailing/recipients.html +++ b/partials/crmMailing/recipients.html @@ -3,17 +3,6 @@
{{getRecipientsEstimate()}}
-
- - -
+ + + -- 2.25.1