From 7eec7312986b282ca5532567d7bb139a188d54ad 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 Conflicts: CRM/UF/Page/Group.php --- CRM/UF/Page/Group.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/UF/Page/Group.php b/CRM/UF/Page/Group.php index 4d0fdf7179..914622fc2c 100644 --- a/CRM/UF/Page/Group.php +++ b/CRM/UF/Page/Group.php @@ -342,10 +342,12 @@ class CRM_UF_Page_Group extends CRM_Core_Page { } $groupTypes = self::extractGroupTypes($value['group_type']); - $groupComponents = array('Contribution', 'Membership', 'Activity', 'Participant', 'Case'); - // drop Create, Edit and View mode links if profile group_type is Contribution, Membership, Activities or Participant - $componentFound = array_intersect($groupComponents, array_keys($groupTypes)); + // drop Create, Edit and View mode links if profile group_type is one of the following: + // 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