Commit | Line | Data |
eb38afbc |
1 | [% WRAPPER header.tt |
2 | pagetitle = "Stemmaweb - Sign in" |
3 | applicationstyle = c.uri_for('/css/auth.css') |
4 | %] |
5 | <script type="text/javascript"> |
6 | $(document).ready(function() { |
7 | // call out to load the directory div |
8 | $('#login_actions').accordion(); |
9 | $('.login_button').button(); |
10 | $('#submit').button(); |
11 | |
12 | var status = '[% status_msg %]'; |
13 | if( status == 'Logged in!' ) { |
14 | setInterval( function ( e ) { |
15 | window.opener.location.reload(true); |
16 | window.close(); |
17 | e.preventDefault(); |
18 | }, 2000 ); |
19 | } |
20 | }); |
21 | </script> |
22 | [% END %] |
23 | <div id="topbanner"> |
24 | <h1>Stemmaweb - Sign in</h1> |
25 | </div> |
26 | |
27 | <div id="login_status"> |
19262e3d |
28 | [% IF status_msg %] |
29 | <p>[% status_msg | html %]</p> |
30 | [% END %] |
31 | [% IF error_msg %] |
32 | <p class="error">[% error_msg | html %]</p> |
33 | [% END %] |
34 | |
35 | [% IF form.has_errors %] |
36 | <p class="error">Some fields had errors:</p> |
37 | |
38 | <ul class="errors"> |
39 | [% FOREACH msg IN form.errors %] |
40 | <li>[% msg | html %]</li> |
41 | [% END %] |
42 | </ul> |
43 | [% END %] |
eb38afbc |
44 | </div> |
45 | [% UNLESS status_msg == 'Logged in!' %] |
46 | <div id="login_actions"> |
47 | <h3><a href="#">Sign in with Google</a></h3> |
48 | <div> |
49 | <p>If you have a Google account, you may use it to sign into Stemmaweb.</p> |
b18e0ae6 |
50 | <form class="openid_form" method="post" action="[% c.uri_for_action('/users/login') | html %]" autocomplete="off"> |
eb38afbc |
51 | <input type="hidden" name="realm" value="openid"/> |
52 | <input type="hidden" name="openid_identifier" value="https://www.google.com/accounts/o8/id"/> |
b18e0ae6 |
53 | <input type="submit" class="login_button" id="login_google" value="Sign in with Google"></input> |
eb38afbc |
54 | </form> |
55 | </div> |
19262e3d |
56 | |
eb38afbc |
57 | <h3><a href="#">Sign in with OpenID</a></h3> |
58 | <div> |
59 | <p>If you have an account with an <a href="http://openid.net/get-an-openid/" target="_blank">OpenID provider</a> (e.g. WordPress, Blogger, Flickr, Yahoo), you may use it to sign into Stemmaweb. |
b18e0ae6 |
60 | <form class="openid_form" method="post" action="[% c.uri_for_action('/users/login') | html %]" autocomplete="off"> |
eb38afbc |
61 | <input type="hidden" name="realm" value="openid"/> |
b18e0ae6 |
62 | <input type="text" name="openid_identifier" id="openid_input"/> |
63 | <input type="submit" class="login_button" id="login_openid" value="Sign in with OpenID"/> |
eb38afbc |
64 | </form> |
65 | </div> |
fd114bb4 |
66 | |
b600c671 |
67 | [% UNLESS c.req.param('realm') == 'openid' %] |
eb38afbc |
68 | <h3><a href="#">Sign in with Stemmaweb</a></h3> |
69 | <div> |
70 | <p>If you do not have Google or another OpenID account, you may <a href="[% c.uri_for_action('/users/register') | html %]">register</a> for a user account here with its own password. Once you are registered, you can use this form to sign in.</p> |
71 | <form id="login_local_form" method="post" action="[% c.uri_for_action('/users/login') | html %]" autocomplete="off"> |
72 | <input type="hidden" name="realm" value="default"/> |
73 | [% userlabel = form.field('username').label('Email address') %] |
74 | [% form.field('username').render %] |
75 | [% form.field('password').render %] |
76 | |
77 | [% rememberlabel = form.field('remember').label('Remember me') %] |
78 | [% form.field('remember').render %] |
79 | |
80 | [% submitbutton = form.field('submit').value('Sign in with Stemmaweb') %] |
81 | [% form.field('submit').render %] |
82 | </form> |
83 | </div> |
84 | [% END %] |
85 | </div> |
86 | [% END %] |
87 | [% PROCESS footer.tt %] |