{% extends "visiosoft.theme.defaultadmin::layouts/login" %}

{% block content %}

    <div class="logo-container">
        <div class="logo">
            {% if setting_value('visiosoft.theme.defaultadmin::icon') %}
                <img src="{{ file(setting_value('visiosoft.theme.defaultadmin::icon')).url }}" alt="site icon">
            {% else %}
                {{ img('theme::img/icon.svg').data|raw }}
            {% endif %}
            {{ setting_value('visiosoft.theme.defaultadmin::title') }}
        </div>
        <div class="overlay"></div>
    </div>

    <div class="login-container variant-background-pattern">
        <div class="login-wrapper container-fluid">

            <div class="logo">
                {% if setting_value('visiosoft.theme.defaultadmin::icon') %}
                    <img src="{{ file(setting_value('visiosoft.theme.defaultadmin::icon')).url }}" alt="site icon">
                {% else %}
                    {{ img('theme::img/icon.svg').data|raw }}
                {% endif %}
            </div>

            <div class="col-sm-12 offset-sm-6">

                {% include "theme::partials/messages" %}

                {% set form = form('login').redirect('admin').get() %}

                {{ form.open|raw }}

                <div class="form-group">
                    {% if setting_value('anomaly.module.users::login') == 'username' %}
                        {{ form.fields.username.setPlaceholder(form.fields.username.label).addAttribute('autofocus', 1).input|raw }}
                    {% else %}
                        {{ form.fields.email.setPlaceholder(form.fields.email.label).addAttribute('autofocus', 1).input|raw }}
                    {% endif %}
                </div>

                <div class="form-group">
                    {{ form.fields.password.setPlaceholder(form.fields.password.label).input|raw }}
                </div>

                <div class="form-group checkbox pull-left">
                    <label>
                        {{ form_checkbox("remember", null, false, {'id': 'remember'}) }}
                        {{ trans('anomaly.module.users::field.remember_me.name') }}
                    </label>
                </div>

                <div class="form-group pull-right">
                    <button type="submit" value="Login" class="btn btn-white btn-outline"
                            onclick="$('body').addClass('success');">
                        {{ trans('anomaly.module.users::button.login') }}
                    </button>
                </div>

                {{ form.close|raw }}

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

                <a href="{{ url_route('anomaly.module.users::password.forgot') }}">
                    <small>
                        {{ trans('anomaly.module.users::message.forgot_password') }}
                    </small>
                </a>

            </div>
        </div>
    </div>

{% endblock %}
