Merge pull request #4234 from jitendrapurohit/CRM-15368
[civicrm-core.git] / CRM / Contact / Form / RelatedContact.php
index aebcfc01e4dceedc75499ae68e4fe3a813711f6e..4fba5517f83f5a4ac06e7a10e2b64099351a9504 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.4                                                |
+ | CiviCRM version 4.5                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013                                |
+ | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -28,7 +28,7 @@
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
  * $Id$
  *
  */
@@ -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);