X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FForm%2FDomain.php;h=af7d6a2de0714a5296d4a61540b6a2e0490f9134;hb=06b24f030643747e4223fd83be521dbb75b10c28;hp=1ca1d0ee75306b0eeedbe35d07b7ad308bc87c47;hpb=d031c654f72b36c9f4d88bdb3dd55ddbadb98535;p=civicrm-core.git diff --git a/CRM/Contact/Form/Domain.php b/CRM/Contact/Form/Domain.php index 1ca1d0ee75..af7d6a2de0 100644 --- a/CRM/Contact/Form/Domain.php +++ b/CRM/Contact/Form/Domain.php @@ -39,35 +39,35 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { /** - * the group id, used when editing a group + * The group id, used when editing a group * * @var int */ protected $_id; /** - * the contact_id of domain + * The contact_id of domain * * @var int */ protected $_contactId; /** - * default from email address option value id. + * Default from email address option value id. * * @var int */ protected $_fromEmailId = NULL; /** - * default location type fields + * Default location type fields * * @var array */ protected $_locationDefaults = array(); /** - * how many locationBlocks should we display? + * How many locationBlocks should we display? * * @var int * @const @@ -91,12 +91,24 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { } /* - * This function sets the default values for the form. + * Set default values for the form. * the default values are retrieved from the database * * @access public * @return void */ + /** + * This virtual function is used to set the default values of + * various form elements + * + * access public + * + * @return array reference to the array of default values + * + */ + /** + * @return array + */ function setDefaultValues() { $defaults = array(); $params = array(); @@ -132,28 +144,13 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { $defaults['address'][1]['state_province_id'] = $config->defaultContactStateProvince; } - if (!empty($defaults['address'])) { - foreach ($defaults['address'] as $key => $value) { - CRM_Contact_Form_Edit_Address::fixStateSelect($this, - "address[$key][country_id]", - "address[$key][state_province_id]", - "address[$key][county_id]", - CRM_Utils_Array::value('country_id', $value, - $config->defaultContactCountry - ), - CRM_Utils_Array::value('state_province_id', $value, - $config->defaultContactStateProvince - ) - ); - } - } } $defaults = array_merge($defaults, $domainDefaults); return $defaults; } /** - * Function to actually build the form + * Build the form object * * @return void * @access public @@ -202,7 +199,7 @@ class CRM_Contact_Form_Domain extends CRM_Core_Form { } /** - * global validation rules for the form + * Global validation rules for the form * * @param array $fields posted values of the form *