diff options
author | Raphael Randschau <nicolai86@me.com> | 2015-02-05 17:09:26 +0100 |
---|---|---|
committer | Raphael Randschau <nicolai86@me.com> | 2015-02-05 18:14:54 +0100 |
commit | 79f328154841152d1add7d2035ff125a6ccc5e25 (patch) | |
tree | 1165aafcf124f86d86cda8b1d3e00f49395ec89d | |
parent | 16018e832394772591688a261646d3a80787ac9d (diff) | |
download | gitea-79f328154841152d1add7d2035ff125a6ccc5e25.tar.gz gitea-79f328154841152d1add7d2035ff125a6ccc5e25.zip |
Add ShowRegistrationButton configuration option
-rw-r--r-- | modules/setting/setting.go | 2 | ||||
-rw-r--r-- | templates/admin/config.tmpl | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index e7c44cdd4f..4d407362c5 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -311,6 +311,7 @@ func NewConfigContext() { var Service struct { RegisterEmailConfirm bool DisableRegistration bool + ShowRegistrationButton bool RequireSignInView bool EnableCacheAvatar bool EnableNotifyMail bool @@ -324,6 +325,7 @@ func newService() { Service.ActiveCodeLives = Cfg.Section("service").Key("ACTIVE_CODE_LIVE_MINUTES").MustInt(180) Service.ResetPwdCodeLives = Cfg.Section("service").Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180) Service.DisableRegistration = Cfg.Section("service").Key("DISABLE_REGISTRATION").MustBool() + Service.ShowRegistrationButton = Cfg.Section("service").Key("SHOW_REGISTRATION_BUTTON").MustBool() Service.RequireSignInView = Cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").MustBool() Service.EnableCacheAvatar = Cfg.Section("service").Key("ENABLE_CACHE_AVATAR").MustBool() Service.EnableReverseProxyAuth = Cfg.Section("service").Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool() diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 1f8a85ecb2..f8b4be0b83 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -78,6 +78,8 @@ <dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.disable_register"}}</dt> <dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd> + <dt>{{.i18n.Tr "admin.config.show_registration_button"}}</dt> + <dd><i class="fa fa{{if .Service.ShowRegistrationButton}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt> <dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd> <dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt> |