{% macro auth_login(username, message, is_welcome, redirect, autofocus) %} {% set is_welcome = is_welcome|default(false) %} {% set autofocus = autofocus|default(false) %} {% from '_layout/input.twig' import input_hidden, input_csrf, input_text %}
{{ input_hidden('auth[mode]', 'login') }} {{ input_csrf('login') }} {% if redirect|length > 0 %} {{ input_hidden('auth[redirect]', redirect) }} {% endif %}
{% if message|length > 0 %}
{{ message }}
{% endif %}
{{ input_text('auth[username]', 'auth__input js-login-username', username|default(''), 'text', 'Username', true, null, 0, autofocus) }} {{ input_text('auth[password]', 'auth__input', '', 'password', 'Password', true, null) }}
{% endmacro %}