X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FAdmin%2FForm%2FMapping.php;h=ce3a2ffffc24705f4bb5722f780164b325a60d29;hb=0d5147553408267419ef1e8fbe3cfecb83dff7ba;hp=e766de1dba00e3fb2710615d159a3d7fdecb86c0;hpb=992fa840d8ba027c64fc1a46c77d6b288337222b;p=civicrm-core.git diff --git a/CRM/Admin/Form/Mapping.php b/CRM/Admin/Form/Mapping.php index e766de1dba..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,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 -} +}