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
28 <div style="width:600px;float:left;margin-bottom:5px;">
\r
29 {% trans "Click to sign in through any of these services." %}
\r
31 {% if request.user.is_anonymous %}
\r
32 <div style="width:600px;float:left;margin-bottom:5px;">
\r
33 <input type="checkbox" checked="checked" id="validate_email" />
\r
34 {% trans "Take the opurtunity to validate my email next to the external provider I choose." %}
\r
37 <div id="bigicon_providers">
\r
38 {% for provider in bigicon_providers %}
\r
39 <div class="provider_logo big" name="{{ provider.id }}">
\r
40 {% ifequal provider.type "DIRECT" %}
\r
41 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
42 <img src="{% media provider.icon %}" />
\r
45 {% ifequal provider.type "CUSTOM" %}
\r
46 {% include provider.code_template %}
\r
48 {% ifequal provider.type "SIMPLE_FORM" %}
\r
49 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
54 <div id="smallicon_providers">
\r
55 {% for provider in smallicon_providers %}
\r
56 <div class="provider_logo small" name="{{ provider.id }}">
\r
57 {% ifequal provider.type "DIRECT" %}
\r
58 <a class="provider_direct" href="{% url auth_provider_signin provider=provider.id %}">
\r
59 <img src="{% media provider.icon %}" />
\r
62 {% ifequal provider.type "CUSTOM" %}
\r
63 {% include provider.code_template %}
\r
65 {% ifequal provider.type "SIMPLE_FORM" %}
\r
66 <img alt="{{ provider.simple_form_context.your_what }}" class="simple_form_provider" src="{% media provider.icon %}" />
\r
71 <form name="signin_form" id="signin_form" class="signin_form" method="POST" action="">
\r
72 <div id="signin_form_slot"></div>
\r
73 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
75 {% for provider in stackitem_providers %}
\r
76 <h3 class="or_label">Or...</h3>
\r
77 <form class="signin_form" method="POST" action="{% url auth_provider_signin provider=provider.id %}">
\r
78 {% include provider.stack_item_template %}
\r
79 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
82 <script type="text/html" id="simple_form_template">
\r
83 <fieldset id="slot_form">
\r
84 <p id="provider_name_slot">{% trans 'Enter your ' %}%%YOUR_WHAT%%</p>
\r
85 <div><p><span></span>
\r
86 <input id="input_field" type="text" name="input_field" /><span></span>
\r
87 <input id="ssignin" name="ssignin" type="submit" value="Login" />
\r
89 <input type="hidden" class="validate_email" name="validate_email" value="yes" />
\r
92 <script type="text/javascript">
\r
94 var signin_url = "{% url auth_provider_signin provider='PROVIDER' %}";
\r
96 function set_validate_email() {
\r
97 var validate = $('#validate_email').attr('checked') ? 'yes' : 'no';
\r
98 $('.validate_email').attr('value', validate);
\r
100 $('.provider_direct').each(function() {
\r
101 var current_url = $(this).attr('href');
\r
102 if (!/\?validate_email\=(yes|no)$/.test(current_url)) {
\r
103 current_url += ('?validate_email=' + validate);
\r
105 current_url = current_url.replace(/(yes|no)$/, validate);
\r
108 $(this).attr('href', current_url);
\r
112 $('#validate_email').change(set_validate_email);
\r
114 function set_form_action(el) {
\r
115 var provider = el.parents('.provider_logo').attr('name');
\r
116 $('#signin_form').attr('action', signin_url.replace('PROVIDER', provider));
\r
119 $('.provider_logo').click(function() {
\r
120 $('.provider_logo').removeClass('selected');
\r
121 $(this).addClass('selected');
\r
124 $('.simple_form_provider').click(function() {
\r
125 $('#signin_form_slot').html('');
\r
126 var new_html = $('#simple_form_template').html()
\r
127 .replace('%%YOUR_WHAT%%', $(this).attr('alt'));
\r
128 $('#signin_form_slot').html(new_html);
\r
129 set_form_action($(this));
\r
130 set_validate_email();
\r
133 set_validate_email();
\r
138 {% block sidebar %}
\r
140 <h3 class="subtitle">{% trans "Why use OpenID?" %}</h3>
\r
141 <ul class="list-item">
\r
143 {% trans "with openid it is easier" %}
\r
146 {% trans "reuse openid" %}
\r
149 {% trans "openid is widely adopted" %}
\r
152 {% trans "openid is supported open standard" %}
\r
156 <p class="info-box-follow-up-links">
\r
157 <a href="http://openid.net/what/" target="_blank">{% trans "Find out more" %} </a><br/>
\r
158 <a href="http://openid.net/get/" target="_blank">{% trans "Get OpenID" %} </a>
\r