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 %}">
\r
31 {% include provider.stack_item_template %}
\r
32 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
35 {% if top_stackitem_providers %}
\r
36 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
38 <div style="width:600px;float:left;margin-bottom:5px;">
\r
40 External login services use <b><a href="http://openid.net/">OpenID</a></b> technology, where your password always stays confidential between
\r
41 you and your login provider and you don't have to remember another one.
\r
44 {% if request.user.is_anonymous %}
\r
45 <div style="width:600px;float:left;margin-bottom:5px;">
\r
46 <input type="checkbox" checked="checked" id="validate_email" />
\r
47 {% trans "Validate my email after I login." %}
\r
50 <div id="bigicon_providers">
\r
51 {% for provider in bigicon_providers %}
\r
52 <div class="provider_logo big" name="{{ provider.id }}">
\r
54 {% ifequal provider.type "DIRECT" %}
\r
55 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
56 <img src="{% media provider.icon %}" />
\r
59 {% ifequal provider.type "CUSTOM" %}
\r
60 {% include provider.code_template %}
\r
62 {% ifequal provider.type "SIMPLE_FORM" %}
\r
63 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
69 <div id="smallicon_providers">
\r
70 {% for provider in smallicon_providers %}
\r
71 <div class="provider_logo small" name="{{ provider.id }}">
\r
73 {% ifequal provider.type "DIRECT" %}
\r
74 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
75 <img src="{% media provider.icon %}" />
\r
78 {% ifequal provider.type "CUSTOM" %}
\r
79 {% include provider.code_template %}
\r
81 {% ifequal provider.type "SIMPLE_FORM" %}
\r
82 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
88 <form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">
\r
89 <div id="signin_form_slot"></div>
\r
90 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
92 {% for provider in stackitem_providers %}
\r
93 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
94 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
\r
95 {% include provider.stack_item_template %}
\r
96 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
99 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
100 <form name="signin_form" id="dummy_form_unused" class="signin_form" method="POST" action="">
\r
102 {% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">here</a> {% trans "if you're having troubles signing in." %}
\r
105 <script type="text/html" id="simple_form_template">
\r
106 <fieldset id="slot_form">
\r
107 <p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
\r
108 <div><p><span></span>
\r
109 <input id="input_field" type="text" name="input_field" /><span></span>
\r
110 <input id="ssignin" name="ssignin" type="submit" value="Login" />
\r
112 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
115 <script type="text/javascript">
\r
117 var signin_url = "{% url auth_provider_signin provider='PROVIDER' %}";
\r
119 function set_validate_email() {
\r
120 var validate = $('#validate_email').attr('checked') ? 'yes' : 'no';
\r
121 $('.validate_email').attr('value', validate);
\r
123 $('.provider_direct').each(function() {
\r
124 var current_url = $(this).attr('href');
\r
125 if (!/\?validate_email\=(yes|no)$/.test(current_url)) {
\r
126 current_url += ('?validate_email=' + validate);
\r
128 current_url = current_url.replace(/(yes|no)$/, validate);
\r
131 $(this).attr('href', current_url);
\r
135 $('#validate_email').change(set_validate_email);
\r
137 function set_form_action(el) {
\r
138 var provider = el.parents('.provider_logo').attr('name');
\r
139 $('#signin_form').attr('action', signin_url.replace('PROVIDER', provider));
\r
142 $('.provider_logo').click(function() {
\r
143 $('.provider_logo').removeClass('selected');
\r
144 $(this).addClass('selected');
\r
147 $('.simple_form_provider').click(function() {
\r
148 $('#signin_form_slot').html('');
\r
149 var new_html = $('#simple_form_template').html()
\r
150 .replace('%%YOUR_WHAT%%', $(this).attr('alt'));
\r
151 $('#signin_form_slot').html(new_html);
\r
152 set_form_action($(this));
\r
153 set_validate_email();
\r
156 set_validate_email();
\r
161 {% block sidebar %}
\r
163 <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
\r
164 <ul class="list-item">
\r
166 {% trans "with openid it is easier" %}
\r
169 {% trans "reuse openid" %}
\r
172 {% trans "openid is widely adopted" %}
\r
175 {% trans "openid is supported open standard" %}
\r
179 <p class="info-box-follow-up-links">
\r
180 <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} </a><br/>
\r
181 <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} </a>
\r