1 {% extends "base.html" %}
\r
4 {% load extra_tags %}
\r
6 {% block title %}{% spaceless %}{% trans "Login" %}{% endspaceless %}{% endblock %}
\r
9 <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/auth.css" %}"/>
\r
10 {% for provider in all_providers %}
\r
11 {% for location in provider.extra_css %}
\r
12 <link rel="stylesheet" type="text/css" media="screen" href="{{ location }}"/>
\r
18 {% for provider in all_providers %}
\r
19 {% if provider.pre_code %}
\r
20 {{ provider.pre_code|safe }}
\r
23 <div class="headNormal">
\r
24 {% trans "User login" %}
\r
27 <p class="error">{{ msg }}</p>
\r
29 {% for provider in top_stackitem_providers %}
\r
30 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}" accept-charset="utf-8">
\r
32 {% include provider.stack_item_template %}
\r
33 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
36 {% if top_stackitem_providers %}
\r
37 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
39 <div style="width:600px;float:left;margin-bottom:5px;">
\r
41 External login services use <b><a href="http://openid.net/">OpenID</a></b> technology, where your password always stays confidential between
\r
42 you and your login provider and you don't have to remember another one.
\r
45 {% if request.user.is_anonymous %}
\r
46 <div style="width:600px;float:left;margin-bottom:5px;">
\r
47 <input type="checkbox" checked="checked" id="validate_email" />
\r
48 {% trans "Validate my email after I login." %}
\r
51 <div id="bigicon_providers">
\r
52 {% for provider in bigicon_providers %}
\r
53 <div class="provider_logo big" name="{{ provider.id }}">
\r
55 {% ifequal provider.type "DIRECT" %}
\r
56 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
57 <img src="{% media provider.icon %}" />
\r
60 {% ifequal provider.type "CUSTOM" %}
\r
61 {% include provider.code_template %}
\r
63 {% ifequal provider.type "SIMPLE_FORM" %}
\r
64 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
70 <div id="smallicon_providers">
\r
71 {% for provider in smallicon_providers %}
\r
72 <div class="provider_logo small" name="{{ provider.id }}">
\r
74 {% ifequal provider.type "DIRECT" %}
\r
75 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
76 <img src="{% media provider.icon %}" />
\r
79 {% ifequal provider.type "CUSTOM" %}
\r
80 {% include provider.code_template %}
\r
82 {% ifequal provider.type "SIMPLE_FORM" %}
\r
83 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
89 <form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">
\r
91 <div id="signin_form_slot"></div>
\r
92 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
94 {% for provider in stackitem_providers %}
\r
95 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
96 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}" accept-charset="utf-8">
\r
98 {% include provider.stack_item_template %}
\r
99 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
102 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
103 <form name="signin_form" id="dummy_form_unused" class="signin_form" method="POST" action="">
\r
106 {% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">{% trans 'here' %}</a> {% trans "if you're having trouble signing in." %}
\r
109 <script type="text/html" id="simple_form_template">
\r
110 <fieldset id="slot_form">
\r
111 <p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
\r
112 <div><p><span></span>
\r
113 <input id="input_field" type="text" name="input_field" /><span></span>
\r
114 <input id="ssignin" name="ssignin" type="submit" value="Login" />
\r
116 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
119 <script type="text/javascript">
\r
121 var signin_url = "{% url auth_provider_signin provider='PROVIDER' %}";
\r
123 function set_validate_email() {
\r
124 var validate = $('#validate_email').attr('checked') ? 'yes' : 'no';
\r
125 $('.validate_email').attr('value', validate);
\r
127 $('.provider_direct').each(function() {
\r
128 var current_url = $(this).attr('href');
\r
129 if (!/\?validate_email\=(yes|no)$/.test(current_url)) {
\r
130 current_url += ('?validate_email=' + validate);
\r
132 current_url = current_url.replace(/(yes|no)$/, validate);
\r
135 $(this).attr('href', current_url);
\r
139 $('#validate_email').change(set_validate_email);
\r
141 function set_form_action(el) {
\r
142 var provider = el.parents('.provider_logo').attr('name');
\r
143 $('#signin_form').attr('action', signin_url.replace('PROVIDER', provider));
\r
146 $('.provider_logo').click(function() {
\r
147 $('.provider_logo').removeClass('selected');
\r
148 $(this).addClass('selected');
\r
151 $('.simple_form_provider').click(function() {
\r
152 $('#signin_form_slot').html('');
\r
153 var new_html = $('#simple_form_template').html()
\r
154 .replace('%%YOUR_WHAT%%', $(this).attr('alt'));
\r
155 $('#signin_form_slot').html(new_html);
\r
156 set_form_action($(this));
\r
157 set_validate_email();
\r
160 set_validate_email();
\r
165 {% block sidebar %}
\r
167 <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
\r
168 <ul class="list-item">
\r
170 {% trans "with openid it is easier" %}
\r
173 {% trans "reuse openid" %}
\r
176 {% trans "openid is widely adopted" %}
\r
179 {% trans "openid is supported open standard" %}
\r
183 <p class="info-box-follow-up-links">
\r
184 <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} </a><br/>
\r
185 <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} </a>
\r