diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-05 12:32:34 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-05 12:32:34 -0400 |
commit | b7c3b0cc73ad8721e2eec59d018a91850ba7f750 (patch) | |
tree | dd0bea39e518efe4c56f19397c0f583d98a6732c /templates/user | |
parent | 3ebc9b991a70e10c4b2c6319c1ff6195c0d75a17 (diff) | |
download | gitea-b7c3b0cc73ad8721e2eec59d018a91850ba7f750.tar.gz gitea-b7c3b0cc73ad8721e2eec59d018a91850ba7f750.zip |
Add reset password, fix #58
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/forgot_passwd.tmpl | 30 | ||||
-rw-r--r-- | templates/user/reset_passwd.tmpl | 26 | ||||
-rw-r--r-- | templates/user/signin.tmpl | 2 |
3 files changed, 57 insertions, 1 deletions
diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl new file mode 100644 index 0000000000..ff25406fd0 --- /dev/null +++ b/templates/user/forgot_passwd.tmpl @@ -0,0 +1,30 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +<div id="body" class="container"> + <form action="/user/forget_password" method="post" class="form-horizontal card" id="login-card"> + {{.CsrfTokenHtml}} + <h3>Reset Your Password</h3> + <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{if .IsResetSent}} + <p>A confirmation e-mail has been sent to <b>{{.Email}}</b>, please check your inbox within {{.Hours}} hours.</p> + <hr/> + <a href="http://{{Mail2Domain .Email}}" class="btn btn-lg btn-success">Sign in to your e-mail</a> + {{else if .IsResetRequest}} + <div class="form-group {{if .Err_Email}}has-error has-feedback{{end}}"> + <label class="col-md-3 control-label">Email: </label> + <div class="col-md-7"> + <input name="email" class="form-control" placeholder="Type your e-mail address" required="required"> + </div> + </div> + <hr/> + <div class="form-group"> + <div class="col-md-offset-4 col-md-6"> + <button type="submit" class="btn btn-lg btn-primary">Click here to send reset confirmation e-mail</button> + </div> + </div> + {{else if .IsResetDisable}} + <p>Sorry, mail service is not enabled.</p> + {{end}} + </form> +</div> +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/user/reset_passwd.tmpl b/templates/user/reset_passwd.tmpl new file mode 100644 index 0000000000..9190c7c13c --- /dev/null +++ b/templates/user/reset_passwd.tmpl @@ -0,0 +1,26 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +<div id="body" class="container"> + <form action="/user/reset_password?code={{.Code}}" method="post" class="form-horizontal card" id="login-card"> + {{.CsrfTokenHtml}} + <h3>Reset Your Pasword</h3> + <div class="alert alert-danger form-error{{if .HasError}}{{else}} hidden{{end}}">{{.ErrorMsg}}</div> + {{if .IsResetForm}} + <div class="form-group"> + <label class="col-md-4 control-label">Password: </label> + <div class="col-md-6"> + <input name="passwd" type="password" class="form-control" placeholder="Type your password" required="required"> + </div> + </div> + <hr/> + <div class="form-group"> + <div class="col-md-offset-4 col-md-6"> + <button type="submit" class="btn btn-lg btn-primary">Click here to reset your password</button> + </div> + </div> + {{else}} + <p>Sorry, your confirmation code has been exipired or not valid.</p> + {{end}} + </form> +</div> +{{template "base/footer" .}}
\ No newline at end of file diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl index b6c39af1b8..43f47e4121 100644 --- a/templates/user/signin.tmpl +++ b/templates/user/signin.tmpl @@ -33,7 +33,7 @@ <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> - <a href="/forget-password/">Forgot your password?</a> + <a href="/user/forget_password/">Forgot your password?</a> </div> </div> |