login.tx 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. : include "components/header.tx";
  2. : include "jsalert.tx";
  3. <style>
  4. #jsalert {
  5. margin-top: 1rem;
  6. }
  7. </style>
  8. <div id="login">
  9. <div>
  10. <img id="logo" src="/img/icon/favicon.svg" style="float:left" /><span style="font-family:courier;font-size:2rem;">CMS Login</span>
  11. </div>
  12. <div id="spacer" style="clear: both;"><br /></div>
  13. <form method="POST" action="/auth">
  14. <input type="hidden" name="app" value="login" />
  15. <input type="hidden" name="to" value="<: $to :>" />
  16. Username<br />
  17. <div class="input-group">
  18. <label for="username">😎</span></label>
  19. <input required name="username" id="username" placeholder="AzureDiamond" value="" type="text" autofocus></input>
  20. </div>
  21. <br />
  22. Password<br />
  23. <div class="input-group">
  24. <label for="password">🔑</label>
  25. <input required name="password" id="password" placeholder="hunter2" value="" type="password"></input>
  26. </div>
  27. <br />
  28. : if ($has_users) {
  29. TOTP 2FA code <a style="cursor:help" title="only needed if 2FA enabled">ℹ️ </a><br />
  30. <div class="input-group">
  31. <label for="token">🔒</label>
  32. <input name="token" id="token" placeholder="7779311" value="" type="password"></input>
  33. </div>
  34. <br />
  35. : } else {
  36. Display Name:<br />
  37. <div class="input-group">
  38. <label for="display_name">📛</label>
  39. <input required name="display_name" id="contact_email" placeholder="Mr. President" value="" type="text"></input>
  40. </div>
  41. <br />
  42. Contact Email:<br />
  43. <div class="input-group">
  44. <label for="contact_email">📧</label>
  45. <input required name="contact_email" id="contact_email" placeholder="bl00d_n1nja@wh.gov" value="" type="text"></input>
  46. </div>
  47. <br />
  48. : }
  49. <input type="submit" id="maximumGo" value="<: $btnmsg :>"></input>
  50. </form>
  51. : if ($has_users) {
  52. <div id="resetpass">
  53. <a href="/password_reset">Reset Password</a>
  54. </div>
  55. : }
  56. </div>
  57. : include "components/footer.tx";