// - [output] recipients: array of recipient records
angular.module('crmMailing').controller('EditRecipCtrl', function EditRecipCtrl($scope, dialogService, crmApi, crmMailingMgr, $q, crmMetadata) {
var ts = $scope.ts = CRM.ts(null);
+
+ $scope.isMailingList = function isMailingList(group) {
+ var GROUP_TYPE_MAILING_LIST = '2';
+ return _.contains(group.group_type, GROUP_TYPE_MAILING_LIST);
+ };
+
$scope.recipients = null;
$scope.getRecipientsEstimate = function () {
var ts = $scope.ts;
crm-mailing-recipients
ng-model="mailing.recipients"
crm-mandatory-groups="crmMailingConst.groupNames | filter:{is_hidden:1}"
- crm-avail-groups="crmMailingConst.groupNames | filter:{visibility:'Public pages'}"
+ crm-avail-groups="crmMailingConst.groupNames | filter:isMailingList"
crm-avail-mailings="crmMailingConst.civiMails | filter:{is_completed:1}"
crm-ui-id="{{crmMailingBlockRecipients.id}}"
name="{{crmMailingBlockRecipients.name}}"