X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FCustomData.php;h=022534ea151568443f4524745f970f583b3b65f8;hb=76f1a3f2a53b1a3a03df8cf3ff33a1a32c84cc6b;hp=f2f49e53605b872d318b5c4ab58c10e012e9713d;hpb=58a50b22e20f112fdbfc7e50f18353c311ceb1ae;p=civicrm-core.git diff --git a/CRM/Contact/Form/CustomData.php b/CRM/Contact/Form/CustomData.php index f2f49e5360..022534ea15 100644 --- a/CRM/Contact/Form/CustomData.php +++ b/CRM/Contact/Form/CustomData.php @@ -1,7 +1,7 @@ _cdType = CRM_Utils_Array::value('type', $_GET); $this->assign('cdType', FALSE); $this->_multiRecordDisplay = CRM_Utils_Request::retrieve('multiRecordDisplay', 'String', $this); @@ -127,7 +124,11 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { // NOTE : group id is not stored in session from within CRM_Custom_Form_CustomData::preProcess func // this is due to some condition inside it which restricts it from saving in session // so doing this for multi record edit action - CRM_Custom_Form_CustomData::preProcess($this); + $entityId = CRM_Utils_Request::retrieve('entityID', 'Positive', $this); + if(!empty($entityId)) { + $subType = CRM_Contact_BAO_Contact::getContactSubType($entityId, ','); + } + CRM_Custom_Form_CustomData::preProcess($this, NULL, $subType, NULL, NULL, $entityId); if ($this->_multiRecordDisplay) { $this->_groupID = CRM_Utils_Request::retrieve('groupID', 'Positive', $this); $this->_tableID = $this->_entityId; @@ -171,10 +172,9 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { } /** - * Function to actually build the form + * Build the form object * * @return void - * @access public */ public function buildQuickForm() { if ($this->_cdType || $this->_multiRecordDisplay == 'single') { @@ -232,11 +232,10 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { /** * Set the default form values * - * @access protected * * @return array the default array reference */ - function setDefaultValues() { + public function setDefaultValues() { if ($this->_cdType || $this->_multiRecordDisplay == 'single') { if ($this->_copyValueId) { // cached tree is fetched @@ -290,7 +289,6 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { /** * Process the user submitted custom data values. * - * @access public * * @return void */ @@ -314,4 +312,4 @@ class CRM_Contact_Form_CustomData extends CRM_Core_Form { // reset the group contact cache for this group CRM_Contact_BAO_GroupContactCache::remove(); } -} \ No newline at end of file +}