Merge pull request #4234 from jitendrapurohit/CRM-15368
[civicrm-core.git] / CRM / Contact / Form / RelatedContact.php
index d9367dd3e4b4edb53ac9c914aa799d2eea92383b..4fba5517f83f5a4ac06e7a10e2b64099351a9504 100644 (file)
@@ -140,8 +140,7 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
       $this->_contactType,
       $countryID,
       $stateID,
-      'Contact Information',
-      TRUE
+      ts('Contact Information')
     );
 
     $this->addButtons(array(
@@ -182,6 +181,10 @@ class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
     }
 
     $params['contact_type'] = $this->_contactType;
+    //CRM-14904
+    if ( isset($this->_defaults['contact_sub_type']) ) {
+      $params['contact_sub_type'] = $this->_defaults['contact_sub_type'];
+    }
     $params['contact_id'] = $this->_contactId;
 
     $contact = CRM_Contact_BAO_Contact::create($params, TRUE);