Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
5 | | This work is published under the GNU AGPLv3 license with some | |
6 | | permitted exceptions and without any warranty. For full license | | |
7 | | and copyright information, see https://civicrm.org/licensing | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {* Membership Import Wizard - Data Mapping table used by MapFields.tpl and Preview.tpl *} | |
11 | ||
12 | <div id="map-field"> | |
13 | {strip} | |
14 | <table> | |
15 | {if $loadedMapping} | |
16 | <tr class="columnheader-dark"><th colspan="4">{ts 1=$savedName}Saved Field Mapping: %1{/ts}</td></tr> | |
17 | {/if} | |
18 | <tr class="columnheader"> | |
19 | {section name=rows loop=$rowDisplayCount} | |
20 | {if $skipColumnHeader } | |
21 | { if $smarty.section.rows.iteration == 1 } | |
22 | <th>{ts}Column Headers{/ts}</th> | |
23 | {else} | |
24 | <th>{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}</th> | |
25 | {/if} | |
26 | {else} | |
27 | <th>{ts 1=$smarty.section.rows.iteration}Import Data (row %1){/ts}</th> | |
28 | {/if} | |
29 | {/section} | |
30 | ||
31 | <th>{ts}Matching CiviCRM Field{/ts}</th> | |
32 | </tr> | |
33 | ||
34 | {*Loop on columns parsed from the import data rows*} | |
35 | {section name=cols loop=$columnCount} | |
36 | {assign var="i" value=$smarty.section.cols.index} | |
37 | <tr style="border-bottom: 1px solid #92B6EC;"> | |
38 | ||
39 | {section name=rows loop=$rowDisplayCount} | |
40 | {assign var="j" value=$smarty.section.rows.index} | |
54f6fd78 | 41 | <td class="{if $skipColumnHeader AND $smarty.section.rows.iteration == 1}even-row labels{else}odd-row{/if}">{$dataValues[$j][$i]|escape}</td> |
6a488035 TO |
42 | {/section} |
43 | ||
44 | {* Display mapper <select> field for 'Map Fields', and mapper value for 'Preview' *} | |
45 | <td class="form-item even-row{if $wizard.currentStepName == 'Preview'} labels{/if}"> | |
46 | {if $wizard.currentStepName == 'Preview'} | |
47 | {$mapper[$i]} | |
48 | {else} | |
b0d4639d | 49 | {$form.mapper[$i].html|smarty:nodefaults} |
6a488035 TO |
50 | {/if} |
51 | </td> | |
52 | ||
53 | </tr> | |
54 | {/section} | |
55 | ||
56 | </table> | |
57 | {/strip} | |
58 | ||
59 | {if $wizard.currentStepName != 'Preview'} | |
60 | <div> | |
61 | ||
62 | {if $loadedMapping} | |
63 | <span>{$form.updateMapping.html} {$form.updateMapping.label}</span> | |
64 | {/if} | |
65 | <span>{$form.saveMapping.html} {$form.saveMapping.label}</span> | |
66 | <div id="saveDetails" class="form-item"> | |
67 | <table class="form-layout-compressed"> | |
68 | <tr class="crm-membership-form-block-saveMappingName"> | |
69 | <td>{$form.saveMappingName.label}</td><td>{$form.saveMappingName.html}</td> | |
70 | </tr> | |
71 | <tr class="crm-membership-form-block-saveMappingDesc"> | |
72 | <td>{$form.saveMappingDesc.label}</td><td>{$form.saveMappingDesc.html}</td> | |
73 | </tr> | |
74 | </table> | |
75 | </div> | |
76 | <script type="text/javascript"> | |
77 | {if $mappingDetailsError } | |
78 | cj('#saveDetails').show(); | |
79 | {else} | |
80 | cj('#saveDetails').hide(); | |
81 | {/if} | |
82 | ||
83 | {literal} | |
84 | function showSaveDetails(chkbox) { | |
85 | if (chkbox.checked) { | |
86 | document.getElementById("saveDetails").style.display = "block"; | |
87 | document.getElementById("saveMappingName").disabled = false; | |
88 | document.getElementById("saveMappingDesc").disabled = false; | |
89 | } else { | |
90 | document.getElementById("saveDetails").style.display = "none"; | |
91 | document.getElementById("saveMappingName").disabled = true; | |
92 | document.getElementById("saveMappingDesc").disabled = true; | |
93 | } | |
94 | } | |
95 | {/literal} | |
96 | {include file="CRM/common/highLightImport.tpl"} | |
97 | </script> | |
98 | </div> | |
99 | {/if} | |
100 | </div> |