Merge pull request 'Update checker setting updates' (#2925) from 0ko/forgejo:update_check_default into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2925
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-04-10 20:54:10 +00:00
commit 9396edb2e3
3 changed files with 3 additions and 2 deletions

View File

@ -159,6 +159,7 @@ func Install(ctx *context.Context) {
form.DefaultAllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization
form.DefaultEnableTimetracking = setting.Service.DefaultEnableTimetracking
form.NoReplyAddress = setting.Service.NoReplyAddress
form.EnableUpdateChecker = true
form.PasswordAlgorithm = hash.ConfigHashAlgorithm(setting.PasswordHashAlgo)
middleware.AssignForm(form, ctx.Data)

View File

@ -147,7 +147,7 @@ func registerUpdateGiteaChecker() {
}
RegisterTaskFatal("update_checker", &UpdateCheckerConfig{
BaseConfig: BaseConfig{
Enabled: false,
Enabled: true,
RunAtStart: false,
Schedule: "@every 168h",
},

View File

@ -150,7 +150,7 @@
<div class="inline field">
<div class="ui checkbox">
<label>{{ctx.Locale.Tr "install.enable_update_checker"}}</label>
<input name="enable_update_checker" type="checkbox">
<input name="enable_update_checker" type="checkbox" {{if .enable_update_checker}}checked{{end}}>
</div>
<span class="help">{{ctx.Locale.Tr "install.enable_update_checker_helper_forgejo"}}</span>
</div>