Add progress bar for all import process
[civicrm-core.git] / templates / CRM / Contact / Import / Form / Preview.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2017 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 <div class="crm-block crm-form-block crm-import-preview-form-block">
27 {* Import Wizard - Step 3 (preview import results prior to actual data loading) *}
28 {* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
29
30 {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
31 {include file="CRM/common/WizardHeader.tpl"}
32 <div class="help">
33 <p>
34 {ts}The information below previews the results of importing your data in CiviCRM. Review the totals to ensure that they represent your expected results.{/ts}
35 </p>
36
37 {if $invalidRowCount}
38 <p class="error">
39 {ts 1=$invalidRowCount 2=$downloadErrorRecordsUrl}CiviCRM has detected invalid data or formatting errors in %1 records. If you continue, these records will be skipped. OR, you can download a file with just these problem records - <a href='%2'>Download Errors</a>. Then correct them in the original import file, cancel this import and begin again at step 1.{/ts}
40 </p>
41 {/if}
42
43 {if $conflictRowCount}
44 <p class="error">
45 {ts 1=$conflictRowCount 2=$downloadConflictRecordsUrl}CiviCRM has detected %1 records with conflicting email addresses within this data file. If you continue, these records will be skipped. OR, you can download a file with just these problem records - <a href='%2'>Download Conflicts</a>. Then correct them in the original import file, cancel this import and begin again at step 1.{/ts}
46 </p>
47 {/if}
48
49 <p>{ts}Click 'Import Now' if you are ready to proceed.{/ts}</p>
50 </div>
51 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
52 {include file="CRM/common/importProgress.tpl"}
53
54 <div id="preview-info">
55 {* Summary Preview (record counts) *}
56 <table id="preview-counts" class="report">
57 <tr><td class="label">{ts}Total Rows{/ts}</td>
58 <td class="data">{$totalRowCount}</td>
59 <td class="explanation">{ts}Total number of rows in the imported data.{/ts}</td>
60 </tr>
61
62 {if $invalidRowCount}
63 <tr class="error"><td class="label">{ts}Rows with Errors{/ts}</td>
64 <td class="data">{$invalidRowCount}</td>
65 <td class="explanation">{ts}Rows with invalid data in one or more fields (for example, invalid email address formatting). These rows will be skipped (not imported).{/ts}
66 {if $invalidRowCount}
67 <div class="action-link"><a href="{$downloadErrorRecordsUrl}">&raquo; {ts}Download Errors{/ts}</a></div>
68 {/if}
69 </td>
70 </tr>
71 {/if}
72
73 {if $conflictRowCount}
74 <tr class="error"><td class="label">{ts}Conflicting Rows{/ts}</td>
75 <td class="data">{$conflictRowCount}</td>
76 <td class="explanation">{ts}Rows with conflicting email addresses within this file. These rows will be skipped (not imported).{/ts}
77 {if $conflictRowCount}
78 <div class="action-link"><a href="{$downloadConflictRecordsUrl}">&raquo; {ts}Download Conflicts{/ts}</a></div>
79 {/if}
80 </td>
81 </tr>
82 {/if}
83
84 <tr>
85 <td class="label">{ts}Valid Rows{/ts}</td>
86 <td class="data">{$validRowCount}</td>
87 <td class="explanation">{ts}Total rows to be imported.{/ts}</td>
88 </tr>
89 </table>
90
91 {* Table for mapping preview *}
92 {include file="CRM/Contact/Import/Form/MapTable.tpl"}
93
94 {* Group options *}
95 {* New Group *}
96 <div id="new-group" class="crm-accordion-wrapper collapsed">
97 <div class="crm-accordion-header">
98 {ts}Add imported records to a new group{/ts}
99 </div><!-- /.crm-accordion-header -->
100 <div class="crm-accordion-body">
101 <table class="form-layout-compressed">
102 <tr>
103 <td class="description label">{$form.newGroupName.label}</td>
104 <td>{$form.newGroupName.html}</td>
105 </tr>
106 <tr>
107 <td class="description label">{$form.newGroupDesc.label}</td>
108 <td>{$form.newGroupDesc.html}</td>
109 </tr>
110 <tr>
111 <td class="description label">{$form.newGroupType.label}</td>
112 <td>{$form.newGroupType.html}</td>
113 </tr>
114 </table>
115 </div><!-- /.crm-accordion-body -->
116 </div><!-- /.crm-accordion-wrapper -->
117
118
119 {* Existing Group *}
120
121 <div id="existing-groups" class="crm-accordion-wrapper crm-existing_group-accordion {if $form.groups} {else}collapsed{/if}">
122 <div class="crm-accordion-header">
123 {$form.groups.label}
124 </div><!-- /.crm-accordion-header -->
125 <div class="crm-accordion-body">
126
127 <div class="form-item">
128 <table><tr><td style="width: 14em;"></td><td>{$form.groups.html}</td></tr></table>
129 </div>
130 </div><!-- /.crm-accordion-body -->
131 </div><!-- /.crm-accordion-wrapper -->
132
133 {* Tag options *}
134 {* New Tag *}
135 <div id="new-tag" class="crm-accordion-wrapper collapsed">
136 <div class="crm-accordion-header">
137 {ts}Create a new tag and assign it to imported records{/ts}
138 </div><!-- /.crm-accordion-header -->
139 <div class="crm-accordion-body">
140
141 <div class="form-item">
142 <table class="form-layout-compressed">
143 <tr>
144 <td class="description label">{$form.newTagName.label}</td>
145 <td>{$form.newTagName.html}</td>
146 </tr>
147 <tr>
148 <td class="description label">{$form.newTagDesc.label}</td>
149 <td>{$form.newTagDesc.html}</td>
150 </tr>
151 </table>
152 </div>
153 </div><!-- /.crm-accordion-body -->
154 </div><!-- /.crm-accordion-wrapper -->
155 {* Existing Tag Imported Contact *}
156
157 <div id="existing-tags" class="crm-accordion-wrapper collapsed">
158 <div class="crm-accordion-header">
159 {ts}Tag imported records{/ts}
160 </div><!-- /.crm-accordion-header -->
161 <div class="crm-accordion-body">
162
163 <table class="form-layout-compressed">
164 <tr><td style="width: 14em;"></td>
165 <td class="listing-box" style="margin-bottom: 0em; width: 15em;">
166 {foreach from=$form.tag item="tag_val"}
167 <div>{$tag_val.html}</div>
168 {/foreach}
169 </td>
170 </tr>
171 </table>
172 </div><!-- /.crm-accordion-body -->
173 </div><!-- /.crm-accordion-wrapper -->
174 </div> {* End of preview-info div. We hide this on form submit. *}
175
176 <div class="crm-submit-buttons">
177 {include file="CRM/common/formButtons.tpl" location="bottom"}
178 </div>
179 </div>
180
181 {literal}
182 <script type="text/javascript">
183
184 {/literal}{if $invalidGroupName}{literal}
185 cj("#new-group.collapsed").crmAccordionToggle();
186 {/literal}{/if}{literal}
187
188 {/literal}{if $invalidTagName}{literal}
189 cj("#new-tag.collapsed").crmAccordionToggle();
190 {/literal}{/if}{literal}
191
192 </script>
193 {/literal}