possible solution
[ikiwiki] / templates / openid-selector.tmpl
1 <script type="text/javascript" src="ikiwiki/jquery.min.js"></script>
2 <script type="text/javascript" src="ikiwiki/openid/openid-jquery.js"></script>
3 <script type="text/javascript">
4 $(document).ready(function() {
5         openid.init('openid_identifier','<TMPL_IF NONOPENIDFORM>nonopenidform</TMPL_IF>');
6 });
7 </script>
8
9 <noscript>
10 <h2>OpenID:</h2>
11 </noscript>
12
13 <form action="<TMPL_VAR CGIURL>" method="get" id="openid_form">
14         <fieldset>
15                 <script>
16                 $('fieldset').append("<legend>Select your account provider</legend>");
17                 </script>
18                 
19                 <input type="hidden" name="do" value="signin" />
20                 <input type="hidden" name="action" value="verify" />
21                 <div id="openid_choice">
22                         <div id="openid_btns"></div>
23                 </div>
24                 <div id="openid_input_area">
25                         <label for="openid_identifier" class="block">Enter your OpenID:</label>
26                         <input id="openid_identifier" name="openid_identifier" type="text" value="<TMPL_VAR OPENID_URL>"/>
27                         <input id="openid_submit" type="submit" value="Login"/>
28                 </div>
29                 <TMPL_IF OPENID_ERROR>
30                 <div class="error"><TMPL_VAR OPENID_ERROR></div>
31                 </TMPL_IF>
32         </fieldset>
33 </form>
34
35 <div id="nonopenidform">
36 <TMPL_IF NONOPENIDFORM>
37 <br />
38 <noscript>
39 <h2>Other:</h2>
40 </noscript>
41 </TMPL_IF>
42 <TMPL_VAR NONOPENIDFORM>
43 </div>