summaryrefslogtreecommitdiff
path: root/login-selector.tmpl
blob: 3e7045c63d3b770fdd12a278a5470132cb0f8d3f (plain)
  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>
  16. <form action="<TMPL_VAR CGIURL>" method="get" id="login_selector_form">
  17. <div>
  18. <script>
  19. $('fieldset').append("<legend>Select login method</legend>");
  20. </script>
  21. <input type="hidden" name="do" value="signin" />
  22. <input type="hidden" name="action" value="verify" />
  23. <div id="login_choice">
  24. <div id="login_btns"></div>
  25. </div>
  26. <div id="login_input_area">
  27. <TMPL_IF LOGIN_SELECTOR_OPENID>
  28. <div>
  29. <h3>OpenId login:</h3>
  30. <label for="openid_identifier" class="block">Enter your OpenID:</label>
  31. <input id="openid_identifier" name="openid_identifier" type="text" value="<TMPL_VAR ESCAPE=HTML OPENID_URL>"/>
  32. <input id="openid_submit" type="submit" value="Login"/>
  33. </div>
  34. </TMPL_IF>
  35. <TMPL_IF LOGIN_SELECTOR_EMAILAUTH>
  36. <div>
  37. <h3>Email login:</h3>
  38. <label for="email_address" class="block">Enter your email address:</label>
  39. <input id="email_address" name="Email_entry" type="text" value="<TMPL_VAR ESCAPE=HTML EMAIL_ADDRESS>"/>
  40. <input id="email_submit" type="submit" value="Login"/>
  41. </div>
  42. </TMPL_IF>
  43. </div>
  44. <TMPL_IF LOGIN_ERROR>
  45. <div class="error"><TMPL_VAR LOGIN_ERROR></div>
  46. </TMPL_IF>
  47. <TMPL_IF LOGIN_INFO>
  48. <TMPL_VAR LOGIN_INFO>
  49. </TMPL_IF>
  50. </div>
  51. </form>
  52. <div id="otherform">
  53. <TMPL_IF OTHERFORM>
  54. <br />
  55. <noscript>
  56. <h3><TMPL_VAR OTHERFORM_LABEL> login:</h3>
  57. </noscript>
  58. </TMPL_IF>
  59. <TMPL_VAR OTHERFORM>
  60. </div>