]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - templates/login-selector.tmpl
Q. How to truncate blog posts?
[git.ikiwiki.info.git] / templates / login-selector.tmpl
1 <script type="text/javascript" src="ikiwiki/jquery.min.js"></script>
2 <script type="text/javascript" src="ikiwiki/login-selector/login-selector.js"></script>
3 <script type="text/javascript">
4 $(document).ready(function() {
5         selector.init(
6                 'openid_identifier',
7                 {
8                         <TMPL_IF LOGIN_SELECTOR_OPENID>'openid': 1,</TMPL_IF>
9                         <TMPL_IF LOGIN_SELECTOR_EMAILAUTH>'email': 1,</TMPL_IF>
10                 },
11                 '<TMPL_IF OTHERFORM>otherform</TMPL_IF>',
12                 '<TMPL_VAR OTHERFORM_LABEL>'
13         );
14 });
15 </script>
17 <form action="<TMPL_VAR CGIURL>" method="get" id="login_selector_form">
18         <div>
19                 <script>
20                 $('fieldset').append("<legend>Select login method</legend>");
21                 </script>
22                 
23                 <input type="hidden" name="do" value="signin" />
24                 <input type="hidden" name="action" value="verify" />
25                 <div id="login_choice">
26                         <div id="login_btns"></div>
27                 </div>
29                 <div id="login_input_area">
30                 <TMPL_IF LOGIN_SELECTOR_OPENID>
31                         <div>
32                                 <h3>OpenId login:</h3>
33                                 <label for="openid_identifier" class="block">Enter your OpenID:</label>
34                                 <input id="openid_identifier" name="openid_identifier" type="text" value="<TMPL_VAR ESCAPE=HTML OPENID_URL>"/>
35                                 <input id="openid_submit" type="submit" value="Login"/>
36                         </div>
37                 </TMPL_IF>
38                 <TMPL_IF LOGIN_SELECTOR_EMAILAUTH>
39                         <div>
40                                 <h3>Email login:</h3>
41                                 <label for="email_address" class="block">Enter your email address:</label>
42                                 <input id="email_address" name="Email_entry" type="text" value="<TMPL_VAR ESCAPE=HTML EMAIL_ADDRESS>"/>
43                                 <input id="email_submit" type="submit" value="Login"/>
44                         </div>
45                 </TMPL_IF>
46                 </div>
48                 <TMPL_IF LOGIN_ERROR>
49                 <div class="error"><TMPL_VAR LOGIN_ERROR></div>
50                 </TMPL_IF>
51                 <TMPL_IF LOGIN_INFO>
52                 <TMPL_VAR LOGIN_INFO>
53                 </TMPL_IF>
54         </div>
55 </form>
57 <div id="otherform">
58 <TMPL_IF OTHERFORM>
59 <br />
60 <noscript>
61 <h3><TMPL_VAR OTHERFORM_LABEL> login:</h3>
62 </noscript>
63 </TMPL_IF>
64 <TMPL_VAR OTHERFORM>
65 </div>