summaryrefslogtreecommitdiffstats
path: root/templates/user
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2014-08-09 21:02:00 -0700
committerUnknwon <joe2010xtmf@163.com>2014-08-09 21:02:00 -0700
commit7af7584d25f48309a70083c30805ebb8454611f0 (patch)
treef1f20d5fafe8f023392ce35931221ba2cee2fe35 /templates/user
parent5605af973b440add79b1c32c911bee03fa821a4e (diff)
downloadgitea-7af7584d25f48309a70083c30805ebb8454611f0.tar.gz
gitea-7af7584d25f48309a70083c30805ebb8454611f0.zip
Finish new reset password, etc.
Diffstat (limited to 'templates/user')
-rw-r--r--templates/user/activate.tmpl43
-rw-r--r--templates/user/forgot_passwd.tmpl52
-rw-r--r--templates/user/reset_passwd.tmpl39
-rw-r--r--templates/user/signin.tmpl22
-rw-r--r--templates/user/signup.tmpl32
5 files changed, 95 insertions, 93 deletions
diff --git a/templates/user/activate.tmpl b/templates/user/activate.tmpl
index 1df3646b6d..acdad9e80b 100644
--- a/templates/user/activate.tmpl
+++ b/templates/user/activate.tmpl
@@ -1,36 +1,39 @@
-{{template "base/head" .}}
-{{template "base/navbar" .}}
-<div id="body" class="container">
- <form action="/user/activate" method="post" class="form-horizontal card" id="login-card">
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="sign-wrapper">
+ <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="/user/activate" method="post">
{{.CsrfTokenHtml}}
- <h3>Activate Your Account</h3>
+ <div class="panel-header">
+ <h2>{{.i18n.Tr "auth.active_your_account"}}</h2>
+ </div>
+ <div class="panel-content">
{{if .IsActivatePage}}
{{if .ServiceNotEnabled}}
- <p>Sorry, Register Mail Confirmation has been disabled.</p>
+ <p>{{.i18n.Tr "auth.disable_register_mail"}}</p>
{{else if .ResendLimited}}
- <p>Sorry, you are sending an activation e-mail too frequently. Please wait 3 minutes.</p>
+ <p>{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
{{else}}
- <p>A new confirmation e-mail has been sent to <b>{{.SignedUser.Email}}</b>, please check your inbox within the next {{.Hours}} hours to complete your registration.</p>
+ <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .Hours | Str2html}}</p>
<hr/>
- <a href="http://{{Mail2Domain .SignedUser.Email}}" class="btn btn-lg btn-success">Sign in to your e-mail</a>
+ <label></label>
+ <a class="btn btn-green btn-large btn-link btn-radius" href="http://{{Mail2Domain .SignedUser.Email}}">{{.i18n.Tr "auth.sign_in_email"}}</a>
{{end}}
{{else}}
{{if .IsSendRegisterMail}}
- <p>A confirmation e-mail has been sent to <b>{{.Email}}</b>, please check your inbox within the next {{.Hours}} hours to complete your registration.</p>
+ <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p>
<hr/>
- <a href="http://{{Mail2Domain .Email}}" class="btn btn-lg btn-success">Sign in to your e-mail</a>
+ <label></label>
+ <a class="btn btn-green btn-large btn-link btn-radius" href="http://{{Mail2Domain .Email}}">{{.i18n.Tr "auth.sign_in_email"}}</a>
{{else if .IsActivateFailed}}
- <p>Sorry, your confirmation code has exipired or not valid.</p>
+ <p>{{.i18n.Tr "auth.invalid_code"}}</p>
{{else}}
- <p>Hi, {{.SignedUser.Name}}, you have an unconfirmed email address(<b>{{.SignedUser.Email}}</b>). If you haven't received a confirmation e-mail or need to resend a new one, please click on the button below.</p>
- <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 resend your activation e-mail</button>
- </div>
- </div>
+ <p>{{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}</p>
+ <hr/>
+ <label></label>
+ <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "auth.resend_mail"}}</button>
{{end}}
{{end}}
+ </div>
</form>
</div>
-{{template "base/footer" .}}
+{{template "ng/base/footer" .}}
diff --git a/templates/user/forgot_passwd.tmpl b/templates/user/forgot_passwd.tmpl
index 57564ffd4f..3b5512673b 100644
--- a/templates/user/forgot_passwd.tmpl
+++ b/templates/user/forgot_passwd.tmpl
@@ -1,32 +1,32 @@
-{{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">
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="sign-wrapper">
+ <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="/user/forget_password" method="post">
{{.CsrfTokenHtml}}
- <h3>Reset Your Password</h3>
- {{template "base/alert" .}}
- {{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 class="panel-header">
+ <h2>{{.i18n.Tr "auth.forgot_password"}}</h2>
</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 resend confirmation e-mail</button>
+ <div class="panel-content">
+ {{template "ng/base/alert" .}}
+ {{if .IsResetSent}}
+ <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p>
+ <hr/>
+ <label></label>
+ <a class="btn btn-green btn-large btn-link btn-radius" href="http://{{Mail2Domain .Email}}">{{.i18n.Tr "auth.sign_in_email"}}</a>
+ {{else if .IsResetRequest}}
+ <div class="field">
+ <label class="req" for="email">{{.i18n.Tr "email"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}"required/>
</div>
+ <hr/>
+ <label></label>
+ <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "auth.send_reset_mail"}}</button>
+ {{else if .IsResetDisable}}
+ <p>{{.i18n.Tr "auth.disable_register_mail"}}</p>
+ {{else if .ResendLimited}}
+ <p>{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
+ {{end}}
</div>
- {{else if .IsResetDisable}}
- <p>Sorry, mail service is not enabled.</p>
- {{else if .ResendLimited}}
- <p>Sorry, you are sending an e-mail too frequently, please wait another 3 minutes and try again.</p>
- {{end}}
</form>
</div>
-{{template "base/footer" .}}
+{{template "ng/base/footer" .}}
diff --git a/templates/user/reset_passwd.tmpl b/templates/user/reset_passwd.tmpl
index a2a5ca9ece..d17abde2ba 100644
--- a/templates/user/reset_passwd.tmpl
+++ b/templates/user/reset_passwd.tmpl
@@ -1,26 +1,25 @@
-{{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">
+{{template "ng/base/head" .}}
+{{template "ng/base/header" .}}
+<div id="sign-wrapper">
+ <form class="form-align form panel sign-panel sign-form container panel-radius" id="sign-up-form" action="/user/reset_password?code={{.Code}}" method="post">
{{.CsrfTokenHtml}}
- <h3>Reset Your Pasword</h3>
- {{template "base/alert" .}}
- {{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 class="panel-header">
+ <h2>{{.i18n.Tr "auth.reset_password"}}</h2>
</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 class="panel-content">
+ {{template "ng/base/alert" .}}
+ {{if .IsResetForm}}
+ <div class="field">
+ <label class="req" for="password">{{.i18n.Tr "password"}}</label>
+ <input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" value="{{.password}}" required/>
</div>
+ <hr/>
+ <label></label>
+ <button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "auth.reset_password_helper"}}</button>
+ {{else}}
+ <p>{{.i18n.Tr "auth.invalid_code"}}</p>
+ {{end}}
</div>
- {{else}}
- <p>Sorry, your confirmation code has expired or is not valid.</p>
- {{end}}
</form>
</div>
-{{template "base/footer" .}}
+{{template "ng/base/footer" .}}
diff --git a/templates/user/signin.tmpl b/templates/user/signin.tmpl
index bc5c0c0c86..c2f6ef877a 100644
--- a/templates/user/signin.tmpl
+++ b/templates/user/signin.tmpl
@@ -7,30 +7,30 @@
</div>
<div class="panel-content">
{{template "ng/base/alert" .}}
- <p class="field">
+ <div class="field">
<label class="req" for="username">{{.i18n.Tr "home.uname_holder"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label class="req" for="password">{{.i18n.Tr "password"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" required/>
- </p>
+ </div>
{{if not .IsSocialLogin}}
- <p class="field">
+ <div class="field">
<span class="form-label"></span>
<input class="ipt-chk" id="remember" name="remember" type="checkbox"/>&nbsp;&nbsp;&nbsp;&nbsp;<strong>{{.i18n.Tr "auth.remember_me"}}</strong>
- </p>
+ </div>
{{end}}
- <p class="field">
+ <div class="field">
<span class="form-label"></span>
<button class="btn btn-green btn-large btn-radius">{{.i18n.Tr "sign_in"}}</button>&nbsp;&nbsp;&nbsp;&nbsp;
{{if not .IsSocialLogin}}<a href="/user/forget_password">{{.i18n.Tr "auth.forget_password"}}</a>{{end}}
- </p>
+ </div>
{{if not .IsSocialLogin}}
- <p class="field">
- <span class="form-label"></span>
+ <div class="field">
+ <label></label>
<a href="/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
- </p>
+ </div>
{{if .OauthEnabled}}
<hr/>
<div id="sign-social" class="text-center social-buttons">
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl
index 8d4a572ef5..b4736a07ce 100644
--- a/templates/user/signup.tmpl
+++ b/templates/user/signup.tmpl
@@ -10,38 +10,38 @@
{{if .DisableRegistration}}
<p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
{{else}}
- <p class="field">
+ <div class="field">
<label class="req" for="username">{{.i18n.Tr "username"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_UserName}}ipt-error{{end}}" id="username" name="uname" type="text" value="{{.uname}}" required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.email}}"required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label class="req" for="password">{{.i18n.Tr "password"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="password" name="password" type="password" value="{{.password}}" required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label class="req" for="re-type">{{.i18n.Tr "re_type"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Password}}ipt-error{{end}}" id="re-type" name="retype" type="password" required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label></label>
{{.Captcha.CreateHtml}}
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<label class="req" for="captcha">{{.i18n.Tr "captcha"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_Captcha}}ipt-error{{end}}" id="captcha" name="captcha" type="text" required/>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<span class="form-label"></span>
<button class="btn btn-blue btn-large btn-radius">{{.i18n.Tr "auth.create_new_account"}}</button>
- </p>
- <p class="field">
+ </div>
+ <div class="field">
<span class="form-label"></span>
<a href="/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a>
- </p>
+ </div>
{{end}}
</div>
</form>