From 34d18a19a3cd2d16c03594ea9e1c3f423cb55687 Mon Sep 17 00:00:00 2001 From: Bryan Johnson Date: Mon, 21 Apr 2014 18:03:04 -0400 Subject: [PATCH] Minor grammatical fix for Disable Registration feature --- conf/app.ini | 2 +- modules/base/conf.go | 4 ++-- routers/user/user.go | 6 +++--- templates/admin/config.tmpl | 4 ++-- templates/user/signup.tmpl | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/conf/app.ini b/conf/app.ini index 7dbbf6005..25fd41091 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -53,7 +53,7 @@ RESET_PASSWD_CODE_LIVE_MINUTES = 180 ; User need to confirm e-mail for registration REGISTER_EMAIL_CONFIRM = false ; Does not allow register and admin create account only -DISENABLE_REGISTERATION = false +DISABLE_REGISTRATION = false ; User must sign in to view anything. REQUIRE_SIGNIN_VIEW = false ; Cache avatar as picture diff --git a/modules/base/conf.go b/modules/base/conf.go index 48ba46583..abb67f6d8 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -84,7 +84,7 @@ var ( var Service struct { RegisterEmailConfirm bool - DisenableRegisteration bool + DisableRegistration bool RequireSignInView bool EnableCacheAvatar bool NotifyMail bool @@ -116,7 +116,7 @@ var logLevels = map[string]string{ func newService() { Service.ActiveCodeLives = Cfg.MustInt("service", "ACTIVE_CODE_LIVE_MINUTES", 180) Service.ResetPwdCodeLives = Cfg.MustInt("service", "RESET_PASSWD_CODE_LIVE_MINUTES", 180) - Service.DisenableRegisteration = Cfg.MustBool("service", "DISENABLE_REGISTERATION", false) + Service.DisableRegistration = Cfg.MustBool("service", "DISABLE_REGISTRATION", false) Service.RequireSignInView = Cfg.MustBool("service", "REQUIRE_SIGNIN_VIEW", false) Service.EnableCacheAvatar = Cfg.MustBool("service", "ENABLE_CACHE_AVATAR", false) } diff --git a/routers/user/user.go b/routers/user/user.go index 91b51ceec..7decd72d4 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -169,8 +169,8 @@ func SignUp(ctx *middleware.Context) { ctx.Data["Title"] = "Sign Up" ctx.Data["PageIsSignUp"] = true - if base.Service.DisenableRegisteration { - ctx.Data["DisenableRegisteration"] = true + if base.Service.DisableRegistration { + ctx.Data["DisableRegistration"] = true ctx.HTML(200, "user/signup") return } @@ -208,7 +208,7 @@ func SignUpPost(ctx *middleware.Context, form auth.RegisterForm) { ctx.Data["Title"] = "Sign Up" ctx.Data["PageIsSignUp"] = true - if base.Service.DisenableRegisteration { + if base.Service.DisableRegistration { ctx.Handle(403, "user.SignUpPost", nil) return } diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 8263763d0..d25d40275 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -62,8 +62,8 @@
Register Email Confirmation
-
Disenable Registeration
-
+
Disable Registration
+
Require Sign In View
Mail Notification
diff --git a/templates/user/signup.tmpl b/templates/user/signup.tmpl index d6af74c1a..578ffa9ee 100644 --- a/templates/user/signup.tmpl +++ b/templates/user/signup.tmpl @@ -3,7 +3,7 @@
{{.CsrfTokenHtml}} - {{if .DisenableRegisteration}} + {{if .DisableRegistration}} Sorry, registration has been disabled. Please contact the site administrator. {{else}} {{if .IsSocialLogin}}