web/ldtplatform/templates/registration/login.html
author grandjoncl
Wed, 28 Nov 2012 12:27:08 +0100
changeset 995 94f9d36371f6
parent 522 7d6630fd287e
child 997 947c8ad09bd6
permissions -rw-r--r--
new template tag absstatic to have absolute url for static file and avoid using LDT_MEDIA_PREFIX new absurl template tag can be used instead of template tag url to have absolute url replacement of all LDT_MEDIA_PREFIX in different templates and views
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
{% extends "registration/base.html" %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
     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
7d6630fd287e Remove "clic ici" link from login page
verrierj
parents: 338
diff changeset
     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
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
{% endblock %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
{% block css_import %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
{% endblock %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
{% block login %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    31
{% endblock %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
{% block content_title %}{% trans 'Log in' %}{% endblock %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
{% block iricontent %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
    {% if form.errors %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
   	<p class="error">{% trans "Sorry, that's not a valid username or password." %}</p>
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
   {% endif %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
  	<div class="span-24 last">
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
        <form action="" method='post' id="login-form">
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
        	<div id="loginform_div" class="span-12">
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
            {% csrf_token %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
            <input type="hidden" name="next" value="{{ next }}" />
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
	        <ul id="login_fields_list">
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
	        {{form.as_ul}}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    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" %}&nbsp;:</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"/>&nbsp;{{ 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
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
	</div> 
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
{% endblock %}
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
bdf22b140727 first import
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74