X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FMapping.php;h=ce3a2ffffc24705f4bb5722f780164b325a60d29;hb=0d5147553408267419ef1e8fbe3cfecb83dff7ba;hp=63ea130bccb9e26b71db40dbf8cc6da3eaf1736a;hpb=32dc2494c6d263ecee6621ad3d7ca4e892bb3d7a;p=civicrm-core.git diff --git a/CRM/Admin/Form/Mapping.php b/CRM/Admin/Form/Mapping.php index 63ea130bcc..ce3a2ffffc 100644 --- a/CRM/Admin/Form/Mapping.php +++ b/CRM/Admin/Form/Mapping.php @@ -1,9 +1,9 @@ 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,17 +82,19 @@ 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 None + * @return void */ public function postProcess() { // store the submitted values in an array @@ -107,6 +113,5 @@ class CRM_Admin_Form_Mapping extends CRM_Admin_Form { CRM_Core_BAO_Mapping::add($params); } } - //end of function -} +}