1
0
Fork 0
forked from forgejo/forgejo

#697 and #1606 and new admin edit user UI

This commit is contained in:
Unknwon 2015-09-13 11:07:21 -04:00
parent e5ed5904c6
commit 83e747bfda
15 changed files with 183 additions and 156 deletions

View file

@ -151,7 +151,7 @@ func oauthSignUp(ctx *middleware.Context, sid int64) {
func SignUp(ctx *middleware.Context) {
ctx.Data["Title"] = ctx.Tr("sign_up")
ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha
ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha
if setting.Service.DisableRegistration {
ctx.Data["DisableRegistration"] = true
@ -170,7 +170,7 @@ func SignUp(ctx *middleware.Context) {
func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.RegisterForm) {
ctx.Data["Title"] = ctx.Tr("sign_up")
ctx.Data["DisableCaptcha"] = setting.Service.DisableCaptcha
ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha
if setting.Service.DisableRegistration {
ctx.Error(403)
@ -188,7 +188,7 @@ func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.Registe
return
}
if !setting.Service.DisableCaptcha && !cpt.VerifyReq(ctx.Req) {
if setting.Service.EnableCaptcha && !cpt.VerifyReq(ctx.Req) {
ctx.Data["Err_Captcha"] = true
ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), SIGNUP, &form)
return