{#
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 = ['setting', 'system', 'member'] %}

{% block title %}{{ 'admin.setting.system.member.member_registration'|trans }}{% endblock %}
{% block sub_title %}{{ 'admin.setting.system'|trans }}{% endblock %}

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

{% block main %}
    <form name="member_form" role="form" id="member_form" method="post" action="" novalidate>
        {{ 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">
                            <div class="row">
                                <div class="col-8"><span class="card-title">{{ 'admin.setting.system.member.member_registration'|trans }}</span></div>
                                <div class="col-4 text-right">
                                    <a data-toggle="collapse" href="#memberInfo" aria-expanded="false" aria-controls="memberInfo">
                                        <i class="fa fa-angle-up fa-lg"></i>
                                    </a>
                                </div>
                            </div>
                        </div>
                        <div class="collapse show ec-cardCollapse" id="memberInfo">
                            <div class="card-body">
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <span>{{ 'admin.setting.system.member.name'|trans }}</span>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.name) }}
                                            </div>
                                            {{ form_errors(form.name) }}
                                        </div>
                                    </div>
                                </div>

                                <div class="row mb-2">
                                    <div class="col-3">
                                        <span>{{ 'admin.setting.system.member.department'|trans }}</span>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.department) }}
                                            </div>
                                            {{ form_errors(form.department) }}
                                        </div>
                                    </div>
                                </div>
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <span>{{ 'admin.setting.system.member.login_id'|trans }}</span>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.login_id) }}
                                            </div>
                                            {{ form_errors(form.login_id) }}
                                        </div>
                                    </div>
                                </div>
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <span>{{ 'admin.setting.system.member.password'|trans }}</span>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.password.first, { type : 'password'}) }}
                                            </div>
                                            {{ form_errors(form.password.first) }}
                                        </div>
                                    </div>
                                </div>
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <span>{{ 'admin.setting.system.member.password_confirm'|trans }}</span>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.password.second, { type : 'password'}) }}
                                            </div>
                                            {{ form_errors(form.password.second) }}
                                        </div>
                                    </div>
                                </div>
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <div class="d-inline-block" data-tooltip="true" data-placement="top" title="{{ 'tooltip.setting.system.member.authority'|trans }}">
                                            <span>{{ 'admin.common.authority'|trans }}</span>
                                            <i class="fa fa-question-circle fa-lg ml-1"></i>
                                        </div>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        <div class="row">
                                            <div class="col">
                                                {{ form_widget(form.Authority) }}
                                            </div>
                                            {{ form_errors(form.Authority) }}
                                        </div>
                                    </div>
                                </div>
                                <div class="row mb-2">
                                    <div class="col-3">
                                        <div class="d-inline-block" data-tooltip="true" data-placement="top" title="{{ 'tooltip.setting.system.member.work'|trans }}">
                                            <span>{{ 'admin.setting.system.member.work'|trans }}</span>
                                            <i class="fa fa-question-circle fa-lg ml-1"></i>
                                        </div>
                                        <span class="badge badge-primary ml-1">{{ 'admin.common.required'|trans }}</span>
                                    </div>
                                    <div class="col">
                                        {{ form_widget(form.Work, {'attr': {'class': 'form-check-inline'}}) }}
                                        {{ form_errors(form.Work) }}
                                    </div>
                                </div>
                                {# エンティティ拡張の自動出力 #}
                                {% for f in form if f.vars.eccube_form_options.auto_render %}
                                    {% if f.vars.eccube_form_options.form_theme %}
                                        {% form_theme f f.vars.eccube_form_options.form_theme %}
                                        {{ form_row(f) }}
                                    {% else %}
                                        <div class="row mb-2">
                                            <div class="col-3">
                                                <span>{{ f.vars.label|trans }}</span>
                                            </div>
                                            <div class="col">
                                                {{ form_widget(f) }}
                                                {{ form_errors(f) }}
                                            </div>
                                        </div>
                                    {% endif %}
                                {% endfor %}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="c-conversionArea">
            <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_setting_system_member') }}">
                                <i class="fa fa-backward" aria-hidden="true"></i>
                                <span>{{ 'admin.setting.system.member_management'|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 %}




