2014-03-02 02:31:06 -05:00
|
|
|
{{template "base/head" .}}
|
|
|
|
{{template "base/navbar" .}}
|
2014-03-25 06:44:37 -04:00
|
|
|
<div class="container" id="body" data-page="user-signin">
|
|
|
|
<form action="/user/login" method="post" class="form-horizontal card" id="login-card">
|
2014-03-22 13:44:02 -04:00
|
|
|
{{.CsrfTokenHtml}}
|
2014-04-13 18:12:07 -04:00
|
|
|
{{if .IsSocialLogin}}
|
|
|
|
<h3>Social login: 2nd step <small>associate account</small></h3>
|
|
|
|
{{else}}
|
|
|
|
<h3>Log in</h3>
|
|
|
|
{{end}}
|
2014-04-10 16:36:50 -04:00
|
|
|
{{template "base/alert" .}}
|
2014-03-06 11:42:14 -05:00
|
|
|
<div class="form-group {{if .Err_UserName}}has-error has-feedback{{end}}">
|
2014-04-27 03:54:08 -04:00
|
|
|
<label class="col-md-4 control-label">Username or e-mail: </label>
|
2014-03-02 02:31:06 -05:00
|
|
|
<div class="col-md-6">
|
2014-03-06 11:42:14 -05:00
|
|
|
<input name="username" class="form-control" placeholder="Type your username" value="{{.username}}" required="required">
|
2014-03-02 02:31:06 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-06 11:42:14 -05:00
|
|
|
|
|
|
|
<div class="form-group {{if .Err_Password}}has-error has-feedback{{end}}">
|
2014-03-02 02:31:06 -05:00
|
|
|
<label class="col-md-4 control-label">Password: </label>
|
|
|
|
<div class="col-md-6">
|
2014-03-03 07:35:44 -05:00
|
|
|
<input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required">
|
2014-03-02 02:31:06 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-04-13 18:12:07 -04:00
|
|
|
|
|
|
|
{{if not .IsSocialLogin}}<div class="form-group">
|
2014-03-22 16:40:09 -04:00
|
|
|
<div class="col-md-6 col-md-offset-4">
|
|
|
|
<div class="checkbox">
|
|
|
|
<label>
|
|
|
|
<input type="checkbox" name="remember" {{if .remember}}checked{{end}}>
|
|
|
|
<strong>Remember me</strong>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-04-13 18:12:07 -04:00
|
|
|
</div>{{end}}
|
2014-03-22 16:40:09 -04:00
|
|
|
|
2014-03-02 02:31:06 -05:00
|
|
|
<div class="form-group">
|
|
|
|
<div class="col-md-offset-4 col-md-6">
|
|
|
|
<button type="submit" class="btn btn-lg btn-primary">Log In</button>
|
2014-04-13 18:12:07 -04:00
|
|
|
{{if not .IsSocialLogin}}<a href="/user/forget_password/">Forgot your password?</a>{{end}}
|
2014-03-02 02:31:06 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-06 11:42:14 -05:00
|
|
|
|
2014-04-13 18:12:07 -04:00
|
|
|
{{if not .IsSocialLogin}}<div class="form-group">
|
2014-03-02 02:31:06 -05:00
|
|
|
<div class="col-md-offset-4 col-md-6">
|
2014-03-06 11:42:14 -05:00
|
|
|
<a href="/user/sign_up">Need an account? Sign up now.</a>
|
2014-03-02 02:31:06 -05:00
|
|
|
</div>
|
|
|
|
</div>
|
2014-03-06 11:42:14 -05:00
|
|
|
|
2014-04-12 01:50:27 -04:00
|
|
|
{{if .OauthEnabled}}
|
2014-03-25 06:44:37 -04:00
|
|
|
<div class="form-group text-center" id="social-login">
|
2014-04-12 01:50:27 -04:00
|
|
|
<h4><span>or</span></h4>
|
2014-04-13 18:12:07 -04:00
|
|
|
<!--
|
2014-04-12 01:50:27 -04:00
|
|
|
<a href="/user/login/github?next=/user/sign_up" class="btn btn-default facebbok">
|
|
|
|
<i class="fa fa-facebook-square fa-2x"></i>
|
|
|
|
<span>Facebook</span>
|
|
|
|
</a>
|
|
|
|
<a href="/user/login/github?next=/user/sign_up" class="btn btn-default weibo">
|
|
|
|
<i class="fa fa-weibo fa-2x"></i>
|
|
|
|
<span>Weibo</span>
|
|
|
|
</a>-->
|
2014-04-13 18:12:07 -04:00
|
|
|
{{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}}
|
|
|
|
{{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}}
|
2014-04-13 21:00:12 -04:00
|
|
|
{{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}}
|
|
|
|
{{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}}
|
|
|
|
{{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}}
|
2014-03-02 02:31:06 -05:00
|
|
|
</div>
|
2014-04-13 18:12:07 -04:00
|
|
|
{{end}}{{end}}
|
2014-03-02 02:31:06 -05:00
|
|
|
</form>
|
|
|
|
</div>
|
2014-04-11 13:01:30 -04:00
|
|
|
{{template "base/footer" .}}
|