1 <!-- extend base layout -->
2 {% extends
"base.html" %}
5 <script type=
"text/javascript">
6 function set_openid(openid, pr)
8 u = openid.search('
<username>');
10 // openid requires username
11 user = prompt('Enter your ' + pr + ' username:');
12 openid = openid.substr(
0, u) + user;
14 form = document.forms['login'];
15 form.elements['openid'].value = openid;
18 {% include 'flash.html' %}
20 <h3>Please Sign In
</h3>
21 <form class=
"form" action=
"" method=
"post" name=
"login">
22 {{ form.hidden_tag() }}
23 <div class=
"help-block">Click on your OpenID provider below:
</div>
24 <div class=
"control-group">
25 {% for pr in providers %}
26 <a href=
"javascript:set_openid('{{ pr.url }}', '{{ pr.name }}');"><img src=
"/static/img/{{ pr.name.lower() }}.png" class=
"img-polaroid" style=
"margin:2px;" /></a>
29 <div class=
"control-group{% if form.openid.errors %} error{% endif %}">
30 <label class=
"control-label" for=
"openid">Or enter your OpenID here:
</label>
31 <div class=
"controls">
32 {{ form.openid(size=
80,
class=
"span4") }}
33 {% for error in form.openid.errors %}
34 <span class=
"help-inline">[{{ error }}]
</span><br>
38 <div class=
"control-group">
39 <div class=
"controls">
40 <label class=
"checkbox" for=
"remember_me">
41 {{ form.remember_me }} Remember Me
45 <div class=
"control-group">
46 <div class=
"controls">
47 <input class=
"btn btn-primary" type=
"submit" value=
"Sign In">