Merge pull request #908 from nicolai86/feature/hide-signup-button-884
Make Signup button display configurable - #884
This commit is contained in:
commit
87b90372a7
|
@ -631,6 +631,7 @@ config.db_path_helper=(nur für "sqlite3")
|
||||||
config.service_config=Service-Einstellungen
|
config.service_config=Service-Einstellungen
|
||||||
config.register_email_confirm=E-Mail-Bestätigung bei Registrierung
|
config.register_email_confirm=E-Mail-Bestätigung bei Registrierung
|
||||||
config.disable_register=Registrierung deaktivieren
|
config.disable_register=Registrierung deaktivieren
|
||||||
|
config.show_registration_button = Registrierungs-Button anzeigen
|
||||||
config.require_sign_in_view=Ansehen erfordert Registrierung
|
config.require_sign_in_view=Ansehen erfordert Registrierung
|
||||||
config.mail_notify=E-Mail-Benachrichtigung
|
config.mail_notify=E-Mail-Benachrichtigung
|
||||||
config.enable_cache_avatar=Avatar-Cache aktivieren
|
config.enable_cache_avatar=Avatar-Cache aktivieren
|
||||||
|
|
|
@ -635,6 +635,7 @@ config.db_path_helper = (for "sqlite3" only)
|
||||||
config.service_config = Service Configuration
|
config.service_config = Service Configuration
|
||||||
config.register_email_confirm = Require E-mail Confirmation
|
config.register_email_confirm = Require E-mail Confirmation
|
||||||
config.disable_register = Disable Registration
|
config.disable_register = Disable Registration
|
||||||
|
config.show_registration_button = Show Register Button
|
||||||
config.require_sign_in_view = Require Sign In View
|
config.require_sign_in_view = Require Sign In View
|
||||||
config.mail_notify = Mail Notification
|
config.mail_notify = Mail Notification
|
||||||
config.enable_cache_avatar = Enable Cache Avatar
|
config.enable_cache_avatar = Enable Cache Avatar
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=("sqlite3" uniquement)
|
||||||
config.service_config=Configuration du Service
|
config.service_config=Configuration du Service
|
||||||
config.register_email_confirm=Require E-mail Confirmation
|
config.register_email_confirm=Require E-mail Confirmation
|
||||||
config.disable_register=Désactiver l'Enregistrement
|
config.disable_register=Désactiver l'Enregistrement
|
||||||
|
config.show_registration_button = Affichage bouton Se inscrire
|
||||||
config.require_sign_in_view=Connexion Obligatoire pour Visualiser
|
config.require_sign_in_view=Connexion Obligatoire pour Visualiser
|
||||||
config.mail_notify=Mailer les Notifications
|
config.mail_notify=Mailer les Notifications
|
||||||
config.enable_cache_avatar=Activer le Cache d'Avatar
|
config.enable_cache_avatar=Activer le Cache d'Avatar
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(「sqlite3」のみ)
|
||||||
config.service_config=サービスの構成
|
config.service_config=サービスの構成
|
||||||
config.register_email_confirm=電子メールの確認を必要
|
config.register_email_confirm=電子メールの確認を必要
|
||||||
config.disable_register=登録を無効にする
|
config.disable_register=登録を無効にする
|
||||||
|
config.show_registration_button = 表示レジスタボタン
|
||||||
config.require_sign_in_view=サインインを要求
|
config.require_sign_in_view=サインインを要求
|
||||||
config.mail_notify=メール通知
|
config.mail_notify=メール通知
|
||||||
config.enable_cache_avatar=アバターのキャッシュを有効にします。
|
config.enable_cache_avatar=アバターのキャッシュを有効にします。
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(tikai Sqlite3 datu bāzei)
|
||||||
config.service_config=Pakalpojuma konfigurācija
|
config.service_config=Pakalpojuma konfigurācija
|
||||||
config.register_email_confirm=Pieprasīt e-pasta apstiprināšanu
|
config.register_email_confirm=Pieprasīt e-pasta apstiprināšanu
|
||||||
config.disable_register=Atspējot jaunu lietotāju reģistrāciju
|
config.disable_register=Atspējot jaunu lietotāju reģistrāciju
|
||||||
|
config.show_registration_button =
|
||||||
config.require_sign_in_view=Nepieciešama autorizācija
|
config.require_sign_in_view=Nepieciešama autorizācija
|
||||||
config.mail_notify=Pasta paziņojumi
|
config.mail_notify=Pasta paziņojumi
|
||||||
config.enable_cache_avatar=Glabāt profila attēlus kešatmiņā
|
config.enable_cache_avatar=Glabāt profila attēlus kešatmiņā
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(alleen voor "sqlite3")
|
||||||
config.service_config=Serviceconfiguratie
|
config.service_config=Serviceconfiguratie
|
||||||
config.register_email_confirm=E-mailbevestiging registreren
|
config.register_email_confirm=E-mailbevestiging registreren
|
||||||
config.disable_register=Registratie uitgeschakeld
|
config.disable_register=Registratie uitgeschakeld
|
||||||
|
config.show_registration_button =Weergave knop Registreren
|
||||||
config.require_sign_in_view=Inloggen vereist om te kunnen inzien
|
config.require_sign_in_view=Inloggen vereist om te kunnen inzien
|
||||||
config.mail_notify=E-mailnotificaties
|
config.mail_notify=E-mailnotificaties
|
||||||
config.enable_cache_avatar=Avatar Cache inschakelen
|
config.enable_cache_avatar=Avatar Cache inschakelen
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(for "sqlite3" only)
|
||||||
config.service_config=Service Configuration
|
config.service_config=Service Configuration
|
||||||
config.register_email_confirm=Require E-mail Confirmation
|
config.register_email_confirm=Require E-mail Confirmation
|
||||||
config.disable_register=Отключить регистрацию
|
config.disable_register=Отключить регистрацию
|
||||||
|
config.show_registration_button = Показать Регистрация Кнопка
|
||||||
config.require_sign_in_view=Для просмотра необходима авторизация
|
config.require_sign_in_view=Для просмотра необходима авторизация
|
||||||
config.mail_notify=Почтовые уведомления
|
config.mail_notify=Почтовые уведомления
|
||||||
config.enable_cache_avatar=Кешировать аватар
|
config.enable_cache_avatar=Кешировать аватар
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(仅限 "sqlite3" 使用)
|
||||||
config.service_config=服务配置
|
config.service_config=服务配置
|
||||||
config.register_email_confirm=注册邮件确认
|
config.register_email_confirm=注册邮件确认
|
||||||
config.disable_register=关闭注册功能
|
config.disable_register=关闭注册功能
|
||||||
|
config.show_registration_button = 显示注册按钮
|
||||||
config.require_sign_in_view=强制登录浏览
|
config.require_sign_in_view=强制登录浏览
|
||||||
config.mail_notify=邮件通知提醒
|
config.mail_notify=邮件通知提醒
|
||||||
config.enable_cache_avatar=开启缓存头像
|
config.enable_cache_avatar=开启缓存头像
|
||||||
|
|
|
@ -631,6 +631,7 @@ config.db_path_helper=(僅限 "sqlite3" 使用)
|
||||||
config.service_config=服務配置
|
config.service_config=服務配置
|
||||||
config.register_email_confirm=註冊電子郵件確認
|
config.register_email_confirm=註冊電子郵件確認
|
||||||
config.disable_register=關閉註冊功能
|
config.disable_register=關閉註冊功能
|
||||||
|
config.show_register_button =
|
||||||
config.require_sign_in_view=強制登錄瀏覽
|
config.require_sign_in_view=強制登錄瀏覽
|
||||||
config.mail_notify=郵件通知提醒
|
config.mail_notify=郵件通知提醒
|
||||||
config.enable_cache_avatar=開啟緩存頭像
|
config.enable_cache_avatar=開啟緩存頭像
|
||||||
|
|
|
@ -311,6 +311,7 @@ func NewConfigContext() {
|
||||||
var Service struct {
|
var Service struct {
|
||||||
RegisterEmailConfirm bool
|
RegisterEmailConfirm bool
|
||||||
DisableRegistration bool
|
DisableRegistration bool
|
||||||
|
ShowRegistrationButton bool
|
||||||
RequireSignInView bool
|
RequireSignInView bool
|
||||||
EnableCacheAvatar bool
|
EnableCacheAvatar bool
|
||||||
EnableNotifyMail bool
|
EnableNotifyMail bool
|
||||||
|
@ -324,6 +325,7 @@ func newService() {
|
||||||
Service.ActiveCodeLives = Cfg.Section("service").Key("ACTIVE_CODE_LIVE_MINUTES").MustInt(180)
|
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.ResetPwdCodeLives = Cfg.Section("service").Key("RESET_PASSWD_CODE_LIVE_MINUTES").MustInt(180)
|
||||||
Service.DisableRegistration = Cfg.Section("service").Key("DISABLE_REGISTRATION").MustBool()
|
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.RequireSignInView = Cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").MustBool()
|
||||||
Service.EnableCacheAvatar = Cfg.Section("service").Key("ENABLE_CACHE_AVATAR").MustBool()
|
Service.EnableCacheAvatar = Cfg.Section("service").Key("ENABLE_CACHE_AVATAR").MustBool()
|
||||||
Service.EnableReverseProxyAuth = Cfg.Section("service").Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
|
Service.EnableReverseProxyAuth = Cfg.Section("service").Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
|
||||||
|
|
|
@ -41,6 +41,7 @@ func Home(ctx *middleware.Context) {
|
||||||
ctx.Data["OauthEnabled"] = true
|
ctx.Data["OauthEnabled"] = true
|
||||||
ctx.Data["OauthService"] = setting.OauthService
|
ctx.Data["OauthService"] = setting.OauthService
|
||||||
}
|
}
|
||||||
|
ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton
|
||||||
|
|
||||||
ctx.Data["PageIsHome"] = true
|
ctx.Data["PageIsHome"] = true
|
||||||
ctx.HTML(200, HOME)
|
ctx.HTML(200, HOME)
|
||||||
|
|
|
@ -78,6 +78,8 @@
|
||||||
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RegisterEmailConfirm}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.disable_register"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.DisableRegistration}}-check{{end}}-square-o"></i></dd>
|
<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>
|
<dt>{{.i18n.Tr "admin.config.require_sign_in_view"}}</dt>
|
||||||
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
<dd><i class="fa fa{{if .Service.RequireSignInView}}-check{{end}}-square-o"></i></dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.mail_notify"}}</dt>
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
<input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/>
|
<input class="ipt ipt-large" name="password" type="password" placeholder="{{.i18n.Tr "home.password_holder"}}"/>
|
||||||
<input name="from" type="hidden" value="home">
|
<input name="from" type="hidden" value="home">
|
||||||
<button class="btn btn-black btn-large">{{.i18n.Tr "sign_in"}}</button>
|
<button class="btn btn-black btn-large">{{.i18n.Tr "sign_in"}}</button>
|
||||||
|
{{if .ShowRegistrationButton}}
|
||||||
<button class="btn btn-green btn-large" id="register-button">{{.i18n.Tr "register"}}</button>
|
<button class="btn btn-green btn-large" id="register-button">{{.i18n.Tr "register"}}</button>
|
||||||
|
{{end}}
|
||||||
</form>
|
</form>
|
||||||
<div id="promo-social" class="social-buttons">
|
<div id="promo-social" class="social-buttons">
|
||||||
{{template "ng/base/social" .}}
|
{{template "ng/base/social" .}}
|
||||||
|
|
Loading…
Reference in a new issue