mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-23 21:34:43 +03:00
#1333 Disable Gravatar option when install
This commit is contained in:
parent
8d73832bdf
commit
302938e646
@ -95,6 +95,8 @@ mail_notify = Enable Mail Notification
|
|||||||
server_service_title = Server and Other Services Settings
|
server_service_title = Server and Other Services Settings
|
||||||
offline_mode = Enable Offline Mode
|
offline_mode = Enable Offline Mode
|
||||||
offline_mode_popup = Disable CDN even in production mode, all resource files will be served locally.
|
offline_mode_popup = Disable CDN even in production mode, all resource files will be served locally.
|
||||||
|
disable_gravatar = Disable Gravatar Service
|
||||||
|
disable_gravatar_popup = Disable Gravatar and custom sources, all avatars are uploaded by users or default.
|
||||||
disable_registration = Disable Self-registration
|
disable_registration = Disable Self-registration
|
||||||
disable_registration_popup = Disable user self-registration, only admin can create accounts.
|
disable_registration_popup = Disable user self-registration, only admin can create accounts.
|
||||||
require_sign_in_view = Enable Require Sign In to View Pages
|
require_sign_in_view = Enable Require Sign In to View Pages
|
||||||
|
2
gogs.go
2
gogs.go
@ -17,7 +17,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.6.7.0829 Beta"
|
const APP_VER = "0.6.7.0830 Beta"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
@ -36,6 +36,7 @@ type InstallForm struct {
|
|||||||
MailNotify bool
|
MailNotify bool
|
||||||
|
|
||||||
OfflineMode bool
|
OfflineMode bool
|
||||||
|
DisableGravatar bool
|
||||||
DisableRegistration bool
|
DisableRegistration bool
|
||||||
RequireSignInView bool
|
RequireSignInView bool
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -169,6 +169,12 @@ function initInstall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#offline-mode input').change(function () {
|
||||||
|
if ($(this).is(':checked')) {
|
||||||
|
$('#disable-gravatar').checkbox('check');
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function initRepository() {
|
function initRepository() {
|
||||||
|
@ -131,6 +131,7 @@ func Install(ctx *middleware.Context) {
|
|||||||
|
|
||||||
// Server and other services settings
|
// Server and other services settings
|
||||||
form.OfflineMode = setting.OfflineMode
|
form.OfflineMode = setting.OfflineMode
|
||||||
|
form.DisableGravatar = setting.DisableGravatar
|
||||||
form.DisableRegistration = setting.Service.DisableRegistration
|
form.DisableRegistration = setting.Service.DisableRegistration
|
||||||
form.RequireSignInView = setting.Service.RequireSignInView
|
form.RequireSignInView = setting.Service.RequireSignInView
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
|
|||||||
cfg.Section("service").Key("ENABLE_NOTIFY_MAIL").SetValue(com.ToStr(form.MailNotify))
|
cfg.Section("service").Key("ENABLE_NOTIFY_MAIL").SetValue(com.ToStr(form.MailNotify))
|
||||||
|
|
||||||
cfg.Section("server").Key("OFFLINE_MODE").SetValue(com.ToStr(form.OfflineMode))
|
cfg.Section("server").Key("OFFLINE_MODE").SetValue(com.ToStr(form.OfflineMode))
|
||||||
|
cfg.Section("picture").Key("DISABLE_GRAVATAR").SetValue(com.ToStr(form.DisableGravatar))
|
||||||
cfg.Section("service").Key("DISABLE_REGISTRATION").SetValue(com.ToStr(form.DisableRegistration))
|
cfg.Section("service").Key("DISABLE_REGISTRATION").SetValue(com.ToStr(form.DisableRegistration))
|
||||||
cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").SetValue(com.ToStr(form.RequireSignInView))
|
cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").SetValue(com.ToStr(form.RequireSignInView))
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
0.6.7.0829 Beta
|
0.6.7.0830 Beta
|
@ -158,11 +158,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox" id="offline-mode">
|
||||||
<label class="poping up" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label>
|
<label class="poping up" data-content="{{.i18n.Tr "install.offline_mode_popup"}}"><strong>{{.i18n.Tr "install.offline_mode"}}</strong></label>
|
||||||
<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
|
<input name="offline_mode" type="checkbox" {{if .offline_mode}}checked{{end}}>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="inline field">
|
||||||
|
<div class="ui checkbox" id="disable-gravatar">
|
||||||
|
<label class="poping up" data-content="{{.i18n.Tr "install.disable_gravatar_popup"}}"><strong>{{.i18n.Tr "install.disable_gravatar"}}</strong></label>
|
||||||
|
<input name="disable_gravatar" type="checkbox" {{if .disable_gravatar}}checked{{end}}>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="inline field">
|
<div class="inline field">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<label class="poping up" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label>
|
<label class="poping up" data-content="{{.i18n.Tr "install.disable_registration_popup"}}"><strong>{{.i18n.Tr "install.disable_registration"}}</strong></label>
|
||||||
|
Loading…
Reference in New Issue
Block a user