CRM-21321 - Membership fields not loading in 'On behalf of' profile
authoryashodha <yashodha@cividesk.com>
Tue, 17 Oct 2017 13:25:35 +0000 (18:55 +0530)
committeryashodha <yashodha@cividesk.com>
Tue, 17 Oct 2017 13:25:35 +0000 (18:55 +0530)
CRM/Contribute/Form/ContributionBase.php

index fd2b20e11b57410274953c10df079368a30143d0..adbf82b2ec22796da439c608f8c3ccb8c57d8b92 100644 (file)
@@ -938,6 +938,9 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
         }
 
         $fieldTypes = array('Contact', 'Organization');
+        if (!empty($form->_membershipBlock)) {
+          $fieldTypes = array_merge($fieldTypes, array('Membership'));
+        }
         $contactSubType = CRM_Contact_BAO_ContactType::subTypes('Organization');
         $fieldTypes = array_merge($fieldTypes, $contactSubType);