fix for openid authentication
[scpubgit/stemmatology.git] / stemmaweb / root / src / auth / login.tt
1 [% IF status_msg %]
2                         <p>[% status_msg | html %]</p>
3 [% END %]
4 [% IF error_msg %]
5                         <p class="error">[% error_msg | html %]</p>
6 [% END %]
7
8 [% IF form.has_errors %]
9                         <p class="error">Some fields had errors:</p>
10                                         
11                         <ul class="errors">
12         [% FOREACH msg IN form.errors %]
13                                 <li>[% msg | html %]</li>
14         [% END %]
15                         </ul>
16 [% END %]
17
18         <form method="post" action="[% c.uri_for_action('/users/login').hostless | html %]" autocomplete="off">
19
20     <input type="hidden" name="realm" value="openid"/>
21     <input type="hidden" name="openid_identifier" value="https://www.google.com/accounts/o8/id"/>
22     <input type="submit" value="Sign in with Google"/>
23
24         </form>
25
26 [% UNLESS c.req.param('realm') == 'openid' %]
27         <form method="post" action="[% c.uri_for_action('/users/login').hostless | html %]" autocomplete="off">
28
29     <input type="hidden" name="realm" value="default"/>
30
31         [% form.field('username').render %]
32         [% form.field('password').render %]
33         [% form.field('remember').render %]
34
35         [% form.field('submit').render %]
36
37         </form>
38 [% END %]