CRM-21100 - Remove dependency on pre-loaded group data from CiviMail
authorColeman Watts <coleman@civicrm.org>
Tue, 10 Apr 2018 12:13:28 +0000 (08:13 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 11 Apr 2018 18:27:55 +0000 (14:27 -0400)
CRM/Mailing/Info.php
ang/crmMailing/BlockMailing.html

index c15d89630635badae9e9d0010f4d3b7e31018576..343e6e4510d33cb30453acabbf2c2fd5920e413b 100644 (file)
@@ -138,7 +138,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
           'civiMails' => array(),
           'campaignEnabled' => in_array('CiviCampaign', $config->enableComponents),
           'groupNames' => array(),
-          // @todo see if we can remove this by dynamically generating the test group list
+          // @todo this is not used in core. Remove once Mosaico no longer depends on it.
           'testGroupNames' => $groupNames['values'],
           'headerfooterList' => $headerfooterList['values'],
           'mesTemplate' => $mesTemplate['values'],
index 6950000ac246eb2173f75fcf3c002114fdb080c0..8e09974322ce46b3edd8587e415e2db98cd026f9 100644 (file)
@@ -41,15 +41,13 @@ It could perhaps be thinned by 30-60% by making more directives.
     </div>
     <span ng-controller="EditUnsubGroupCtrl">
       <div crm-ui-field="{name: 'subform.baseGroup', title: ts('Unsubscribe Group')}" ng-if="isUnsubGroupRequired(mailing)">
-        <select
+        <input
+          crm-entityref="{entity: 'Group', api: {params: {is_hidden: 0, is_active: 1}}, select: {allowClear:true, minimumInputLength: 0}}"
           crm-ui-id="subform.baseGroup"
-          crm-ui-select
           name="baseGroup"
           ng-model="mailing.recipients.groups.base[0]"
           ng-required="true"
-          >
-          <option ng-repeat="grp in crmMailingConst.testGroupNames | filter:{is_hidden:0} | orderBy:'title'" value="{{grp.id}}">{{grp.title}}</option>
-        </select>
+        />
       </div>
     </span>
     <div crm-ui-field="{name: 'subform.subject', title: ts('Subject')}">