projects
/
civicrm-core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #4692 from kurund/CRM-14696
[civicrm-core.git]
/
CRM
/
Contact
/
Form
/
RelatedContact.php
diff --git
a/CRM/Contact/Form/RelatedContact.php
b/CRM/Contact/Form/RelatedContact.php
index fc0617ab3fd13ee6b2edfc061c244711e8210c9f..ec8a205936a4c01becae6ceb4d847c807326ba48 100644
(file)
--- a/
CRM/Contact/Form/RelatedContact.php
+++ b/
CRM/Contact/Form/RelatedContact.php
@@
-58,14
+58,14
@@
class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
public $_contactId;
/**
public $_contactId;
/**
- *
f
orm defaults
+ *
F
orm defaults
*
* @var array
*/
protected $_defaults = array();
/**
*
* @var array
*/
protected $_defaults = array();
/**
- *
b
uild all the data structures needed to build the form
+ *
B
uild all the data structures needed to build the form
*
* @return void
* @access public
*
* @return void
* @access public
@@
-104,7
+104,7
@@
class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
}
/**
}
/**
- *
This function sets the
default values for the form. Note that in edit/view mode
+ *
Set
default values for the form. Note that in edit/view mode
* the default values are retrieved from the database
*
* @access public
* the default values are retrieved from the database
*
* @access public
@@
-116,7
+116,7
@@
class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
}
/**
}
/**
- *
Function to actually build the form
+ *
Build the form object
*
* @return void
* @access public
*
* @return void
* @access public
@@
-181,6
+181,10
@@
class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
}
$params['contact_type'] = $this->_contactType;
}
$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);
$params['contact_id'] = $this->_contactId;
$contact = CRM_Contact_BAO_Contact::create($params, TRUE);