|
1 {% extends "registration/base.html" %} |
|
2 {% load i18n %} |
|
3 {% load absstatic %} |
|
4 {% load static %} |
|
5 |
|
6 {% block js_declaration %} |
|
7 |
|
8 <script type="text/javascript"> |
|
9 $(document).ready(function(){ |
|
10 $('.social_link').each(function(i){ |
|
11 {% if social_list %} |
|
12 {% for backend_name in social_list %} |
|
13 var coucou='ldt/img/logo_{{backend_name}}.png' |
|
14 {% with "ldt/img/logo_"|add:backend_name|add:".png" as src_path %} |
|
15 document.getElementById('{{backend_name}}_logo_id').src='{% absstatic src_path %}'; |
|
16 {% endwith %} |
|
17 {% endfor %} |
|
18 {% endif %} |
|
19 }); |
|
20 }); |
|
21 </script> |
|
22 {% endblock %} |
|
23 {% block css_import %} |
|
24 {{ block.super }} |
|
25 <link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}'/> |
|
26 <link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' /> |
|
27 {% endblock %} |
|
28 |
|
29 |
|
30 {% block login %} |
|
31 {% endblock %} |
|
32 |
|
33 {% block content_title %}{% trans 'Log in' %}{% endblock %} |
|
34 {% block iricontent %} |
|
35 {% if form.errors %} |
|
36 <p class="error">{% trans "Sorry, that's not a valid username or password." %}</p> |
|
37 {% endif %} |
|
38 <div class="span-24 last"> |
|
39 <form action="" method='post' id="login-form"> |
|
40 <div id="loginform_div" class="span-12"> |
|
41 {% csrf_token %} |
|
42 <input type="hidden" name="next" value="{{ next }}" /> |
|
43 <ul id="login_fields_list"> |
|
44 {{form.as_ul}} |
|
45 </ul> |
|
46 <ul> |
|
47 <li><a href="{% url django.contrib.auth.views.password_reset %}" >{% trans "Forget password?" %}</a></li> |
|
48 </ul> |
|
49 <div id="submitcontent-buttons-login" class="span-24 last"> |
|
50 <button class="button"type="submit" value="login">{% trans "login" %}</button> |
|
51 </div> |
|
52 </div> |
|
53 </form> |
|
54 <div id="login_links" class="span-12 last"> |
|
55 <div id="login_links_list" class="span-12 last"> |
|
56 {% if social_list %} |
|
57 <p>{% trans "Or login with your external account" %} :</p> |
|
58 <ul> |
|
59 {% for backend_name in social_list %} |
|
60 |
|
61 <li><a href="{{ backend_name }}"><img class='social_link' id="{{backend_name}}_logo_id"/> {{ backend_name }}</a></li> |
|
62 |
|
63 {% endfor %} |
|
64 {% comment %}{{social_list|safe}}{% endcomment %} |
|
65 </ul> |
|
66 {% endif %} |
|
67 </div> |
|
68 </div> |
|
69 </div> |
|
70 |
|
71 {% endblock %} |
|
72 |
|
73 |
|
74 |