{#
This file is part of EC-CUBE

Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.

http://www.ec-cube.co.jp/

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% extends '@admin/default_frame.twig' %}

{% set menus = ['store', 'template', 'template_install'] %}

{% block title %}{{ 'admin.store.template.template_install__page_title'|trans }}{% endblock %}
{% block sub_title %}{{ 'admin.store'|trans }}{% endblock %}

{% form_theme form '@admin/Form/bootstrap_4_horizontal_layout.html.twig' %}

{% block main %}
    <form role="form" class="form-horizontal" name="form1" id="form1" method="post" action="{{ url('admin_store_template_install') }}" enctype="multipart/form-data">
        {{ form_widget(form._token) }}
        <div class="c-contentsArea__cols">
            <div class="c-contentsArea__primaryCol">
                <div class="c-primaryCol">
                    <div class="card rounded border-0 mb-4">
                        <div class="card-header"><span class="card-title">{{ 'admin.store.template.upload_new_template'|trans }}</span></div>
                        <div class="card-body">
                            <div class="row mb-2">
                                <div class="col-2"><span>{{ 'admin.store.template.template_code'|trans }}</span><i class="fa fa-question-circle fa-lg ml-1"></i></div>
                                <div class="col-10">
                                    {{ form_widget(form.code) }}
                                    {{ form_errors(form.code) }}
                                </div>
                            </div>

                            <div class="row mb-2">
                                <div class="col-2"><span>{{ 'admin.store.template.template_name'|trans }}</span><i class="fa fa-question-circle fa-lg ml-1"></i></div>
                                <div class="col-10">
                                    {{ form_widget(form.name) }}
                                    {{ form_errors(form.name) }}
                                </div>
                            </div>

                            <div class="row mb-2">
                                <div class="col-2"><span>{{ 'admin.store.template.template_file'|trans }}</span><i class="fa fa-question-circle fa-lg ml-1"></i>
                                    <br>{{ 'admin.store.template.file_format'|trans }}
                                </div>
                                <div class="col-10">
                                    {{ form_widget(form.file, {'attr': {'accept': 'application/zip,application/x-tar,application/x-gzip'}}) }}
                                    {{ form_errors(form.file) }}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="c-conversionArea" id="aside_column">
            <div class="c-conversionArea__container">
                <div class="row justify-content-between align-items-center">
                    <div class="col-6">
                        <div class="c-conversionArea__leftBlockItem">
                            <a class="c-baseLink" href="{{ url('admin_store_template') }}">
                                <i class="fa fa-backward" aria-hidden="true"></i><span>{{ 'common.back'|trans }}</span>
                            </a>
                        </div>
                    </div>
                    <div class="col-6">
                        <div id="ex-conversion-action" class="row align-items-center justify-content-end">
                            <div class="col-auto">
                                <button class="btn btn-ec-conversion px-5" type="submit">{{ 'admin.common.registration'|trans }}</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
{% endblock %}
