<section class="content-header">
    <h1><?= __('Import items') ?></h1>

    <div class="actions">
        <a data-ajax class="btn btn-default" href="<?= admin_url_to('/items') ?>"><?= __('Back') ?></a>
    </div>
</section>

<section class="content">
    <div class="box box-default">
        <form data-ajax data-upload class="form-focus" action="<?= admin_url_to('/items/import') ?>" method="post">
            <?= csrf_field() ?>

            <div class="box-body">
                <div class="section">
                    <div class="row">
                        <div class="col-lg-3 col-md-3 col-sm-4 col-xs-12">
                            <h5><?= __('Import') ?></h5>
                        </div>

                        <div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
                            <div class="form-group">
                                <label class="control-label" for="items"><?= __('Items') ?> <span class="required">*</span></label>
                                <input id="items" data-upload-field class="form-control" type="file" name="items" />
                            </div>

                            <div class="form-group">
                                <label class="control-label" for="categories"><?= __('Categories') ?></span></label>

                                <div>
                                    <?php foreach (config('item.categories') as $code => $category): ?>
                                        <div style="width:33%;margin-bottom:5px;float:left">
                                            <input type="checkbox" name="categories[]" checked id="categories-<?= $code ?>" value="<?= $code ?>" /> <label for="categories-<?= $code ?>"><?= $category ?></label>
                                        </div>
                                    <?php endforeach ?>
                                </div>
                            </div>

                            <div class="clearfix"></div>

                            <div class="form-group" style="margin-top:10px;">
                                <label class="control-label" for="reprocess"><?= __('Reprocess') ?></label>
                                <div>
                                    <input class="form-control toggle" type="checkbox" id="reprocess" value="1" name="reprocess" />
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="box-footer">
                <div class="row">
                    <div class="col-sm-offset-3" style="padding-left:15px">
                        <input type="submit" class="btn btn-primary" value="<?= __('Import') ?>" />
                    </div>
                </div>
            </div>
        </form>
    </div>
</section>