...
Code Block | ||
---|---|---|
| ||
{% extends layout %}
{% block content %}
{% block login_content %}
{% if error %}
<div>{{ error.message|trans }}</div>
{% endif %}
<form action="{{ path( 'login_check' ) }}" method="post">
{% block login_fields %}
<label for="username">{{ 'Username:'|trans }}</label>
<input type="text" id="username" name="_username" value="{{ last_username }}" />
<label for="password">{{ 'Password:'|trans }}</label>
<input type="password" id="password" name="_password" />
<input type="hidden" name="_csrf_token" value="{{ csrf_token("authenticate") }}" />
{#
If you want to control the URL the user
is redirected to on success (more details below)
<input type="hidden" name="_target_path" value="/account" />
#}
<button type="submit">{{ 'Login'|trans }}</button>
{% endblock %}
</form>
{% endblock %}
{% endblock %} |
...