<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
/**
- * Function to set variables up before form is built
+ * Set variables up before form is built
*
* @return void
- * @access public
*/
public function preProcess() {
$this->_mapperFields = $this->get('fields');
}
/**
- * Function to actually build the form
+ * Build the form object
*
* @return void
- * @access public
*/
public function buildQuickForm() {
//to save the current mappings
$dataPatterns = $this->get('dataPatterns');
$hasLocationTypes = $this->get('fieldTypes');
-
/* Initialize all field usages to false */
foreach ($mapperKeys as $key) {
//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;
$this->addButtons(array(
array(
'type' => 'back',
- 'name' => ts('<< Previous'),
+ 'name' => ts('Previous'),
),
array(
'type' => 'next',
- 'name' => ts('Continue >>'),
+ 'name' => ts('Continue'),
'spacing' => ' ',
'isDefault' => TRUE,
),
}
/**
- * 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'] = '';
* preview the file and extract some summary statistics
*
* @return void
- * @access public
*/
public function postProcess() {
$params = $this->controller->exportValues('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
$parser->set($this);
}
}
-