diff --git a/CRM/Contact/Import/Form/DataSource.php b/CRM/Contact/Import/Form/DataSource.php
index a95ace603cda..ead2b2435d1f 100644
--- a/CRM/Contact/Import/Form/DataSource.php
+++ b/CRM/Contact/Import/Form/DataSource.php
@@ -89,12 +89,12 @@ public function preProcess() {
$this->_dataSourceIsValid = TRUE;
$this->assign('showDataSourceFormPane', TRUE);
$dataSourcePath = explode('_', $this->_dataSource);
- $templateFile = "CRM/Contact/Import/Form/" . $dataSourcePath[3] . ".tpl";
- $this->assign('dataSourceFormTemplateFile', $templateFile);
+ $templateFile = 'CRM/Contact/Import/Form/' . $dataSourcePath[3] . ".tpl";
}
elseif ($this->_dataSource) {
$this->invalidConfig('Invalid data source');
}
+ $this->assign('dataSourceFormTemplateFile', $templateFile ?? NULL);
}
/**
@@ -201,9 +201,9 @@ public function setDefaultValues() {
'fieldSeparator' => $config->fieldSeparator,
];
- if ($loadeMapping = $this->get('loadedMapping')) {
- $this->assign('loadedMapping', $loadeMapping);
- $defaults['savedMapping'] = $loadeMapping;
+ $this->assign('loadedMapping', $this->get('loadedMapping'));
+ if ($this->get('loadedMapping')) {
+ $defaults['savedMapping'] = $this->get('loadedMapping');
}
return $defaults;
diff --git a/templates/CRM/Contact/Import/Form/DataSource.tpl b/templates/CRM/Contact/Import/Form/DataSource.tpl
index 5009af8a1958..9ec25937a321 100644
--- a/templates/CRM/Contact/Import/Form/DataSource.tpl
+++ b/templates/CRM/Contact/Import/Form/DataSource.tpl
@@ -83,7 +83,7 @@
{ /if}
- {if $form.disableUSPS}
+ {if isset($form.disableUSPS)}
|
{$form.disableUSPS.html} |
diff --git a/templates/CRM/common/WizardHeader.tpl b/templates/CRM/common/WizardHeader.tpl
index 01daa5244622..ddf44bae71ce 100644
--- a/templates/CRM/common/WizardHeader.tpl
+++ b/templates/CRM/common/WizardHeader.tpl
@@ -27,33 +27,21 @@
{else} {* This is a sub-step *}
{assign var="stepClass" value="past-sub-step"}
{/if}
- {if $wizard.style.hideStepNumbers}
- {assign var="stepPrefix" value=$wizard.style.subStepPrefixPast}
- {else}
- {assign var="stepPrefix" value=$wizard.style.stepPrefixPast|cat:$wizard.steps[step].stepNumber|cat:". "}
- {/if}
+ {assign var="stepPrefix" value=$wizard.style.stepPrefixPast|cat:$wizard.steps[step].stepNumber|cat:". "}
{elseif $wizard.currentStepNumber == $wizard.steps[step].stepNumber}
{if $wizard.steps[step].step}
{assign var="stepClass" value="current-step"}
{else}
{assign var="stepClass" value="current-sub-step"}
{/if}
- {if $wizard.style.hideStepNumbers}
- {assign var="stepPrefix" value=$wizard.style.subStepPrefixCurrent}
- {else}
- {assign var="stepPrefix" value=$wizard.style.stepPrefixCurrent|cat:$wizard.steps[step].stepNumber|cat:". "}
- {/if}
+ {assign var="stepPrefix" value=$wizard.style.stepPrefixCurrent|cat:$wizard.steps[step].stepNumber|cat:". "}
{else}
{if $wizard.steps[step].step}
{assign var="stepClass" value="future-step"}
{else}
{assign var="stepClass" value="future-sub-step"}
{/if}
- {if $wizard.style.hideStepNumbers}
- {assign var="stepPrefix" value=$wizard.style.subStepPrefixFuture}
- {else}
- {assign var="stepPrefix" value=$wizard.style.stepPrefixFuture|cat:$wizard.steps[step].stepNumber|cat:". "}
- {/if}
+ {assign var="stepPrefix" value=$wizard.style.stepPrefixFuture|cat:$wizard.steps[step].stepNumber|cat:". "}
{/if}
{if !$wizard.steps[step].valid}
{assign var="stepClass" value="$stepClass not-valid"}