summaryrefslogtreecommitdiff
path: root/app/Template/user_import/show.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-05-15 21:20:46 -0400
committerFrederic Guillot <fred@kanboard.net>2016-05-15 21:20:46 -0400
commit20052c7dd295464c7782350628701675b1f07db7 (patch)
tree5eb416262114feb864694ae05a3c04667f54f727 /app/Template/user_import/show.php
parent4eaab1f6da1a56376a840231f7b8a10469308f97 (diff)
User import is now a popover
Diffstat (limited to 'app/Template/user_import/show.php')
-rw-r--r--app/Template/user_import/show.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/app/Template/user_import/show.php b/app/Template/user_import/show.php
new file mode 100644
index 00000000..54a66237
--- /dev/null
+++ b/app/Template/user_import/show.php
@@ -0,0 +1,41 @@
+<div class="page-header">
+ <h2><?= t('Import users from CSV file') ?></h2>
+ <ul>
+ <li>
+ <i class="fa fa-download fa-fw"></i>
+ <?= $this->url->link(t('Download CSV template'), 'UserImportController', 'template') ?>
+ </li>
+ </ul>
+</div>
+
+<div class="alert">
+ <ul>
+ <li><?= t('Your file must use the predefined CSV format') ?></li>
+ <li><?= t('Your file must be encoded in UTF-8') ?></li>
+ <li><?= t('The first row must be the header') ?></li>
+ <li><?= t('Duplicates are not imported') ?></li>
+ <li><?= t('Usernames must be lowercase and unique') ?></li>
+ <li><?= t('Passwords will be encrypted if present') ?></li>
+ </ul>
+</div>
+
+<form action="<?= $this->url->href('UserImportController', 'save') ?>" method="post" enctype="multipart/form-data">
+ <?= $this->form->csrf() ?>
+
+ <?= $this->form->label(t('Delimiter'), 'delimiter') ?>
+ <?= $this->form->select('delimiter', $delimiters, $values) ?>
+
+ <?= $this->form->label(t('Enclosure'), 'enclosure') ?>
+ <?= $this->form->select('enclosure', $enclosures, $values) ?>
+
+ <?= $this->form->label(t('CSV File'), 'file') ?>
+ <?= $this->form->file('file', $errors) ?>
+
+ <p class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></p>
+
+ <div class="form-actions">
+ <button type="submit" class="btn btn-blue"><?= t('Import') ?></button>
+ <?= t('or') ?>
+ <?= $this->url->link(t('cancel'), 'user', 'index', array(), false, 'close-popover') ?>
+ </div>
+</form>