{% extends "layout_login.phtml" %}

{% block meta_title %}{{ 'Login'|trans }}{% endblock %}

{% block content %}

<!-- Login form area -->
<div class="loginWrapper">
    <div class="loginLogo"><img src="{{ guest.system_company.logo_url }}" alt="" style="max-height: 75px"/></div>
    <div class="loginPanel">
        {% if create_admin %}
        <div class="head"><h5 class="iUser">{{ 'Create main administrator account'|trans }}</h5></div>
        <form class="mainForm api-form" action="{{ 'api/guest/staff/create'|link }}" method="post" data-api-redirect="{{ 'index'|alink }}">
            <fieldset>
                <div class="loginRow noborder">
                    <label for="req1">{{ 'Email'|trans }}:</label>
                    <div class="loginInput"><input id="req1" type="email" name="email" value="{{ request.email }}" placeholder="{{ 'Enter your email address'|trans }}"/></div>
                    <div class="fix"></div>
                </div>
                
                <div class="loginRow">
                    <label for="req2">{{ 'Password'|trans }}:</label>
                    <div class="loginInput"><input id="req2" type="password" name="password" value="{{ request.password }}" placeholder="{{ 'Enter your password'|trans }}"/></div>
                    <div class="fix"></div>
                </div>
                
                <div class="loginRow">
                    <input type="submit" value="{{ 'Create administrator account'|trans }}" class="greyishBtn submitForm" />
                    <div class="fix"></div>
                </div>
            </fieldset>
        </form>
        {% else %}
        <div class="head">
            <h5 class="iUser"><i class="dark-sprite-icon sprite-user" style="margin-left: -25px; margin-right: 11px;"></i>{{ 'Login'|trans }}</h5>
        </div>
        <form class="mainForm api-form" action="{{ 'api/guest/staff/login'|link }}" method="post" data-api-redirect="{{ 'index'|alink }}">
            <fieldset>
                <div class="loginRow noborder">
                    <label for="req1">{{ 'Email'|trans }}:</label>
                    <div class="loginInput"><input id="req1" type="email" name="email" value="{{ request.email }}" placeholder="{{ 'Enter your email address'|trans }}" autofocus/></div>
                    <div class="fix"></div>
                </div>
                
                <div class="loginRow">
                    <label for="req2">{{ 'Password'|trans }}:</label>
                    <div class="loginInput"><input id="req2" type="password" name="password" value="{{ request.password }}" placeholder="{{ 'Enter your password'|trans }}"/></div>
                    <div class="fix"></div>
                </div>
                
                <div class="loginRow">
                    <div class="rememberMe"><input type="checkbox" id="remember" name="remember" value="1" checked="checked"/><label for="remember">{{ 'Remember me'|trans }}</label></div>
                    <input type="submit" value="{{ 'Log me in'|trans }}" class="greyishBtn submitForm" />
                    <div class="fix"></div>
                </div>
            </fieldset>
        </form>
        {% endif %}
    </div>
</div>
{% endblock %}
