ang/crmMailing/Templates.js - Dropdown shouldn't show system workflow templates
[civicrm-core.git] / ang / crmMailing / services.js
index 45c206373230e3a0002834b5ec657f8b7a4d0ed2..fc5ab146c72017aa866f556056eac46d63be5e11 100644 (file)
       },
       // Call MailingGroup.get and merge results into "mailing"
       _loadGroups: function (mailing) {
-        return crmApi('MailingGroup', 'get', {mailing_id: mailing.id})
+        return crmApi('MailingGroup', 'get', {mailing_id: mailing.id, 'options': {'limit':0}})
           .then(function (groupResult) {
             mailing.recipients = {};
             mailing.recipients.groups = {include: [], exclude: [], base: []};
             .then(function (deliveryInfos) {
               var count = Object.keys(deliveryInfos).length;
               if (count === 0) {
-                CRM.alert(ts('Could not identify any recipients. Perhaps the group is empty?'));
+                CRM.alert(ts('Could not identify any recipients. Perhaps your test group is empty, or you tried sending to contacts that do not exist and you have no permission to add contacts.'));
               }
             })
           ;