$mappingArray = CRM_Core_BAO_Mapping::getMappings('Import Contact');
$this->assign('savedMapping', $mappingArray);
- $this->addElement('select', 'savedMapping', ts('Mapping Option'), ['' => ts('- select -')] + $mappingArray);
+ $this->addElement('select', 'savedMapping', ts('Saved Field Mapping'), ['' => ts('- select -')] + $mappingArray);
$js = ['onClick' => "buildSubTypes();buildDedupeRules();"];
// contact types option
'fieldSeparator' => $config->fieldSeparator,
];
- $this->assign('loadedMapping', $this->get('loadedMapping'));
if ($this->get('loadedMapping')) {
$defaults['savedMapping'] = $this->get('loadedMapping');
}
];
$loadedMapping = $this->get('loadedMapping');
- $this->assign('loadedMapping', $loadedMapping);
if ($loadedMapping) {
$defaults['savedMapping'] = $loadedMapping;
}
$mappingArray = CRM_Core_BAO_Mapping::getCreateMappingValues('Import ' . static::IMPORT_ENTITY);
$this->assign('savedMapping', $mappingArray);
- $this->add('select', 'savedMapping', ts('Mapping Option'), ['' => ts('- select -')] + $mappingArray);
+ $this->add('select', 'savedMapping', ts('Saved Field Mapping'), ['' => ts('- select -')] + $mappingArray);
if ($loadedMapping = $this->get('loadedMapping')) {
- $this->assign('loadedMapping', $loadedMapping);
$this->setDefaults(['savedMapping' => $loadedMapping]);
}
<tr>{include file="CRM/Core/Date.tpl"}</tr>
{if $savedMapping}
<tr class="crm-activity-import-uploadfile-form-block-savedMapping">
- <td>{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</td>
+ <td>{$form.savedMapping.label}</td>
<td>{$form.savedMapping.html}<br />
<span class="description">{ts}Select Saved Mapping or Leave blank to create a new One.{/ts}</span>
{/if}
{if $savedMapping}
<tr class="crm-import-datasource-form-block-savedMapping">
- <td class="label"><label for="savedMapping">{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</label></td>
+ <td class="label"><label for="savedMapping">{$form.savedMapping.label}</label></td>
<td>{$form.savedMapping.html}<br />
<span class="description">{ts}Select Saved Mapping or Leave blank to create a new One.{/ts}</span></td>
</tr>
<td>{$form.fieldSeparator.html}</td>
</tr>
<tr>{include file="CRM/Core/Date.tpl"}</tr>
-{if $savedMapping}
- <tr> <td class="label">{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</td><td>{$form.savedMapping.html}<br /> <span class="description">{ts}Select a saved field mapping if this file format matches a previous import.{/ts}</span></tr>
-{/if}
+ {if $savedMapping}
+ <tr> <td class="label">{$form.savedMapping.label}</td><td>{$form.savedMapping.html}<br /> <span class="description">{ts}Select a saved field mapping if this file format matches a previous import.{/ts}</span></tr>
+ {/if}
</table>
<div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
</div>
</tr>
{if $savedMapping}
<tr class="crm-custom-import-uploadfile-form-block-savedMapping">
- <td class="label">{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</td>
+ <td class="label">{$form.savedMapping.label}</td>
<td><span>{$form.savedMapping.html}</span> </td>
</tr>
<tr>
</tr>
{if $savedMapping}
<tr class="crm-event-import-uploadfile-form-block-savedMapping">
- <td class="label">{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</dt>
+ <td class="label">{$form.savedMapping.label}</td>
<td><span>{$form.savedMapping.html}</span> </td>
</tr>
<tr>
<tr class="crm-member-import-uploadfile-from-block-date">{include file="CRM/Core/Date.tpl"}</tr>
{if $savedMapping}
<tr class="crm-member-import-uploadfile-from-block-savedMapping">
- <td>{if $loadedMapping}{ts}Select a Different Field Mapping{/ts}{else}{ts}Load Saved Field Mapping{/ts}{/if}</td>
+ <td>{$form.savedMapping.label}</td>
<td>{$form.savedMapping.html}<br />
<span class="description">{ts}If you want to use a previously saved import field mapping - select it here.{/ts}</span>
</td>