From 4d4daa2dc4c0a5b16ff6572a111af722e0e4909b Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 10 Mar 2016 19:18:52 +0530 Subject: [PATCH] CRM-18204, used contact type and contact sub type for checking uf group type ---------------------------------------- * CRM-18204: Enables use of Mixed Profile for create mode https://issues.civicrm.org/jira/browse/CRM-18204 --- CRM/UF/Page/Group.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 273dfab8fa..932580fb49 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -351,8 +351,10 @@ class CRM_UF_Page_Group extends CRM_Core_Page { $groupTypes = self::extractGroupTypes($value['group_type']); // drop Create, Edit and View mode links if profile group_type is one of the following: - $groupComponents = array('Contribution', 'Membership', 'Activity', 'Participant', 'Case'); - $componentFound = array_intersect($groupComponents, array_keys($groupTypes)); + // Contribution, Membership, Activity, Participant, Case, Grant + $contactTypes = CRM_Contact_BAO_ContactType::contactTypes(); + $contactTypes[] = 'Contact'; + $componentFound = array_diff(array_keys($groupTypes), $contactTypes); if (!empty($componentFound)) { $action -= CRM_Core_Action::ADD; } -- 2.25.1