Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ $RECYCLE.BIN/
*.lnk

# End of https://www.gitignore.io/api/linux,macos,windows,phpstorm,visualstudiocode,composer,node

# PHPUnit
.phpunit.result.cache
43 changes: 40 additions & 3 deletions admin/views/Import/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,24 @@

/**
* @var array<int, string|Closure|Field> $additionalFields
* @var bool $bTemplateUnusable
*/

/**
* The controller has already reported why; offering a form which cannot work
* would only invite an upload that is certain to be rejected.
*/
if (!empty($bTemplateUnusable)) {
?>
<div class="module-auth import">
<p class="alert alert-danger">
User import is unavailable until the template is corrected.
</p>
</div>
<?php
return;
}

?>
<div class="module-auth import">
<?=form_open_multipart()?>
Expand All @@ -29,6 +45,8 @@
<p class="alert alert-info">
<strong>Please note:</strong> The CSV you supply should be in the correct format, as per the template
which you can download above. Remember to include the header rows describing each column.
<br>Every row is validated when you upload; if any of them cannot be imported the file is rejected
and nothing is created, so you can correct it and try again.
</p>
</fieldset>
<?php
Expand Down Expand Up @@ -66,13 +84,32 @@

echo Helper::floatingControls([
'save' => [
'text' => 'Preview',
'name' => 'action',
'value' => 'preview',
'text' => 'Upload &amp; Preview',
],
]);

echo form_close();

?>
<div id="user-import-list" class="hidden">
<hr>
<h2>Recent Imports</h2>
<div class="table-responsive">
<table>
<thead>
<tr>
<th class="field field--id">ID</th>
<th class="field field--file">File</th>
<th class="field field--status">Status</th>
<th class="field field--progress">Progress</th>
<th class="field field--requested">Requested</th>
<th class="field field--finished">Finished</th>
<th class="actions">Actions</th>
</tr>
</thead>
<tbody id="user-import-list-body">
</tbody>
</table>
</div>
</div>
</div>
Loading
Loading