<section class="content-header">
    <h1><?= __('Add new download') ?></h1>

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

<section class="content">
    <div class="box box-default">
        <form data-ajax class="form-focus" action="<?= admin_url_to('/downloads/add') ?>" 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><?= __('Download') ?></h5>
                        </div>

                        <div class="col-lg-9 col-md-9 col-sm-8 col-xs-12">
                            <div class="row">
                                <div class="col-md-8">
                                    <div class="form-group">
                                        <label class="control-label" for="name"><?= __('Name') ?> <span class="required">*</span></label>
                                        <input class="form-control" type="text" name="name" id="name" />
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label class="control-label" for="size"><?= __('Size') ?> <span class="required">*</span></label>
                                        <input class="form-control" type="text" name="size" id="size" />
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="control-label" for="desc"><?= __('Description') ?></label>
                                <textarea class="form-control" name="desc" id="desc"></textarea>
                            </div>

                            <div class="form-group">
                                <label class="control-label" for="downloads-links"><?= __('Links') ?></label>

                                <div class="container-add-link">
                                    <div style="display:flex">
                                        <input class="form-control" style="width:40%;margin-right:2%" type="text" placeholder="<?= __('Name') ?>" name="links[0][name]" />
                                        <input class="form-control" style="width:58%" type="text" placeholder="<?= __('Link') ?>" name="links[0][link]" />
                                    </div>
                                </div>
                            </div>

                            <div style="text-align:right;margin-top:10px">
                                <a class="btn btn-xs btn-success add-link" href="javascript:void(0)"><?= __('Add') ?></a>
                            </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="<?= __('Save') ?>" />
                    </div>
                </div>
            </div>
        </form>
    </div>
</section>