};
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
$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) {
--- /dev/null
+<div ng-controller="EditRecipOptionsDialogCtrl">
+ <div class="crm-block" ng-form="responseForm" crm-ui-id-scope>
+ <div class="crm-group">
+ <!-- FIXME: ts is not working here. -->
+ <div crm-ui-field crm-title="'Dedupe by email'" crm-layout="checkbox">
+ <input
+ type='checkbox'
+ ng-model='model.dedupe_email'
+ ng-true-value="'1'"
+ ng-false-value="'0'"
+ />
+ </div>
+ <div class="crm-section" id="help">
+ <p>{{ts('Multiple people -- such as spouses, parents, or children -- may sometimes share the same email address.')}}</p>
+ <p>{{ts('To send only one message to the shared address, enable this option. Mail-merge tokens will be filled for only one person.')}}</p>
+ <p>{{ts('To send separate messages for each person, disable this option. Mail-merge tokens will be filled separately for each person.')}}</p>
+ </div>
+ </div>
+ </div>
+</div>
<div class='crmMailing-recip-est'>
<a href="" ng-click="previewRecipients()">{{getRecipientsEstimate()}}</a>
</div>
- <div>
- <input
- type='checkbox'
- ng-model='mailing.dedupe_email'
- ng-true-value="'1'"
- ng-false-value="'0'"
- id="recipients-dedupe-email"/>
- <label for="recipients-dedupe-email">
- {{ts('Dedupe')}}
- </label>
- </div>
</div>
<select
crm-mailing-recipients
ng-required="true"
multiple>
</select>
+ <a ng-click="editOptions(mailing)" class="crm-hover-button" title="{{ts('Edit Options')}}">
+ <span class="icon ui-icon-wrench"></span>
+ </a>
</div>