merge ux account recovery
This commit is contained in:
parent
279f4b65f8
commit
685995b1ca
|
@ -73,7 +73,7 @@ func SendActivateAccountMail(c *macaron.Context, u *User) {
|
||||||
|
|
||||||
// SendResetPasswordMail sends a password reset mail to the user
|
// SendResetPasswordMail sends a password reset mail to the user
|
||||||
func SendResetPasswordMail(c *macaron.Context, u *User) {
|
func SendResetPasswordMail(c *macaron.Context, u *User) {
|
||||||
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "reset password")
|
SendUserMail(c, u, mailAuthResetPassword, u.GenerateActivateCode(), c.Tr("mail.reset_password"), "recover account")
|
||||||
}
|
}
|
||||||
|
|
||||||
// SendActivateEmailMail sends confirmation email to confirm new email address
|
// SendActivateEmailMail sends confirmation email to confirm new email address
|
||||||
|
|
|
@ -200,18 +200,19 @@ forgot_password_title= Forgot Password
|
||||||
forgot_password = Forgot password?
|
forgot_password = Forgot password?
|
||||||
sign_up_now = Need an account? Register now.
|
sign_up_now = Need an account? Register now.
|
||||||
confirmation_mail_sent_prompt = A new confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the registration process.
|
confirmation_mail_sent_prompt = A new confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the registration process.
|
||||||
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the password reset process.
|
reset_password_mail_sent_prompt = A confirmation email has been sent to <b>%s</b>. Please check your inbox within the next %s to complete the account recovery process.
|
||||||
active_your_account = Activate Your Account
|
active_your_account = Activate Your Account
|
||||||
prohibit_login = Sign In Prohibited
|
prohibit_login = Sign In Prohibited
|
||||||
prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator.
|
prohibit_login_desc = Your account is prohibited to sign in, please contact your site administrator.
|
||||||
resent_limit_prompt = You have already requested an activation email recently. Please wait 3 minutes and try again.
|
resent_limit_prompt = You have already requested an activation email recently. Please wait 3 minutes and try again.
|
||||||
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
|
has_unconfirmed_mail = Hi %s, you have an unconfirmed email address (<b>%s</b>). If you haven't received a confirmation email or need to resend a new one, please click on the button below.
|
||||||
resend_mail = Click here to resend your activation email
|
resend_mail = Resend Activation Email
|
||||||
email_not_associate = The email address is not associated with any account.
|
email_not_associate = The email address is not associated with any account.
|
||||||
send_reset_mail = Click here to resend your password reset email
|
send_reset_mail = Resend Account Recovery Email
|
||||||
reset_password = Reset Your Password
|
reset_password = Account Recovery
|
||||||
invalid_code = Your confirmation code is invalid or has expired.
|
invalid_code = Your confirmation code is invalid or has expired.
|
||||||
reset_password_helper = Click here to reset your password
|
reset_password_helper = Recover Account
|
||||||
|
reset_password_wrong_user = You are signed in as %s, but the account recovery link is for %s
|
||||||
password_too_short = Password length cannot be less than %d characters.
|
password_too_short = Password length cannot be less than %d characters.
|
||||||
non_local_account = Non-local users can not update their password through the Gitea web interface.
|
non_local_account = Non-local users can not update their password through the Gitea web interface.
|
||||||
verify = Verify
|
verify = Verify
|
||||||
|
@ -234,12 +235,12 @@ openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new
|
||||||
openid_register_title = Create new account
|
openid_register_title = Create new account
|
||||||
openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here.
|
openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here.
|
||||||
openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry.
|
openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry.
|
||||||
disable_forgot_password_mail = Password reset is disabled. Please contact your site administrator.
|
disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator.
|
||||||
|
|
||||||
[mail]
|
[mail]
|
||||||
activate_account = Please activate your account
|
activate_account = Please activate your account
|
||||||
activate_email = Verify your email address
|
activate_email = Verify your email address
|
||||||
reset_password = Reset your password
|
reset_password = Recover your account
|
||||||
register_success = Registration successful
|
register_success = Registration successful
|
||||||
register_notify = Welcome to Gitea
|
register_notify = Welcome to Gitea
|
||||||
|
|
||||||
|
@ -1497,7 +1498,7 @@ config.mail_notify = Enable Email Notifications
|
||||||
config.disable_key_size_check = Disable Minimum Key Size Check
|
config.disable_key_size_check = Disable Minimum Key Size Check
|
||||||
config.enable_captcha = Enable CAPTCHA
|
config.enable_captcha = Enable CAPTCHA
|
||||||
config.active_code_lives = Active Code Lives
|
config.active_code_lives = Active Code Lives
|
||||||
config.reset_password_code_lives = Reset Password Code Expiry Time
|
config.reset_password_code_lives = Recover Account Code Expiry Time
|
||||||
config.default_keep_email_private = Hide Email Addresses by Default
|
config.default_keep_email_private = Hide Email Addresses by Default
|
||||||
config.default_allow_create_organization = Allow Creation of Organizations by Default
|
config.default_allow_create_organization = Allow Creation of Organizations by Default
|
||||||
config.enable_timetracking = Enable Time Tracking
|
config.enable_timetracking = Enable Time Tracking
|
||||||
|
|
|
@ -184,10 +184,6 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
|
m.Get("/^:type(issues|pulls)$", reqSignIn, user.Issues)
|
||||||
|
|
||||||
// ***** START: User *****
|
// ***** START: User *****
|
||||||
m.Group("/user", func() {
|
|
||||||
m.Get("/reset_password", user.ResetPasswd)
|
|
||||||
m.Post("/reset_password", user.ResetPasswdPost)
|
|
||||||
})
|
|
||||||
m.Group("/user", func() {
|
m.Group("/user", func() {
|
||||||
m.Get("/login", user.SignIn)
|
m.Get("/login", user.SignIn)
|
||||||
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
|
m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost)
|
||||||
|
@ -295,6 +291,8 @@ func RegisterRoutes(m *macaron.Macaron) {
|
||||||
m.Any("/activate", user.Activate)
|
m.Any("/activate", user.Activate)
|
||||||
m.Any("/activate_email", user.ActivateEmail)
|
m.Any("/activate_email", user.ActivateEmail)
|
||||||
m.Get("/email2user", user.Email2User)
|
m.Get("/email2user", user.Email2User)
|
||||||
|
m.Get("/recover_account", user.ResetPasswd)
|
||||||
|
m.Post("/recover_account", user.ResetPasswdPost)
|
||||||
m.Get("/forgot_password", user.ForgotPasswd)
|
m.Get("/forgot_password", user.ForgotPasswd)
|
||||||
m.Post("/forgot_password", user.ForgotPasswdPost)
|
m.Post("/forgot_password", user.ForgotPasswdPost)
|
||||||
m.Get("/logout", user.SignOut)
|
m.Get("/logout", user.SignOut)
|
||||||
|
|
|
@ -1144,7 +1144,7 @@ func ForgotPasswdPost(ctx *context.Context) {
|
||||||
ctx.HTML(200, tplForgotPassword)
|
ctx.HTML(200, tplForgotPassword)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResetPasswd render the reset password page
|
// ResetPasswd render the account recovery page
|
||||||
func ResetPasswd(ctx *context.Context) {
|
func ResetPasswd(ctx *context.Context) {
|
||||||
ctx.Data["Title"] = ctx.Tr("auth.reset_password")
|
ctx.Data["Title"] = ctx.Tr("auth.reset_password")
|
||||||
|
|
||||||
|
@ -1160,7 +1160,7 @@ func ResetPasswd(ctx *context.Context) {
|
||||||
ctx.HTML(200, tplResetPassword)
|
ctx.HTML(200, tplResetPassword)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ResetPasswdPost response from reset password request
|
// ResetPasswdPost response from account recovery request
|
||||||
func ResetPasswdPost(ctx *context.Context) {
|
func ResetPasswdPost(ctx *context.Context) {
|
||||||
ctx.Data["Title"] = ctx.Tr("auth.reset_password")
|
ctx.Data["Title"] = ctx.Tr("auth.reset_password")
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<body>
|
<body>
|
||||||
<p>Hi <b>{{.Username}}</b>,</p>
|
<p>Hi <b>{{.Username}}</b>,</p>
|
||||||
<p>Please click the following link to reset your password within <b>{{.ResetPwdCodeLives}}</b>:</p>
|
<p>Please click the following link to reset your password within <b>{{.ResetPwdCodeLives}}</b>:</p>
|
||||||
<p><a href="{{AppUrl}}user/reset_password?code={{.Code}}">{{AppUrl}}user/reset_password?code={{.Code}}</a></p>
|
<p><a href="{{AppUrl}}user/recover_account?code={{.Code}}">{{AppUrl}}user/recover_account?code={{.Code}}</a></p>
|
||||||
<p>Not working? Try copying and pasting it to your browser.</p>
|
<p>Not working? Try copying and pasting it to your browser.</p>
|
||||||
<p>© <a target="_blank" rel="noopener" href="{{AppUrl}}">{{AppName}}</a></p>
|
<p>© <a target="_blank" rel="noopener" href="{{AppUrl}}">{{AppName}}</a></p>
|
||||||
</body>
|
</body>
|
||||||
|
|
Loading…
Reference in New Issue