|
188 | 188 | <div class="dt-import-initial-content"> |
189 | 189 | <h2>Step 1: Select Record Type</h2> |
190 | 190 | <p>Choose the type of records you want to import from your CSV file.</p> |
191 | | - |
| 191 | +
|
192 | 192 | <div class="post-type-grid"> |
193 | 193 | <!-- Post type cards will be dynamically populated --> |
194 | 194 | </div> |
|
214 | 214 | <div class="dt-import-step-content"> |
215 | 215 | <h2>${window.dt_admin_shared.escape(dtImport.translations.uploadCsv)}</h2> |
216 | 216 | <p>Upload a CSV file containing ${window.dt_admin_shared.escape(this.getPostTypeLabel())} data.</p> |
217 | | - |
| 217 | +
|
218 | 218 | <div class="file-upload-section"> |
219 | 219 | <div class="file-upload-area"> |
220 | 220 | <div class="upload-icon"> |
|
226 | 226 | </div> |
227 | 227 | </div> |
228 | 228 | <input type="file" id="csv-file-input" accept=".csv" style="display: none;"> |
229 | | - |
| 229 | +
|
230 | 230 | <div class="file-info" style="display: none;"> |
231 | 231 | <div class="file-details"> |
232 | 232 | <h4></h4> |
|
488 | 488 | <div class="dt-import-step-content"> |
489 | 489 | <h2>${window.dt_admin_shared.escape(dtImport.translations.mapFields)}</h2> |
490 | 490 | <p>Map each CSV column to the appropriate field in Disciple.Tools.</p> |
491 | | - |
| 491 | +
|
492 | 492 | <div class="name-field-warning" style="display: none;"> |
493 | 493 | <div class="notice notice-error"> |
494 | 494 | <p><strong><i class="mdi mdi-alert"></i> Name Field Required</strong></p> |
495 | 495 | <p>The name field is required for all imports. Please map at least one CSV column to the name field before proceeding.</p> |
496 | 496 | </div> |
497 | 497 | </div> |
498 | | - |
| 498 | +
|
499 | 499 | <div class="mapping-container"> |
500 | 500 | <div class="mapping-columns"> |
501 | 501 | ${columnsHtml} |
502 | 502 | </div> |
503 | 503 | </div> |
504 | | - |
| 504 | +
|
505 | 505 | <div class="mapping-summary" style="display: none;"> |
506 | 506 | <h3>Mapping Summary</h3> |
507 | 507 | <div class="summary-stats"></div> |
|
631 | 631 | : '' |
632 | 632 | } |
633 | 633 | </div> |
634 | | - |
| 634 | +
|
635 | 635 | <div class="sample-data"> |
636 | 636 | <strong>Sample data:</strong> |
637 | 637 | <ul>${sampleDataHtml}</ul> |
638 | 638 | </div> |
639 | | - |
| 639 | +
|
640 | 640 | <div class="mapping-controls"> |
641 | 641 | <label>Map to field:</label> |
642 | 642 | <select class="field-mapping-select" data-column-index="${window.dt_admin_shared.escape(columnIndex)}"> |
643 | 643 | <option value="">-- Do not import --</option> |
644 | 644 | ${this.getFieldOptions(finalSelectedField)} |
645 | 645 | <option value="create_new">+ Create New Field</option> |
646 | 646 | </select> |
647 | | - |
| 647 | +
|
648 | 648 | <div class="field-specific-options" style="display: none;"></div> |
649 | 649 | </div> |
650 | 650 | </div> |
|
1271 | 1271 | <div class="dt-import-step-content"> |
1272 | 1272 | <h2>${window.dt_admin_shared.escape(dtImport.translations.previewImport)}</h2> |
1273 | 1273 | <p>Review the data before importing ${window.dt_admin_shared.escape(previewData.total_rows)} records.</p> |
1274 | | - |
| 1274 | +
|
1275 | 1275 | ${ |
1276 | 1276 | previewData.is_estimated |
1277 | 1277 | ? ` |
|
1281 | 1281 | ` |
1282 | 1282 | : '' |
1283 | 1283 | } |
1284 | | - |
| 1284 | +
|
1285 | 1285 | <div class="preview-stats"> |
1286 | 1286 | <div class="stat-card"> |
1287 | 1287 | <h3>${window.dt_admin_shared.escape(previewData.total_rows)}</h3> |
|
1306 | 1306 | <p>Errors</p> |
1307 | 1307 | </div> |
1308 | 1308 | </div> |
1309 | | - |
| 1309 | +
|
1310 | 1310 | ${ |
1311 | 1311 | previewData.is_estimated |
1312 | 1312 | ? ` |
1313 | 1313 | <p style="font-size: 12px; color: #666; margin-top: 5px;"><em>* Estimated values based on sampling</em></p> |
1314 | 1314 | ` |
1315 | 1315 | : '' |
1316 | 1316 | } |
1317 | | - |
| 1317 | +
|
1318 | 1318 | ${ |
1319 | 1319 | totalErrors > 0 |
1320 | 1320 | ? ` |
|
1327 | 1327 | ` |
1328 | 1328 | : '' |
1329 | 1329 | } |
1330 | | - |
| 1330 | +
|
1331 | 1331 | ${ |
1332 | 1332 | totalWarnings > 0 |
1333 | 1333 | ? ` |
|
1340 | 1340 | ` |
1341 | 1341 | : '' |
1342 | 1342 | } |
1343 | | - |
| 1343 | +
|
1344 | 1344 | <div class="preview-table-container"> |
1345 | 1345 | ${this.createPreviewTable(previewData.rows)} |
1346 | 1346 | </div> |
|
1592 | 1592 | : '' |
1593 | 1593 | } |
1594 | 1594 | </div> |
1595 | | - |
| 1595 | +
|
1596 | 1596 | ${ |
1597 | 1597 | results.imported_records && |
1598 | 1598 | results.imported_records.length > 0 |
|
1629 | 1629 | ` |
1630 | 1630 | : '' |
1631 | 1631 | } |
1632 | | - |
| 1632 | +
|
1633 | 1633 | ${ |
1634 | 1634 | results.errors && results.errors.length > 0 |
1635 | 1635 | ? ` |
|
1648 | 1648 | ` |
1649 | 1649 | : '' |
1650 | 1650 | } |
1651 | | - |
| 1651 | +
|
1652 | 1652 | <div class="results-actions"> |
1653 | 1653 | <button type="button" class="button button-primary" onclick="location.reload()"> |
1654 | 1654 | Start New Import |
|
0 commit comments