From 9de67297987318616a05d5eeeafb3225241c26ac Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 15 Apr 2022 15:02:58 +1200 Subject: [PATCH] Use shared file instead of now-identical files --- .../CRM/Contribute/Import/Form/DataSource.tpl | 59 +--------------- templates/CRM/Import/Form/DataSource.tpl | 68 +++++++++++++++++++ .../CRM/Member/Import/Form/DataSource.tpl | 60 +--------------- 3 files changed, 70 insertions(+), 117 deletions(-) create mode 100644 templates/CRM/Import/Form/DataSource.tpl diff --git a/templates/CRM/Contribute/Import/Form/DataSource.tpl b/templates/CRM/Contribute/Import/Form/DataSource.tpl index f282b322df..5395b37fcf 100644 --- a/templates/CRM/Contribute/Import/Form/DataSource.tpl +++ b/templates/CRM/Contribute/Import/Form/DataSource.tpl @@ -7,61 +7,4 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} - -{* Import Wizard - Step 1 (choose data source) *} -
- - {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} - {include file="CRM/common/WizardHeader.tpl"} -
- {ts 1=$importEntity 2= $importEntities}The %1 Import Wizard allows you to easily upload %2 from other applications into CiviCRM.{/ts} - {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match an existing contact in your CiviCRM database.{/ts} {help id='upload'} -
- -
{include file="CRM/common/formButtons.tpl" location="top"}
- - - - - - - - - - - - - - - - - - - - - {include file="CRM/Core/Date.tpl"} - {if $savedMapping} - - - - - {/if} -
{$form.uploadFile.label} {$form.uploadFile.html}
- {ts}File format must be comma-separated-values (CSV).{/ts} -
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} -
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
- - {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} - -
{$form.contactType.label}{$form.contactType.html}
- - {ts 1=$importEntities}Select 'Individual' if you are importing %1 made by individual persons.{/ts} - {ts 1=$importEntities}Select 'Organization' or 'Household' if you are importing %1 made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} - -
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}{$form.fieldSeparator.html}
{$form.savedMapping.label}{$form.savedMapping.html}
- {ts}If you want to use a previously saved import field mapping - select it here.{/ts} -
-
- -
{include file="CRM/common/formButtons.tpl" location="bottom"}
-
+{include file="CRM/Import/Form/DataSource.tpl"} diff --git a/templates/CRM/Import/Form/DataSource.tpl b/templates/CRM/Import/Form/DataSource.tpl new file mode 100644 index 0000000000..19f582d30b --- /dev/null +++ b/templates/CRM/Import/Form/DataSource.tpl @@ -0,0 +1,68 @@ +{* + +--------------------------------------------------------------------+ + | 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 | + +--------------------------------------------------------------------+ +*} + +{* Import Wizard - Step 1 (choose data source) *} +
+ + {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} + {include file="CRM/common/WizardHeader.tpl"} +
+ {ts 1=$importEntity 2= $importEntities}The %1 Import Wizard allows you to easily upload %2 from other applications into CiviCRM.{/ts} + {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match an existing contact in your CiviCRM database.{/ts} {help id='upload'} +
+ +
{include file="CRM/common/formButtons.tpl" location="top"}
+ + + + + + + + + + + + + + + + + + + + + {include file="CRM/Core/Date.tpl"} + {if $savedMapping} + + + + + {/if} +
{$form.uploadFile.label} {$form.uploadFile.html}
+ {ts}File format must be comma-separated-values (CSV).{/ts} +
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} +
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
+ + {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} + +
{$form.contactType.label}{$form.contactType.html}
+ + {ts 1=$importEntities}Select 'Individual' if you are importing %1 made by individual persons.{/ts} + {ts 1=$importEntities}Select 'Organization' or 'Household' if you are importing %1 made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} + +
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}{$form.fieldSeparator.html}
{$form.savedMapping.label}{$form.savedMapping.html}
+ {ts}If you want to use a previously saved import field mapping - select it here.{/ts} +
+
+ +
{include file="CRM/common/formButtons.tpl" location="bottom"}
+
+ diff --git a/templates/CRM/Member/Import/Form/DataSource.tpl b/templates/CRM/Member/Import/Form/DataSource.tpl index 19f582d30b..5395b37fcf 100644 --- a/templates/CRM/Member/Import/Form/DataSource.tpl +++ b/templates/CRM/Member/Import/Form/DataSource.tpl @@ -7,62 +7,4 @@ | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *} - -{* Import Wizard - Step 1 (choose data source) *} -
- - {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *} - {include file="CRM/common/WizardHeader.tpl"} -
- {ts 1=$importEntity 2= $importEntities}The %1 Import Wizard allows you to easily upload %2 from other applications into CiviCRM.{/ts} - {ts}Files to be imported must be in the 'comma-separated-values' format (CSV) and must contain data needed to match an existing contact in your CiviCRM database.{/ts} {help id='upload'} -
- -
{include file="CRM/common/formButtons.tpl" location="top"}
- - - - - - - - - - - - - - - - - - - - - {include file="CRM/Core/Date.tpl"} - {if $savedMapping} - - - - - {/if} -
{$form.uploadFile.label} {$form.uploadFile.html}
- {ts}File format must be comma-separated-values (CSV).{/ts} -
{ts 1=$uploadSize}Maximum Upload File Size: %1 MB{/ts} -
{$form.skipColumnHeader.html}{$form.skipColumnHeader.label}
- - {ts}Check this box if the first row of your file consists of field names (Example: 'Contact ID', 'Amount').{/ts} - -
{$form.contactType.label}{$form.contactType.html}
- - {ts 1=$importEntities}Select 'Individual' if you are importing %1 made by individual persons.{/ts} - {ts 1=$importEntities}Select 'Organization' or 'Household' if you are importing %1 made by contacts of that type. (NOTE: Some built-in contact types may not be enabled for your site.){/ts} - -
{$form.onDuplicate.label}{$form.onDuplicate.html} {help id="id-onDuplicate"}
{$form.fieldSeparator.label} {help id='id-fieldSeparator' file='CRM/Contact/Import/Form/DataSource'}{$form.fieldSeparator.html}
{$form.savedMapping.label}{$form.savedMapping.html}
- {ts}If you want to use a previously saved import field mapping - select it here.{/ts} -
-
- -
{include file="CRM/common/formButtons.tpl" location="bottom"}
-
- +{include file="CRM/Import/Form/DataSource.tpl"} -- 2.25.1