You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
3.5 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. <div class="container" id="body" data-page="user-signin">
  4. <form action="/user/login" method="post" class="form-horizontal card" id="login-card">
  5. {{.CsrfTokenHtml}}
  6. {{if .IsSocialLogin}}
  7. <h3>Social login: 2nd step <small>associate account</small></h3>
  8. {{else}}
  9. <h3>Log in</h3>
  10. {{end}}
  11. {{template "base/alert" .}}
  12. <div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
  13. <label class="col-md-4 control-label">Username: </label>
  14. <div class="col-md-6">
  15. <input name="username" class="form-control" placeholder="Type your username" value="{{.username}}" required="required">
  16. </div>
  17. </div>
  18. <div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
  19. <label class="col-md-4 control-label">Password: </label>
  20. <div class="col-md-6">
  21. <input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required">
  22. </div>
  23. </div>
  24. {{if not .IsSocialLogin}}<div class="form-group">
  25. <div class="col-md-6 col-md-offset-4">
  26. <div class="checkbox">
  27. <label>
  28. <input type="checkbox" name="remember" {{if .remember}}checked{{end}}>
  29. <strong>Remember me</strong>
  30. </label>
  31. </div>
  32. </div>
  33. </div>{{end}}
  34. <div class="form-group">
  35. <div class="col-md-offset-4 col-md-6">
  36. <button type="submit" class="btn btn-lg btn-primary">Log In</button>
  37. {{if not .IsSocialLogin}}<a href="/user/forget_password/">Forgot your password?</a>{{end}}
  38. </div>
  39. </div>
  40. {{if not .IsSocialLogin}}<div class="form-group">
  41. <div class="col-md-offset-4 col-md-6">
  42. <a href="/user/sign_up">Need an account? Sign up now.</a>
  43. </div>
  44. </div>
  45. {{if .OauthEnabled}}
  46. <div class="form-group text-center" id="social-login">
  47. <h4><span>or</span></h4>
  48. <!--
  49. <a href="/user/login/github?next=/user/sign_up" class="btn btn-default facebbok">
  50. <i class="fa fa-facebook-square fa-2x"></i>
  51. <span>Facebook</span>
  52. </a>
  53. <a href="/user/login/github?next=/user/sign_up" class="btn btn-default weibo">
  54. <i class="fa fa-weibo fa-2x"></i>
  55. <span>Weibo</span>
  56. </a>-->
  57. {{if .OauthService.GitHub}}<a href="/user/login/github?next=/user/sign_up" class="btn btn-default"><i class="fa fa-github-square fa-2x"></i><span>GitHub</span></a>{{end}}
  58. {{if .OauthService.Google}}<a href="/user/login/google?next=/user/sign_up" class="btn btn-default"><i class="fa fa-google-plus-square fa-2x"></i><span>Google</span></a>{{end}}
  59. {{if .OauthService.Twitter}}<a href="/user/login/twitter?next=/user/sign_up" class="btn btn-default"><i class="fa fa-twitter-square fa-2x"></i><span>Twitter</span></a>{{end}}
  60. {{if .OauthService.Tencent}}<a href="/user/login/qq?next=/user/sign_up" class="btn btn-default"><i class="fa fa-linux fa-2x"></i><span>Tencent QQ</span></a>{{end}}
  61. {{if .OauthService.Weibo}}<a href="/user/login/weibo?next=/user/sign_up" class="btn btn-default"><i class="fa fa-weibo fa-2x"></i><span>Weibo</span></a>{{end}}
  62. </div>
  63. {{end}}{{end}}
  64. </form>
  65. </div>
  66. {{template "base/footer" .}}