Skip to content

Commit

Permalink
Merge pull request #20735 from eileenmcnaughton/tpl
Browse files Browse the repository at this point in the history
Tpl enotice fix
  • Loading branch information
seamuslee001 authored Jul 1, 2021
2 parents 5621bd7 + 29c4216 commit 5362d1b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 21 deletions.
10 changes: 5 additions & 5 deletions CRM/Contact/Import/Form/DataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion templates/CRM/Contact/Import/Form/DataSource.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
</tr>
{ /if}

{if $form.disableUSPS}
{if isset($form.disableUSPS)}
<tr class="crm-import-datasource-form-block-disableUSPS">
<td class="label"></td>
<td>{$form.disableUSPS.html} <label for="disableUSPS">{$form.disableUSPS.label}</label></td>
Expand Down
18 changes: 3 additions & 15 deletions templates/CRM/common/WizardHeader.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down

0 comments on commit 5362d1b

Please sign in to comment.