From 342936e205e213e6b3e8d6093bed2a5328c8ad7f Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Fri, 22 Mar 2013 09:51:45 -0700 Subject: [PATCH] CRM-12185 --- CRM/Campaign/Form/Survey/Questions.php | 19 ++++++++++++------- CRM/UF/Page/ProfileEditor.php | 1 + 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CRM/Campaign/Form/Survey/Questions.php b/CRM/Campaign/Form/Survey/Questions.php index 6cf45f29fb..c69f74a9e3 100644 --- a/CRM/Campaign/Form/Survey/Questions.php +++ b/CRM/Campaign/Form/Survey/Questions.php @@ -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, click here.', 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, click here.', + 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(); diff --git a/CRM/UF/Page/ProfileEditor.php b/CRM/UF/Page/ProfileEditor.php index 57862b95fe..5dc05d059e 100644 --- a/CRM/UF/Page/ProfileEditor.php +++ b/CRM/UF/Page/ProfileEditor.php @@ -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), -- 2.25.1