main
František Špaček 2 years ago
parent af61edb01e
commit 1e6fae451f

@ -18,6 +18,9 @@ security:
# https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true
form_login:
login_path: users_login
check_path: users_login
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used

@ -8,25 +8,25 @@
{{ parent() }}
<main>
<div class="loginDiv">
<form action="{{ path('users_login') }}" method="post">
<label for="username">Uživatelské jméno</label>
<input type="text" name="username" id="username" value="{{ last_username }}" required/>
<label for="password">Heslo</label>
<input type="password" name="password" id="password" placeholder="********" required/>
{% block body %}
{% if error %}
<div>{{ error.messageKey|trans(error.messageData, 'security') }}</div>
{% endif %}
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<form action="{{ path('users_login') }}" method="post">
<label for="username">Email:</label>
<input type="text" id="username" name="_username" value="{{ last_username }}">
<label>
<input type="checkbox" name="_remember_me" checked>
Zůstat přihlášen
</label>
<label for="password">Heslo:</label>
<input
type="password" id="password" name="_password">
<input type="submit" value="Přihlásit se"/>
</form>
{# If you want to control the URL the user is redirected to on success
<input type="hidden" name="_target_path" value="/account"> #}
{% if error %}
<p class="login-form__error">{{ error.messageKey|trans(error.messageData, 'security') }}</p>
{% endif %}
<button type="submit">Přihlásit se</button>
</form>
{% endblock %}
</div>
</main>
{% endblock %}

@ -8,7 +8,7 @@
{{ parent() }}
<main>
<div class="loginDiv">
{{ form_start(form, {'action': path('users_create'), 'method': 'POST'}) }}
{{ form_start(form) }}
{{ form_widget(form) }}
<input type="submit"/>

Loading…
Cancel
Save

Powered by TurnKey Linux.