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 # https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true # switch_user: true
form_login:
login_path: users_login
check_path: users_login
# Easy way to control access for large sections of your site # Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used # Note: Only the *first* access control that matches will be used

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

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

Loading…
Cancel
Save

Powered by TurnKey Linux.