summaryrefslogtreecommitdiff
path: root/app/Template/user_import/step1.php
blob: 69643d6df408438c37725837a3957046613000f5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<section id="main">
    <div class="page-header">
        <?php if ($this->user->hasAccess('user', 'create')): ?>
        <ul>
            <li><i class="fa fa-user fa-fw"></i><?= $this->url->link(t('All users'), 'user', 'index') ?></li>
            <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New local user'), 'user', 'create') ?></li>
            <li><i class="fa fa-plus fa-fw"></i><?= $this->url->link(t('New remote user'), 'user', 'create', array('remote' => 1)) ?></li>
        </ul>
        <?php endif ?>
    </div>
    <div class="page-header">
        <h2><?= t('Import') ?></h2>
    </div>
    <form action="<?= $this->url->href('userImport', 'step2') ?>" 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">
            <input type="submit" value="<?= t('Import') ?>" class="btn btn-blue">
        </div>
    </form>
    <div class="page-header">
        <h2><?= t('Instructions') ?></h2>
    </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>
    <p><i class="fa fa-download fa-fw"></i><?= $this->url->link(t('Download CSV template'), 'userImport', 'template') ?></p>
</section>