CRM-12185
authorDonald A. Lobo <lobo@civicrm.org>
Fri, 22 Mar 2013 16:51:45 +0000 (09:51 -0700)
committerDonald A. Lobo <lobo@civicrm.org>
Fri, 22 Mar 2013 16:51:45 +0000 (09:51 -0700)
CRM/Campaign/Form/Survey/Questions.php
CRM/UF/Page/ProfileEditor.php

index 6cf45f29fb2ba4c230356d769f61b9f3aa86564f..c69f74a9e31d4a3e3cc5f90bb6e638a2c30eaff6 100644 (file)
@@ -57,8 +57,8 @@ class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey {
       'entity_id' => $this->_surveyId,
     );
 
-    list($defaults['contact_profile_id'],
-         $second) = CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
+    list($defaults['contact_profile_id'], $second) =
+      CRM_Core_BAO_UFJoin::getUFGroupIds($ufJoinParams);
     $defaults['activity_profile_id'] = $second ? array_shift($second) : '';
 
     return $defaults;
@@ -77,11 +77,16 @@ class CRM_Campaign_Form_Survey_Questions extends CRM_Campaign_Form_Survey {
     if (!CRM_Core_BAO_CustomGroup::autoCreateByActivityType($subTypeId)) {
       $activityTypes = CRM_Core_PseudoConstant::activityType(TRUE, TRUE, FALSE, 'label', TRUE, FALSE); // everything
       // FIXME: Displays weird "/\ Array" message; doesn't work with tabs
-      CRM_Core_Session::setStatus(ts('There are no custom data sets for activity type "%1". To create one, <a href="%2" target="%3">click here</a>.', array(
-        1 => $activityTypes[$subTypeId],
-        2 => CRM_Utils_System::url('civicrm/admin/custom/group', 'action=add&reset=1'),
-        3 => '_blank',
-      )));
+      CRM_Core_Session::setStatus(
+        ts(
+          'There are no custom data sets for activity type "%1". To create one, <a href="%2" target="%3">click here</a>.',
+          array(
+            1 => $activityTypes[$subTypeId],
+            2 => CRM_Utils_System::url('civicrm/admin/custom/group', 'action=add&reset=1'),
+            3 => '_blank',
+          )
+        )
+      );
     }
 
     $allowCoreTypes = CRM_Campaign_BAO_Survey::surveyProfileTypes();
index 57862b95fe367797548938c8f756458f4d0f73f0..5dc05d059e9fdbc1d4c2bab8969772516bc445f3 100644 (file)
@@ -28,6 +28,7 @@ class CRM_UF_Page_ProfileEditor extends CRM_Core_Page {
           'initialProfileList' => civicrm_api('UFGroup', 'get', array(
             'version' => 3,
             'sequential' => 1,
+            'is_active' => 1,
             'rowCount' => 1000, // FIXME
           )),
           'profilePreviewKey' => CRM_Core_Key::get('CRM_UF_Form_Inline_Preview', TRUE),