X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FImport%2FForm%2FMapField.php;h=2c260c1d8734edf7eb09cbdd3cd08669d647a6fe;hb=739acba7a63f85b99dad1e484c0125b577abe92a;hp=9695e21f24f16d2d3659a952ac31490530e81e20;hpb=8d9c1b76b11fe093a09d2b48d7c17708977a6c65;p=civicrm-core.git diff --git a/CRM/Event/Import/Form/MapField.php b/CRM/Event/Import/Form/MapField.php index 9695e21f24..2c260c1d87 100644 --- a/CRM/Event/Import/Form/MapField.php +++ b/CRM/Event/Import/Form/MapField.php @@ -57,84 +57,7 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField { $savedMappingID = (int) $this->getSubmittedValue('savedMapping'); $this->buildSavedMappingFields($savedMappingID); $this->addFormRule(array('CRM_Event_Import_Form_MapField', 'formRule'), $this); - - $defaults = []; - $mapperKeys = array_keys($this->_mapperFields); - $hasHeaders = $this->getSubmittedValue('skipColumnHeader'); - $headerPatterns = $this->getHeaderPatterns(); - $dataPatterns = $this->getDataPatterns(); - $fieldMappings = $this->getFieldMappings(); - /* Initialize all field usages to false */ - - foreach ($mapperKeys as $key) { - $this->_fieldUsed[$key] = FALSE; - } - $this->_location_types = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Address', 'location_type_id'); - $sel1 = $this->_mapperFields; - - $js = "\n"; - $this->assign('initHideBoxes', $js); - $this->setDefaults($defaults); - + $this->addMapper(); $this->addFormButtons(); } @@ -154,7 +77,7 @@ class CRM_Event_Import_Form_MapField extends CRM_Import_Form_MapField { $errors = []; // define so we avoid notices below $errors['_qf_default'] = ''; - $contactFieldsBelowWeightMessage = NULL; + if (!array_key_exists('savedMapping', $fields)) { $importKeys = []; foreach ($fields['mapper'] as $mapperPart) {