CRM-16600 Include Smart Groups in unsubscribe group select
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 12 Jun 2015 00:00:26 +0000 (00:00 +0000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 12 Jun 2015 00:00:26 +0000 (00:00 +0000)
CRM/Mailing/Form/Group.php
ang/crmMailing/BlockMailing.html

index 7e07873d52e00ca52fc8f8f799fc56f9fe6fd613..f64c236d2a7f4145a294a595db2983311dcbd9e8 100644 (file)
@@ -238,13 +238,14 @@ class CRM_Mailing_Form_Group extends CRM_Contact_Form_Task {
 
     //when the context is search add base group's.
     if ($this->_searchBasedMailing) {
-      //get the static groups
+      //CRM-16600 Include Smart Groups in Unsubscribe list as that matches
+      //all other practices in CiviMail
       $staticGroups = CRM_Core_PseudoConstant::staticGroup(FALSE, 'Mailing');
       $this->add('select', 'baseGroup',
         ts('Unsubscription Group'),
         array(
           '' => ts('- select -'),
-        ) + CRM_Contact_BAO_Group::getGroupsHierarchy($staticGroups, NULL, '&nbsp;&nbsp;', TRUE),
+        ) + $groups,
         TRUE,
         array('class' => 'crm-select2 huge')
       );
index 8e43ecdc4c92b521be4b889957b9341d46bb7a59..d3112f1b01616b82cb712123de6d10e7eb60448c 100644 (file)
@@ -60,7 +60,7 @@ It could perhaps be thinned by 30-60% by making more directives.
           ng-model="mailing.recipients.groups.base[0]"
           ng-required="true"
           >
-          <option ng-repeat="grp in crmMailingConst.groupNames | filter:{visibility:'Public pages'}" value="{{grp.id}}">{{grp.title}}</option>
+          <option ng-repeat="grp in crmMailingConst.groupNames | orderBy:'title'" value="{{grp.id}}">{{grp.title}}</option>
         </select>
       </div>
     </span>