Gitlab CSE Unil

login.inc.html 2.11 KB
Newer Older
Julien Furrer's avatar
Julien Furrer committed
1
2
3
4
{% load i18n %}

<div id="login-mode" class="panel-group">

5
    <a href="https://jabba.unil.ch/Shibboleth.sso/Login?entityID=https%3A%2F%2Faai.unil.ch%2Fidp%2Fshibboleth&target=https%3A//jabba.unil.ch{% url "shibauth:shib-login" %}{% if next %}%3Fnext%3D{{ next }}{% endif %}"
6
7
        class="btn btn-primary btn-lg btn-block" >
        <span class="lead" style="vertical-align: middle">Login</span>&nbsp;
Julien Furrer's avatar
Julien Furrer committed
8
        <span class="unilogo-unil-notext"></span>
9
    </a>
Julien Furrer's avatar
Julien Furrer committed
10

11
12
    <div class="local-login-head">
        <a class="" data-toggle="collapse" data-parentX="#login-mode" href="#collapseLocal">Login local</a>
Julien Furrer's avatar
Julien Furrer committed
13
14
15
16
17
18
19
20
21
22
23
24
25
26
    </div>

    <div class="panel panel-default" id="login-local-panel">
        <div id="collapseLocal" class="panel-collapse collapse {% if form %} in {% endif %}">
            <div class="panel-body">
                {% if form and form.errors %}
                    <div class="alert alert-danger alert-dismissable">
                        <button type="button" class="close" data-dismiss="alert"
                                aria-hidden="true">&times;</button>
                        <strong>Echec d'authentification.</strong>
                        Votre nom d'utilisateur et/ou mot de passe ne conviennent pas. Essayer à nouveau.
                    </div>
                {% endif %}
                <form method="post" action="{% url 'django.contrib.auth.views.login' %}"
27
                      class="form-inline-off" role="form">
Julien Furrer's avatar
Julien Furrer committed
28
29
30
31
32
                    {% csrf_token %}
                    <input class="form-control" id="id_username" maxlength="254" name="username" type="text"
                           placeholder="Utilisateur local" required autofocus/>
                    <input class="form-control" id="id_password" name="password" type="password"
                           placeholder="Mot de passe" required/>
33
                    <input class="btn btn-sm btn-info pull-right" type="submit" value="Login local"/>
Julien Furrer's avatar
Julien Furrer committed
34
35
36
37
38
39
40
                    {% url 'home' as home_url %}
                    <input type="hidden" name="next" value="{{ next|default:home_url }}"/>
                </form>
            </div>
        </div>
    </div>
</div>