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="warning">{{ 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
39 {% trans "Click to sign in through any of these services." %}
\r
41 {% if request.user.is_anonymous %}
\r
42 <div style="width:600px;float:left;margin-bottom:5px;">
\r
43 <input type="checkbox" checked="checked" id="validate_email" />
\r
44 {% trans "Validate my email after I login." %}
\r
47 <div id="bigicon_providers">
\r
48 {% for provider in bigicon_providers %}
\r
49 <div class="provider_logo big" name="{{ provider.id }}">
\r
50 {% ifequal provider.type "DIRECT" %}
\r
51 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
52 <img src="{% media provider.icon %}" />
\r
55 {% ifequal provider.type "CUSTOM" %}
\r
56 {% include provider.code_template %}
\r
58 {% ifequal provider.type "SIMPLE_FORM" %}
\r
59 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
64 <div id="smallicon_providers">
\r
65 {% for provider in smallicon_providers %}
\r
66 <div class="provider_logo small" name="{{ provider.id }}">
\r
67 {% ifequal provider.type "DIRECT" %}
\r
68 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
69 <img src="{% media provider.icon %}" />
\r
72 {% ifequal provider.type "CUSTOM" %}
\r
73 {% include provider.code_template %}
\r
75 {% ifequal provider.type "SIMPLE_FORM" %}
\r
76 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
81 <form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">
\r
82 <div id="signin_form_slot"></div>
\r
83 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
85 {% for provider in stackitem_providers %}
\r
86 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
87 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
\r
88 {% include provider.stack_item_template %}
\r
89 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
92 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
94 {% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">here</a> {% trans "if you're having troubles signing in." %}
\r
96 <script type="text/html" id="simple_form_template">
\r
97 <fieldset id="slot_form">
\r
98 <p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
\r
99 <div><p><span></span>
\r
100 <input id="input_field" type="text" name="input_field" /><span></span>
\r
101 <input id="ssignin" name="ssignin" type="submit" value="Login" />
\r
103 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
106 <script type="text/javascript">
\r
108 var signin_url = "{% url auth_provider_signin provider='PROVIDER' %}";
\r
110 function set_validate_email() {
\r
111 var validate = $('#validate_email').attr('checked') ? 'yes' : 'no';
\r
112 $('.validate_email').attr('value', validate);
\r
114 $('.provider_direct').each(function() {
\r
115 var current_url = $(this).attr('href');
\r
116 if (!/\?validate_email\=(yes|no)$/.test(current_url)) {
\r
117 current_url += ('?validate_email=' + validate);
\r
119 current_url = current_url.replace(/(yes|no)$/, validate);
\r
122 $(this).attr('href', current_url);
\r
126 $('#validate_email').change(set_validate_email);
\r
128 function set_form_action(el) {
\r
129 var provider = el.parents('.provider_logo').attr('name');
\r
130 $('#signin_form').attr('action', signin_url.replace('PROVIDER', provider));
\r
133 $('.provider_logo').click(function() {
\r
134 $('.provider_logo').removeClass('selected');
\r
135 $(this).addClass('selected');
\r
138 $('.simple_form_provider').click(function() {
\r
139 $('#signin_form_slot').html('');
\r
140 var new_html = $('#simple_form_template').html()
\r
141 .replace('%%YOUR_WHAT%%', $(this).attr('alt'));
\r
142 $('#signin_form_slot').html(new_html);
\r
143 set_form_action($(this));
\r
144 set_validate_email();
\r
147 set_validate_email();
\r
152 {% block sidebar %}
\r
154 <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
\r
155 <ul class="list-item">
\r
157 {% trans "with openid it is easier" %}
\r
160 {% trans "reuse openid" %}
\r
163 {% trans "openid is widely adopted" %}
\r
166 {% trans "openid is supported open standard" %}
\r
170 <p class="info-box-follow-up-links">
\r
171 <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} </a><br/>
\r
172 <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} </a>
\r