diff options
author | 赵智超 <1012112796@qq.com> | 2020-05-13 02:01:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 19:01:15 +0100 |
commit | b00e62c12b5aca49e523f9d8c91b22fd590ce577 (patch) | |
tree | 8dc5e9180c3c09ae2ae1c46ee3ea9c19a291bb07 | |
parent | 08611fb765214544ac5b34bb909f8d8c242ea4f3 (diff) | |
download | gitea-b00e62c12b5aca49e523f9d8c91b22fd590ce577.tar.gz gitea-b00e62c12b5aca49e523f9d8c91b22fd590ce577.zip |
ui: Replenish the missing ‘PageIsSignUp’ in sign up view (#11390)
Signed-off-by: a1012112796 <1012112796@qq.com>
-rw-r--r-- | routers/user/auth.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index a8ff92ae59..4f01062e3f 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1028,6 +1028,7 @@ func SignUp(ctx *context.Context) { ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL ctx.Data["CaptchaType"] = setting.Service.CaptchaType ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["PageIsSignUp"] = true //Show Disabled Registration message if DisableRegistration or AllowOnlyExternalRegistration options are true ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration @@ -1045,6 +1046,7 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL ctx.Data["CaptchaType"] = setting.Service.CaptchaType ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["PageIsSignUp"] = true //Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true if setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration { |