aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/UserBundle/Resources/views/Security/login.html.twig
blob: 32984c845483e912c1cf30b40f716c221fa85959 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{% extends "FOSUserBundle::layout.html.twig" %}

{% block fos_user_content %}
<form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
    <div class="card-content">

        {% if error %}
            <script>Materialize.toast('{{ error.messageKey|trans(error.messageData, 'security') }}', 4000)</script>
        {% endif %}

        {% for flashMessage in app.session.flashbag.get('notice') %}
            <script>Materialize.toast('{{ flashMessage }}')</script>
        {% endfor %}

        <div class="row">

            <div class="input-field col s12">
                <label for="username">{{ 'security.login.username'|trans }}</label>
                <input type="text" id="username" name="_username" value="{{ last_username }}" />
            </div>

            <div class="input-field col s12">
                <label for="password">{{ 'security.login.password'|trans }}</label>
                <input type="password" id="password" name="_password" />
            </div>

            <div class="input-field col s12">
                <input type="checkbox" id="remember_me" name="_remember_me" checked />
                <label for="remember_me">{{ 'security.login.keep_logged_in'|trans }}</label>
            </div>

        </div>
    </div>
    <div class="card-action center">
        <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
        {% if registration_enabled %}
            <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn">{{ 'security.login.register'|trans }}</a>
        {% endif %}
        <button class="btn waves-effect waves-light" type="submit" name="send">
            {{ 'security.login.submit'|trans }}
            <i class="material-icons right">send</i>
        </button>
    </div>
    <div class="card-action center">
        <a href="{{ path('fos_user_resetting_request') }}">{{ 'security.login.forgot_password'|trans }}</a>
    </div>
</form>
{% endblock fos_user_content %}