2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 <div class="crm-block crm-form-block crm-import-preview-form-block">
29 <script type="text/javascript">
30 function setIntermediate( ) {
31 var dataUrl = "{/literal}{$statusUrl}{literal}";
32 cj.getJSON( dataUrl, function( response ) {
34 var dataStr = response.toString();
35 var result = dataStr.split(",");
36 cj("#intermediate").html( result[1] );
37 if( result[0] < 100 ){
38 cj("#importProgressBar .ui-progressbar-value").animate({width: result[0]+"%"}, 500);
39 cj("#status").text( result[0]+"% Completed");
46 window.setTimeout( pollLoop, 10*1000 ); // 10 sec
50 if (! confirm('Backing up your database before importing is recommended, as there is no Undo for this. {/literal}{ts escape='js'}Are you sure you want to Import now{/ts}{literal}?') ) {
54 cj("#id-processing").show( ).dialog({
60 closeOnEscape : false,
62 cj("#id-processing").dialog().parents(".ui-dialog").find(".ui-dialog-titlebar").remove();
65 cj("#importProgressBar" ).progressbar({value:0});
66 cj("#importProgressBar").show( );
72 {* Import Wizard - Step 3 (preview import results prior to actual data loading) *}
73 {* @var $form Contains the array for the form elements and other form associated information assigned to the template by the controller *}
75 {* WizardHeader.tpl provides visual display of steps thru the wizard as well as title for current step *}
76 {include file="CRM/common/WizardHeader.tpl"}
79 {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}
84 {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}
88 {if $conflictRowCount}
90 {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}
94 <p>{ts}Click 'Import Now' if you are ready to proceed.{/ts}</p>
96 <div class="crm-submit-buttons">{include file="CRM/common/formButtons.tpl" location="top"}</div>
97 {* Import Progress Bar and Info *}
98 <div id="id-processing" class="hiddenElement">
99 <h3>Importing records...</h3><br />
100 <div id="status" style="margin-left:6px;"></div>
101 <div class="progressBar" id="importProgressBar" style="margin-left:6px;display:none;"></div>
102 <div id="intermediate"></div>
103 <div id="error_status"></div>
106 <div id="preview-info">
107 {* Summary Preview (record counts) *}
108 <table id="preview-counts" class="report">
109 <tr><td class="label">{ts}Total Rows{/ts}</td>
110 <td class="data">{$totalRowCount}</td>
111 <td class="explanation">{ts}Total number of rows in the imported data.{/ts}</td>
114 {if $invalidRowCount}
115 <tr class="error"><td class="label">{ts}Rows with Errors{/ts}</td>
116 <td class="data">{$invalidRowCount}</td>
117 <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}
118 {if $invalidRowCount}
119 <div class="action-link"><a href="{$downloadErrorRecordsUrl}">» {ts}Download Errors{/ts}</a></div>
125 {if $conflictRowCount}
126 <tr class="error"><td class="label">{ts}Conflicting Rows{/ts}</td>
127 <td class="data">{$conflictRowCount}</td>
128 <td class="explanation">{ts}Rows with conflicting email addresses within this file. These rows will be skipped (not imported).{/ts}
129 {if $conflictRowCount}
130 <div class="action-link"><a href="{$downloadConflictRecordsUrl}">» {ts}Download Conflicts{/ts}</a></div>
137 <td class="label">{ts}Valid Rows{/ts}</td>
138 <td class="data">{$validRowCount}</td>
139 <td class="explanation">{ts}Total rows to be imported.{/ts}</td>
143 {* Table for mapping preview *}
144 {include file="CRM/Contact/Import/Form/MapTable.tpl"}
148 <div id="new-group" class="crm-accordion-wrapper collapsed">
149 <div class="crm-accordion-header">
150 {ts}Add imported records to a new group{/ts}
151 </div><!-- /.crm-accordion-header -->
152 <div class="crm-accordion-body">
153 <table class="form-layout-compressed">
155 <td class="description label">{$form.newGroupName.label}</td>
156 <td>{$form.newGroupName.html}</td>
159 <td class="description label">{$form.newGroupDesc.label}</td>
160 <td>{$form.newGroupDesc.html}</td>
163 </div><!-- /.crm-accordion-body -->
164 </div><!-- /.crm-accordion-wrapper -->
169 <div id="existing-groups" class="crm-accordion-wrapper crm-existing_group-accordion {if $form.groups} {else}collapsed{/if}">
170 <div class="crm-accordion-header">
172 </div><!-- /.crm-accordion-header -->
173 <div class="crm-accordion-body">
175 <div class="form-item">
176 <table><tr><td style="width: 14em;"></td><td>{$form.groups.html}</td></tr></table>
178 </div><!-- /.crm-accordion-body -->
179 </div><!-- /.crm-accordion-wrapper -->
183 <div id="new-tag" class="crm-accordion-wrapper collapsed">
184 <div class="crm-accordion-header">
185 {ts}Create a new tag and assign it to imported records{/ts}
186 </div><!-- /.crm-accordion-header -->
187 <div class="crm-accordion-body">
189 <div class="form-item">
190 <table class="form-layout-compressed">
192 <td class="description label">{$form.newTagName.label}</td>
193 <td>{$form.newTagName.html}</td>
196 <td class="description label">{$form.newTagDesc.label}</td>
197 <td>{$form.newTagDesc.html}</td>
201 </div><!-- /.crm-accordion-body -->
202 </div><!-- /.crm-accordion-wrapper -->
203 {* Existing Tag Imported Contact *}
205 <div id="existing-tags" class="crm-accordion-wrapper collapsed">
206 <div class="crm-accordion-header">
207 {ts}Tag imported records{/ts}
208 </div><!-- /.crm-accordion-header -->
209 <div class="crm-accordion-body">
211 <table class="form-layout-compressed">
212 <tr><td style="width: 14em;"></td>
213 <td class="listing-box" style="margin-bottom: 0em; width: 15em;">
214 {foreach from=$form.tag item="tag_val"}
215 <div>{$tag_val.html}</div>
220 </div><!-- /.crm-accordion-body -->
221 </div><!-- /.crm-accordion-wrapper -->
222 </div> {* End of preview-info div. We hide this on form submit. *}
224 <div class="crm-submit-buttons">
225 {include file="CRM/common/formButtons.tpl" location="bottom"}
230 <script type="text/javascript">
232 {/literal}{if $invalidGroupName}{literal}
233 cj("#new-group.collapsed").crmAccordionToggle();
234 {/literal}{/if}{literal}
236 {/literal}{if $invalidTagName}{literal}
237 cj("#new-tag.collapsed").crmAccordionToggle();
238 {/literal}{/if}{literal}