1 {% extends "base.html" %}
\r
4 {% load extra_tags %}
\r
7 <link rel="stylesheet" type="text/css" media="screen" href="{% media "/media/style/auth.css" %}"/>
\r
8 {% for provider in all_providers %}
\r
9 {% for location in provider.extra_css %}
\r
10 <link rel="stylesheet" type="text/css" media="screen" href="{{ location }}"/>
\r
16 {% for provider in all_providers %}
\r
17 {% if provider.pre_code %}
\r
18 {{ provider.pre_code|safe }}
\r
21 <div class="headNormal">
\r
22 {% trans "User login" %}
\r
25 <p class="warning">{{ msg }}</p>
\r
27 {% for provider in top_stackitem_providers %}
\r
28 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
\r
29 {% include provider.stack_item_template %}
\r
30 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
33 {% if top_stackitem_providers %}
\r
34 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
36 <div style="width:600px;float:left;margin-bottom:5px;">
\r
37 {% trans "Click to sign in through any of these services." %}
\r
39 {% if request.user.is_anonymous %}
\r
40 <div style="width:600px;float:left;margin-bottom:5px;">
\r
41 <input type="checkbox" checked="checked" id="validate_email" />
\r
42 {% trans "Take the oppurtunity to validate my email next to the external provider I choose." %}
\r
45 <div id="bigicon_providers">
\r
46 {% for provider in bigicon_providers %}
\r
47 <div class="provider_logo big" name="{{ provider.id }}">
\r
48 {% ifequal provider.type "DIRECT" %}
\r
49 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
50 <img src="{% media provider.icon %}" />
\r
53 {% ifequal provider.type "CUSTOM" %}
\r
54 {% include provider.code_template %}
\r
56 {% ifequal provider.type "SIMPLE_FORM" %}
\r
57 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
62 <div id="smallicon_providers">
\r
63 {% for provider in smallicon_providers %}
\r
64 <div class="provider_logo small" name="{{ provider.id }}">
\r
65 {% ifequal provider.type "DIRECT" %}
\r
66 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
67 <img src="{% media provider.icon %}" />
\r
70 {% ifequal provider.type "CUSTOM" %}
\r
71 {% include provider.code_template %}
\r
73 {% ifequal provider.type "SIMPLE_FORM" %}
\r
74 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
79 <form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">
\r
80 <div id="signin_form_slot"></div>
\r
81 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
83 {% for provider in stackitem_providers %}
\r
84 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
85 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
\r
86 {% include provider.stack_item_template %}
\r
87 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
90 <h3 class="or_label">{% trans 'Or...' %}</h3>
\r
92 {% trans 'Click' %} <a href="{% url auth_request_tempsignin %}">here</a> {% trans "if you're having troubles signing in." %}
\r
94 <script type="text/html" id="simple_form_template">
\r
95 <fieldset id="slot_form">
\r
96 <p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
\r
97 <div><p><span></span>
\r
98 <input id="input_field" type="text" name="input_field" /><span></span>
\r
99 <input id="ssignin" name="ssignin" type="submit" value="Login" />
\r
101 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
104 <script type="text/javascript">
\r
106 var signin_url = "{% url auth_provider_signin provider='PROVIDER' %}";
\r
108 function set_validate_email() {
\r
109 var validate = $('#validate_email').attr('checked') ? 'yes' : 'no';
\r
110 $('.validate_email').attr('value', validate);
\r
112 $('.provider_direct').each(function() {
\r
113 var current_url = $(this).attr('href');
\r
114 if (!/\?validate_email\=(yes|no)$/.test(current_url)) {
\r
115 current_url += ('?validate_email=' + validate);
\r
117 current_url = current_url.replace(/(yes|no)$/, validate);
\r
120 $(this).attr('href', current_url);
\r
124 $('#validate_email').change(set_validate_email);
\r
126 function set_form_action(el) {
\r
127 var provider = el.parents('.provider_logo').attr('name');
\r
128 $('#signin_form').attr('action', signin_url.replace('PROVIDER', provider));
\r
131 $('.provider_logo').click(function() {
\r
132 $('.provider_logo').removeClass('selected');
\r
133 $(this).addClass('selected');
\r
136 $('.simple_form_provider').click(function() {
\r
137 $('#signin_form_slot').html('');
\r
138 var new_html = $('#simple_form_template').html()
\r
139 .replace('%%YOUR_WHAT%%', $(this).attr('alt'));
\r
140 $('#signin_form_slot').html(new_html);
\r
141 set_form_action($(this));
\r
142 set_validate_email();
\r
145 set_validate_email();
\r
150 {% block sidebar %}
\r
152 <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
\r
153 <ul class="list-item">
\r
155 {% trans "with openid it is easier" %}
\r
158 {% trans "reuse openid" %}
\r
161 {% trans "openid is widely adopted" %}
\r
164 {% trans "openid is supported open standard" %}
\r
168 <p class="info-box-follow-up-links">
\r
169 <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} </a><br/>
\r
170 <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} </a>
\r