| author | grandjoncl |
| Wed, 28 Nov 2012 12:27:08 +0100 | |
| changeset 995 | 94f9d36371f6 |
| parent 522 | 7d6630fd287e |
| child 997 | 947c8ad09bd6 |
| permissions | -rw-r--r-- |
| 0 | 1 |
{% extends "registration/base.html" %} |
2 |
{% load i18n %} |
|
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
3 |
{% load absstatic %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
4 |
{% load static %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
5 |
|
| 522 | 6 |
{% block js_declaration %} |
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
7 |
|
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
8 |
<script type="text/javascript"> |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
9 |
$(document).ready(function(){ |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
10 |
$('.social_link').each(function(i){ |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
11 |
{% if social_list %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
12 |
{% for backend_name in social_list %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
13 |
var coucou='ldt/img/logo_{{backend_name}}.png' |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
14 |
{% with "ldt/img/logo_"|add:backend_name|add:".png" as src_path %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
15 |
document.getElementById('{{backend_name}}_logo_id').src='{% absstatic src_path %}'; |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
16 |
{% endwith %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
17 |
{% endfor %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
18 |
{% endif %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
19 |
}); |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
20 |
}); |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
21 |
</script> |
| 0 | 22 |
{% endblock %} |
23 |
{% block css_import %} |
|
24 |
{{ block.super }} |
|
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
25 |
<link rel="stylesheet" href='{% absstatic "ldt/css/ldt.css" %}'/> |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
26 |
<link rel="stylesheet" href='{% absstatic "ldt/css/ldtform.css" %}' /> |
| 0 | 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> |
|
|
60
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
46 |
<ul> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
47 |
<li><a href="{% url django.contrib.auth.views.password_reset %}" >{% trans "Forget password?" %}</a></li> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
48 |
</ul> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
49 |
<div id="submitcontent-buttons-login" class="span-24 last"> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
50 |
<button class="button"type="submit" value="login">{% trans "login" %}</button> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
51 |
</div> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
52 |
</div> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
53 |
</form> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
54 |
<div id="login_links" class="span-12 last"> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
55 |
<div id="login_links_list" class="span-12 last"> |
|
59
a06fab661ac4
modifs for not to modify django-1.3.tar.gz, better login management, add social_auth backend icons.
cavaliet
parents:
57
diff
changeset
|
56 |
{% if social_list %} |
|
a06fab661ac4
modifs for not to modify django-1.3.tar.gz, better login management, add social_auth backend icons.
cavaliet
parents:
57
diff
changeset
|
57 |
<p>{% trans "Or login with your external account" %} :</p> |
|
a06fab661ac4
modifs for not to modify django-1.3.tar.gz, better login management, add social_auth backend icons.
cavaliet
parents:
57
diff
changeset
|
58 |
<ul> |
|
995
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
59 |
{% for backend_name in social_list %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
60 |
|
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
61 |
<li><a href="{{ backend_name }}"><img class='social_link' id="{{backend_name}}_logo_id"/> {{ backend_name }}</a></li> |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
62 |
|
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
63 |
{% endfor %} |
|
94f9d36371f6
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX
grandjoncl
parents:
522
diff
changeset
|
64 |
{% comment %}{{social_list|safe}}{% endcomment %} |
|
59
a06fab661ac4
modifs for not to modify django-1.3.tar.gz, better login management, add social_auth backend icons.
cavaliet
parents:
57
diff
changeset
|
65 |
</ul> |
|
a06fab661ac4
modifs for not to modify django-1.3.tar.gz, better login management, add social_auth backend icons.
cavaliet
parents:
57
diff
changeset
|
66 |
{% endif %} |
|
60
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
67 |
</div> |
|
77d07e49e245
Enhance login form and add french sentence for social_auth login.
cavaliet
parents:
59
diff
changeset
|
68 |
</div> |
| 0 | 69 |
</div> |
70 |
||
71 |
{% endblock %} |
|
72 |
||
73 |
||
74 |