$js = "<script type='text/javascript'>\n";
$formName = 'document.forms.' . $this->_name;
//used to warn for mismatch column count or mismatch mapping
- $warning = 0;
+ CRM_Core_Session::singleton()->setStatus(NULL);
+
for ($i = 0; $i < $this->_columnCount; $i++) {
$sel = &$this->addElement('hierselect', "mapper[$i]", ts('Mapper for Field %1', [1 => $i]), NULL);
if (isset($mappingName) &&
($this->_columnCount != count($mappingName))
) {
- $warning++;
- }
-
- if ($warning != 0 && $this->get('savedMapping')) {
- $session = CRM_Core_Session::singleton();
- $session->setStatus(ts('The data columns in this import file appear to be different from the saved mapping. Please verify that you have selected the correct saved mapping before continuing.'));
- }
- else {
- $session = CRM_Core_Session::singleton();
- $session->setStatus(NULL);
+ CRM_Core_Session::singleton()->setStatus(ts('The data columns in this import file appear to be different from the saved mapping. Please verify that you have selected the correct saved mapping before continuing.'));
}
$this->setDefaults($defaults);