X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FActivity%2FImport%2FForm%2FMapField.php;h=6b10ff32fa2aa64402f50fcf436c2e1280b5b26c;hb=f212d37d5ee36a991eb5529211b692dee29378c0;hp=41c00bae4025c31f62581ba7527334a3a8732e72;hpb=a969ba2b3fc64eebf12a98e3bfc69212d832ee19;p=civicrm-core.git diff --git a/CRM/Activity/Import/Form/MapField.php b/CRM/Activity/Import/Form/MapField.php index 41c00bae40..6b10ff32fa 100644 --- a/CRM/Activity/Import/Form/MapField.php +++ b/CRM/Activity/Import/Form/MapField.php @@ -1,7 +1,7 @@ _mapperFields = $this->get('fields'); @@ -78,10 +77,9 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { } /** - * Function to actually build the form + * Build the form object * * @return void - * @access public */ public function buildQuickForm() { //to save the current mappings @@ -135,7 +133,6 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { $dataPatterns = $this->get('dataPatterns'); $hasLocationTypes = $this->get('fieldTypes'); - /* Initialize all field usages to false */ foreach ($mapperKeys as $key) { @@ -152,7 +149,6 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { //used to warn for mismatch column count or mismatch mapping $warning = 0; - for ($i = 0; $i < $this->_columnCount; $i++) { $sel = &$this->addElement('hierselect', "mapper[$i]", ts('Mapper for Field %1', array(1 => $i)), NULL); $jsSet = FALSE; @@ -250,11 +246,11 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { $this->addButtons(array( array( 'type' => 'back', - 'name' => ts('<< Previous'), + 'name' => ts('Previous'), ), array( 'type' => 'next', - 'name' => ts('Continue >>'), + 'name' => ts('Continue'), 'spacing' => '          ', 'isDefault' => TRUE, ), @@ -267,15 +263,15 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { } /** - * global validation rules for the form + * Global validation rules for the form * - * @param array $fields posted values of the form + * @param array $fields + * Posted values of the form. * * @return array list of errors to be posted back to the form * @static - * @access public */ - static function formRule($fields) { + public static function formRule($fields) { $errors = array(); // define so we avoid notices below $errors['_qf_default'] = ''; @@ -373,7 +369,6 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { * preview the file and extract some summary statistics * * @return void - * @access public */ public function postProcess() { $params = $this->controller->exportValues('MapField'); @@ -470,7 +465,6 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { $this->set('savedMapping', $saveMappingFields->mapping_id); } - $parser = new CRM_Activity_Import_Parser_Activity($mapperKeysMain, $mapperLocType, $mapperPhoneType); $parser->run($fileName, $seperator, $mapper, $skipColumnHeader, CRM_Import_Parser::MODE_PREVIEW @@ -480,4 +474,3 @@ class CRM_Activity_Import_Form_MapField extends CRM_Import_Form_MapField { $parser->set($this); } } -