| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* It delegates the work to lower level subclasses and integrates the changes
* back in. It also uses a lot of functionality with the CRM API's, so any change
* made here could potentially affect the API etc. Be careful, be aware, use unit tests.
- *
*/
class CRM_Contact_Form_RelatedContact extends CRM_Core_Form {
}
/**
- * Set default values for the form. Note that in edit/view mode
- * the default values are retrieved from the database
- *
+ * Set default values for the form.
*
- * @return void
+ * Note that in edit/view mode the default values are retrieved from the
+ * database
*/
public function setDefaultValues() {
return $this->_defaults;
/**
* Form submission of new/edit contact is processed.
- *
- *
- * @return void
*/
public function postProcess() {
// store the submitted values in an array
foreach (array(
'phone',
'email',
- 'address'
+ 'address',
) as $locFld) {
if (!empty($this->_defaults[$locFld]) && $this->_defaults[$locFld][1]['location_type_id']) {
$params[$locFld][1]['is_primary'] = $this->_defaults[$locFld][1]['is_primary'];
}
CRM_Core_Session::setStatus($message, ts('Contact Saved'), 'success');
}
+
}