From: Pradeep Nayak Date: Thu, 10 Mar 2016 13:45:47 +0000 (+0530) Subject: CRM-18204, used contact type and contact sub type for checking uf group type X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c84e7ae36128b05dbd6f9e67d1d5d1c12a424345;p=civicrm-core.git 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 --- diff --git a/CRM/UF/Page/Field.php b/CRM/UF/Page/Field.php index c2cec5186e..ef76bec53e 100644 --- a/CRM/UF/Page/Field.php +++ b/CRM/UF/Page/Field.php @@ -126,7 +126,9 @@ class CRM_UF_Page_Field extends CRM_Core_Page { $this->assign('isGroupReserved', $isGroupReserved); $profileType = CRM_Core_BAO_UFField::getProfileType($this->_gid); - if ($profileType == 'Contribution' || $profileType == 'Membership' || $profileType == 'Activity' || $profileType == 'Participant') { + $contactTypes = CRM_Contact_BAO_ContactType::contactTypes(); + $contactTypes[] = 'Contact'; + if (!in_array($profileType, $contactTypes)) { $this->assign('skipCreate', TRUE); }