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