]> git.datanom.net - flask-test.git/blob - app/templates/login.html
e8876aebc413b1b749f2dc8249390c5b282fe33f
[flask-test.git] / app / templates / login.html
1 <!-- extend base layout -->
2 {% extends "base.html" %}
3
4 {% block content %}
5 <script type="text/javascript">
6 function set_openid(openid, pr)
7 {
8 u = openid.search('<username>');
9 if (u != -1) {
10 // openid requires username
11 user = prompt('Enter your ' + pr + ' username:');
12 openid = openid.substr(0, u) + user;
13 }
14 form = document.forms['login'];
15 form.elements['openid'].value = openid;
16 }
17 </script>
18 {% include 'flash.html' %}
19 <div class="well">
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>
27 {% endfor %}
28 </div>
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>
35 {% endfor %}
36 </div>
37 </div>
38 <div class="control-group">
39 <div class="controls">
40 <label class="checkbox" for="remember_me">
41 {{ form.remember_me }} Remember Me
42 </label>
43 </div>
44 </div>
45 <div class="control-group">
46 <div class="controls">
47 <input class="btn btn-primary" type="submit" value="Sign In">
48 </div>
49 </div>
50 </form>
51 </div>
52 {% endblock %}
This page took 0.076417 seconds and 6 git commands to generate.