From 10c380100c723eb19ea66dfa6cb145866fd7bf0c Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 8 Apr 2022 16:43:07 +1200 Subject: [PATCH] Consolidate MapTable.tpl --- .../CRM/Activity/Import/Form/MapField.tpl | 2 +- .../CRM/Activity/Import/Form/Preview.tpl | 2 +- templates/CRM/Event/Import/Form/MapField.tpl | 2 +- templates/CRM/Event/Import/Form/MapTable.tpl | 101 ------------------ templates/CRM/Event/Import/Form/Preview.tpl | 2 +- .../{Activity => }/Import/Form/MapTable.tpl | 23 ++-- templates/CRM/Member/Import/Form/MapField.tpl | 2 +- templates/CRM/Member/Import/Form/MapTable.tpl | 100 ----------------- templates/CRM/Member/Import/Form/Preview.tpl | 2 +- 9 files changed, 17 insertions(+), 219 deletions(-) delete mode 100644 templates/CRM/Event/Import/Form/MapTable.tpl rename templates/CRM/{Activity => }/Import/Form/MapTable.tpl (85%) delete mode 100644 templates/CRM/Member/Import/Form/MapTable.tpl diff --git a/templates/CRM/Activity/Import/Form/MapField.tpl b/templates/CRM/Activity/Import/Form/MapField.tpl index fbc5c78edb..dc6576a003 100644 --- a/templates/CRM/Activity/Import/Form/MapField.tpl +++ b/templates/CRM/Activity/Import/Form/MapField.tpl @@ -20,7 +20,7 @@
{include file="CRM/common/formButtons.tpl" location="top"}
{* Table for mapping data to CRM fields *} - {include file="CRM/Activity/Import/Form/MapTable.tpl} + {include file="CRM/Import/Form/MapTable.tpl"}
{include file="CRM/common/formButtons.tpl" location="bottom"}
diff --git a/templates/CRM/Activity/Import/Form/Preview.tpl b/templates/CRM/Activity/Import/Form/Preview.tpl index 5b846a62cc..111dddc644 100644 --- a/templates/CRM/Activity/Import/Form/Preview.tpl +++ b/templates/CRM/Activity/Import/Form/Preview.tpl @@ -73,7 +73,7 @@
{* Table for mapping preview *} - {include file="CRM/Activity/Import/Form/MapTable.tpl} + {include file="CRM/Import/Form/MapTable.tpl"}
{include file="CRM/common/formButtons.tpl" location="bottom"}
diff --git a/templates/CRM/Event/Import/Form/MapField.tpl b/templates/CRM/Event/Import/Form/MapField.tpl index 7ed50d8d8b..eb99c84b26 100644 --- a/templates/CRM/Event/Import/Form/MapField.tpl +++ b/templates/CRM/Event/Import/Form/MapField.tpl @@ -27,7 +27,7 @@ {* Table for mapping data to CRM fields *} - {include file="CRM/Event/Import/Form/MapTable.tpl} + {include file="CRM/Import/Form/MapTable.tpl"} diff --git a/templates/CRM/Event/Import/Form/MapTable.tpl b/templates/CRM/Event/Import/Form/MapTable.tpl deleted file mode 100644 index 6d5bf9558d..0000000000 --- a/templates/CRM/Event/Import/Form/MapTable.tpl +++ /dev/null @@ -1,101 +0,0 @@ -{* - +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC. All rights reserved. | - | | - | This work is published under the GNU AGPLv3 license with some | - | permitted exceptions and without any warranty. For full license | - | and copyright information, see https://civicrm.org/licensing | - +--------------------------------------------------------------------+ -*} -{* Event Import Wizard - Data Mapping table used by MapFields.tpl and Preview.tpl *} -
-
- {strip} - - {if $savedMappingName} - - {/if} - - {section name=rows loop=$rowDisplayCount} - {if $skipColumnHeader } - { if $smarty.section.rows.iteration == 1 } - - {else} - - {/if} - {else} - - {/if} - {/section} - - - - - {*Loop on columns parsed from the import data rows*} - {section name=cols loop=$columnCount} - {assign var="i" value=$smarty.section.cols.index} - - - {section name=rows loop=$rowDisplayCount} - {assign var="j" value=$smarty.section.rows.index} - - {/section} - - {* Display mapper - - - {/section} - -
{ts 1=$savedMappingName}Saved Field Mapping: %1{/ts}
{ts}Column Headers{/ts}{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}{ts}Matching CiviCRM Field{/ts}
{$dataValues[$j][$i]|escape} - {if $wizard.currentStepName == 'Preview'} - {$mapper[$i]} - {else} - {$form.mapper[$i].html|smarty:nodefaults} - {/if} -
- {/strip} - - {if $wizard.currentStepName != 'Preview'} -
- - {if $savedMappingName} - {$form.updateMapping.html}    {$form.updateMapping.label} - {/if} - {$form.saveMapping.html}    {$form.saveMapping.label} -
- - - - - - - -
{$form.saveMappingName.label}{$form.saveMappingName.html}
{$form.saveMappingDesc.label}{$form.saveMappingDesc.html}
-
- -
- {/if} -
-
diff --git a/templates/CRM/Event/Import/Form/Preview.tpl b/templates/CRM/Event/Import/Form/Preview.tpl index 93c1f615ed..62220cc985 100644 --- a/templates/CRM/Event/Import/Form/Preview.tpl +++ b/templates/CRM/Event/Import/Form/Preview.tpl @@ -75,7 +75,7 @@ {* Table for mapping preview *} - {include file="CRM/Event/Import/Form/MapTable.tpl} + {include file="CRM/Import/Form/MapTable.tpl"}
diff --git a/templates/CRM/Activity/Import/Form/MapTable.tpl b/templates/CRM/Import/Form/MapTable.tpl similarity index 85% rename from templates/CRM/Activity/Import/Form/MapTable.tpl rename to templates/CRM/Import/Form/MapTable.tpl index 9990cb38bf..a805ef7d64 100644 --- a/templates/CRM/Activity/Import/Form/MapTable.tpl +++ b/templates/CRM/Import/Form/MapTable.tpl @@ -7,8 +7,8 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} -{* Activity Import Wizard - Data Mapping table used by MapFields.tpl and Preview.tpl *} -
+{* Import Wizard - Data Mapping table used by MapFields.tpl and Preview.tpl *} +
{strip} @@ -66,16 +66,15 @@ {/if} {$form.saveMapping.html}    {$form.saveMapping.label}
- - - - - - - - - -
{$form.saveMappingName.label}{$form.saveMappingName.html}
{$form.saveMappingDesc.label}{$form.saveMappingDesc.html}
+ + + + + + + + +
{$form.saveMappingName.label}{$form.saveMappingName.html}
{$form.saveMappingDesc.label}{$form.saveMappingDesc.html}
-
- {/if} -
diff --git a/templates/CRM/Member/Import/Form/Preview.tpl b/templates/CRM/Member/Import/Form/Preview.tpl index e4465552d5..390b7e2250 100644 --- a/templates/CRM/Member/Import/Form/Preview.tpl +++ b/templates/CRM/Member/Import/Form/Preview.tpl @@ -73,7 +73,7 @@ {* Table for mapping preview *} - {include file="CRM/Member/Import/Form/MapTable.tpl} + {include file="CRM/Import/Form/MapTable.tpl"}
{include file="CRM/common/formButtons.tpl" location="bottom"}
-- 2.25.1