X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FMapping.php;h=ce3a2ffffc24705f4bb5722f780164b325a60d29;hb=0d5147553408267419ef1e8fbe3cfecb83dff7ba;hp=53a4a7921d0f0403b7fecd290df3b680f87308fc;hpb=8906b92a00b4907e620e80624fb6ac6baa368bed;p=civicrm-core.git diff --git a/CRM/Admin/Form/Mapping.php b/CRM/Admin/Form/Mapping.php index 53a4a7921d..ce3a2ffffc 100644 --- a/CRM/Admin/Form/Mapping.php +++ b/CRM/Admin/Form/Mapping.php @@ -1,7 +1,7 @@ setPageTitle(ts('Field Mapping')); + if ($this->_action == CRM_Core_Action::DELETE) { return; } @@ -64,7 +65,10 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { $this->add('text', 'name', ts('Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Mapping', 'name'), TRUE ); - $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array('CRM_Core_DAO_Mapping', $this->_id)); + $this->addRule('name', ts('Name already exists in Database.'), 'objectExists', array( + 'CRM_Core_DAO_Mapping', + $this->_id, + )); $this->addElement('text', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_Mapping', 'description') @@ -78,15 +82,17 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { } } - function setDefaultValues() { + /** + * @return array + */ + public function setDefaultValues() { $defaults = parent::setDefaultValues(); return $defaults; } /** - * Function to process the form + * Process the form submission * - * @access public * * @return void */ @@ -107,6 +113,5 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { CRM_Core_BAO_Mapping::add($params); } } - //end of function -} +}