fix pending issues with translation and wrong routes

This commit is contained in:
Lanre Adelowo 2018-07-21 17:29:08 +01:00
parent 4562460b05
commit 5a2ea86adf
4 changed files with 5 additions and 2 deletions

View File

@ -201,6 +201,7 @@ forgot_password_title= Forgot Password
forgot_password = Forgot password?
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.
must_change_password = Update your password
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.
active_your_account = Activate Your Account
prohibit_login = Sign In Prohibited

View File

@ -82,7 +82,7 @@ func NewUserPost(ctx *context.Context, form auth.AdminCreateUserForm) {
Passwd: form.Password,
IsActive: true,
LoginType: models.LoginPlain,
MustChangePassword: false,
MustChangePassword: true,
}
if len(form.LoginType) > 0 {

View File

@ -203,6 +203,8 @@ func RegisterRoutes(m *macaron.Macaron) {
}, openIDSignInEnabled)
m.Get("/sign_up", user.SignUp)
m.Post("/sign_up", bindIgnErr(auth.RegisterForm{}), user.SignUpPost)
m.Get("/change_password", user.MustChangePassword)
m.Post("/change_password", bindIgnErr(auth.MustChangePasswordForm{}), user.MustChangePasswordPost)
m.Get("/reset_password", user.ResetPasswd)
m.Post("/reset_password", user.ResetPasswdPost)
m.Group("/oauth2", func() {

View File

@ -1200,7 +1200,7 @@ func MustChangePassword(ctx *context.Context) {
func MustChangePasswordPost(ctx *context.Context, cpt *captcha.Captcha, form auth.MustChangePasswordForm) {
ctx.Data["Title"] = ctx.Tr("auth.must_change_password")
ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/sign_up"
ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password"
if ctx.HasError() {
ctx.HTML(200, tplMustChangePassword)