aboutsummaryrefslogtreecommitdiff
path: root/templates/user
diff options
context:
space:
mode:
authorskyblue <ssx205@gmail.com>2014-04-06 23:12:29 +0800
committerskyblue <ssx205@gmail.com>2014-04-06 23:12:29 +0800
commit5e534bf2a56a2f4e36d039699ba60946f993574b (patch)
tree17fd6a6dde814567538fe1a84126f83303df3904 /templates/user
parenta04918e36d49e1d066c6f661a73eebf706a97237 (diff)
parentd3a987eded8bf2d0afc35dce32238e59da8080a8 (diff)
Merge branch 'dev' of github.com:gogits/gogs into dev
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/forgot_passwd.tmpl30
-rw-r--r--templates/user/reset_passwd.tmpl26
-rw-r--r--templates/user/setting.tmpl5
-rw-r--r--templates/user/signin.tmpl2
4 files changed, 60 insertions, 3 deletions
diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl
new file mode 100644
index 00000000..ff25406f
--- /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 00000000..9190c7c1
--- /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/setting.tmpl b/templates/user/setting.tmpl
index b32689fe..d5828338 100644
--- a/templates/user/setting.tmpl
+++ b/templates/user/setting.tmpl
@@ -10,9 +10,10 @@
{{if .IsSuccess}}<p class="alert alert-success">Your profile has been successfully updated.</p>{{else if .HasError}}<p class="alert alert-danger form-error">{{.ErrorMsg}}</p>{{end}}
<p>Your Email will be public and used for Account related notifications and any web based operations made via the web.</p>
<div class="form-group">
- <label class="col-md-2 control-label">Username<strong class="text-danger">*</strong></label>
+ <label class="col-md-2 control-label" for="user-setting-username">Username<strong class="text-danger">*</strong></label>
<div class="col-md-8">
- <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}">
+ <input name="username" class="form-control" placeholder="Type your user name" required="required" value="{{.SignedUser.Name}}" title="{{.SignedUser.Name}}" id="user-setting-username">
+ <p class="help-block hidden"><span class="text-danger">Cautious : </span>your username is changing !</p>
</div>
</div>
diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl
index b6c39af1..43f47e41 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>