register.html 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title langtag="title-register"></title>
  7. <!-- Mainly scripts -->
  8. <!-- Latest compiled and minified CSS -->
  9. <link href="{{.web_base_url}}/static/css/fontawesome.min.css" rel="stylesheet">
  10. <link href="{{.web_base_url}}/static/css/solid.min.css" rel="stylesheet">
  11. <link href="{{.web_base_url}}/static/css/bootstrap.min.css" rel="stylesheet">
  12. <link href="{{.web_base_url}}/static/css/style.css" rel="stylesheet">
  13. <!-- Latest compiled and minified JavaScript -->
  14. <script src="{{.web_base_url}}/static/js/jquery-3.4.1.min.js"></script>
  15. <script src="{{.web_base_url}}/static/js/bootstrap.min.js"></script>
  16. <!-- Latest compiled and minified Locales -->
  17. <script src="{{.web_base_url}}/static/js/language.js" type="text/javascript"></script>
  18. </head>
  19. <body class="gray-bg">
  20. <div class="row border-bottom">
  21. <nav class="navbar navbar-static-top navbar-right" role="navigation" style="margin: 20px 40px">
  22. <div></div>
  23. <span class="btn-group dropdown">
  24. <button id="languagemenu" class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-globe-asia fa-lg"></i><span></span></button>
  25. <ul class="dropdown-menu"></ul>
  26. </span>
  27. </nav>
  28. </div>
  29. <div class="middle-box text-center loginscreen animated fadeInDown">
  30. <div>
  31. <h1 class="logo-name" langtag="application"></h1>
  32. </div>
  33. <h3 langtag="info-register"></h3>
  34. <p langtag="info-createaccount"></p>
  35. <form class="m-t" role="form" onsubmit="return false">
  36. <div class="form-group">
  37. <input type="text" class="form-control" placeholder="username" name="username" required="" langtag="word-username">
  38. </div>
  39. <div class="form-group">
  40. <input type="password" class="form-control" placeholder="password" name="password" required="" langtag="word-password">
  41. </div>
  42. <button onclick="register()" type="submit" class="btn btn-primary block full-width m-b" langtag="word-register"></button>
  43. <p class="text-muted text-center"><small langtag="info-haveaccount"></small></p>
  44. <a class="btn btn-sm btn-white btn-block" href="{{.web_base_url}}/login/index" langtag="word-login"></a>
  45. </form>
  46. </div>
  47. <hr/>
  48. <div class="footer">
  49. <div class="pull-right">
  50. <span langtag="word-readmore"></span> <strong><a href="https://ehang.io/nps" langtag="word-go"></a></strong>
  51. </div>
  52. <div><strong langtag="word-copyright"></strong> <span langtag="application"></span> &copy; 2018-2019</div>
  53. </div>
  54. <script>
  55. window.nps = { "web_base_url": {{.web_base_url}} }
  56. function register() {
  57. $.ajax({
  58. type: "POST",
  59. url: "{{.web_base_url}}/login/register",
  60. data: $("form").serializeArray(),
  61. success: function (res) {
  62. alert(res.msg)
  63. if (res.status) {
  64. window.location.href = "{{.web_base_url}}/login/index"
  65. }
  66. }
  67. })
  68. return false
  69. }
  70. </script>
  71. </body>
  72. </html>