Tpl enotice fix
authorEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 1 Jul 2021 00:30:36 +0000 (12:30 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Thu, 1 Jul 2021 00:39:01 +0000 (12:39 +1200)
I searched for hideStepNumbers & believe it is never assigned

CRM/Contact/Import/Form/DataSource.php
templates/CRM/Contact/Import/Form/DataSource.tpl
templates/CRM/common/WizardHeader.tpl

index a95ace603cda9ccf5dd046bb91d5c68b6584474b..ead2b2435d1ff854da86f7d6643273af0dcb8665 100644 (file)
@@ -89,12 +89,12 @@ class CRM_Contact_Import_Form_DataSource extends CRM_Core_Form {
       $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 @@ class CRM_Contact_Import_Form_DataSource extends CRM_Core_Form {
       '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;
index 5009af8a195864f0a7d63f91d6995ab94a5a49a0..9ec25937a32130fddcdfb8e69ef579ac89596828 100644 (file)
@@ -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>
index 01daa52446229dc4c47aa8085008d2058f8ffc47..ddf44bae71ce3285e89d18955ca891308173ff9e 100644 (file)
                 {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"}