{% extends 'areas/loginbox/editables.html.twig' %}
{% block view %}
<div class="c-loginbox {% if componentMargin is defined %}{{componentMargin}}{% endif %}">
{% for error in app.flashes(['error_auth']) %}
{% if error is defined and error is not empty %}
<div class="c-login__alert">{{ error[0].messageKey|trans(error[0].messageData, 'security') }}</div>
{% endif %}
{% endfor %}
{% if editmode %}
Only in Frontend
{% elseif not editmode and app.user is not null %}
<div class="c-wysiwyg e-rte spacing-component-padding-none-left-right spacing-component-padding-none-top-bottom spacing-component-margin-bottom-none background-none">
<h2 style="text-align:center">Sie sind bereits eingeloggt.</h2>
<p class="e-large" style="text-align:center">
<p style="text-align:center">
<a class="e-button" href="/de/portal/logout">Logout</a>
</p>
</p>
</div>
{% else %}
<div class="c-wysiwyg e-rte spacing-component-padding-none-left-right spacing-component-padding-none-top-bottom spacing-component-margin-bottom-none background-none"><h2>Login</h2></div><br>
<form action="{{ path('mvk_login') }}" method="post">
<label for="username">{{'mvk_doc_fe_Loginbox_username' | trans }}</label>
<input type="text" id="username" name="_username" value="{% if lastUsername %}{{ lastUsername }}{% endif %}" required>
<label for="password">{{'mvk_doc_fe_Loginbox_password' | trans }}</label>
<input type="password" id="password" name="_password">
<div class="check-wrapper">
<input type="checkbox" id="remember" name="_remember_me">
<label for="remember">{{'mvk_doc_fe_Loginbox_stay_logged_in' | trans }}</label>
</div>
{# If you want to control the URL the user is redirected to on success
<input type="hidden" name="_target_path" value="/account"> #}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<button type="submit">{{'mvk_doc_fe_Loginbox_button' | trans }}</button>
</form>
{% endif %}
</div>
{% endblock %}