Mailing 'visibility' option value cleanup
authorColeman Watts <coleman@civicrm.org>
Fri, 6 Mar 2015 19:12:45 +0000 (14:12 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 6 Mar 2015 19:12:45 +0000 (14:12 -0500)
CRM/Mailing/Info.php
partials/crmMailing/publication.html

index fb3c94c2e1b3ca42bb190a1fcb206a1f16c01953..aa39ba05b9130f5467233a485e54cdf275ea0bde 100644 (file)
@@ -143,10 +143,7 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
             'id' => 'user_contact_id',
             'return' => 'email',
           )),
-        'visibility' => array(
-          array('value' => 'Public Pages', 'label' => ts('Public Pages')),
-          array('value' => 'User and User Admin Only', 'label' => ts('User and User Admin Only')),
-        ),
+        'visibility' => CRM_Utils_Array::makeNonAssociative(CRM_Core_SelectValues::groupVisibility()),
         'workflowEnabled' => CRM_Mailing_Info::workflowEnabled(),
       ),
     ));
index 7f647c5c36f591ff65d7e8a38fc5d90dfc14af36..e51f7b1204645a0d7fc66eeb40cd1616516ced15 100644 (file)
@@ -7,7 +7,7 @@
         ui-jq="select2"
         ui-options="{dropdownAutoWidth : true}"
         ng-model="mailing.visibility"
-        ng-options="v.value as v.label for v in crmMailingConst.visibility"
+        ng-options="v.key as v.value for v in crmMailingConst.visibility"
         required
         >
       </select>