diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2025-01-01 18:02:34 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-01 18:02:34 +0800 |
commit | 2564c15cb006a551ab21dac66369c363a4e78473 (patch) | |
tree | 72859af96eee778816c52e2ba972e76507fdbcf1 /templates/admin | |
parent | 57eb9d0b644bb893ffb90d0066066a3971de3f1a (diff) | |
download | gitea-2564c15cb006a551ab21dac66369c363a4e78473.tar.gz gitea-2564c15cb006a551ab21dac66369c363a4e78473.zip |
Remove some unnecessary template helpers (#33069)
DisableGitHooks and DisableImportLocal are only used when editing a
user, so only set them in `editUserCommon`
Diffstat (limited to 'templates/admin')
-rw-r--r-- | templates/admin/user/edit.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index 41b00defb4..d591a645d8 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -128,16 +128,16 @@ <input name="restricted" type="checkbox" {{if .User.IsRestricted}}checked{{end}}> </div> </div> - <div class="inline field {{if DisableGitHooks}}tw-hidden{{end}}"> + <div class="inline field {{if .DisableGitHooks}}tw-hidden{{end}}"> <div class="ui checkbox" data-tooltip-content="{{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}}"> <label><strong>{{ctx.Locale.Tr "admin.users.allow_git_hook"}}</strong></label> - <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if DisableGitHooks}}disabled{{end}}> + <input name="allow_git_hook" type="checkbox" {{if .User.CanEditGitHook}}checked{{end}} {{if .DisableGitHooks}}disabled{{end}}> </div> </div> - <div class="inline field {{if or (DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}"> + <div class="inline field {{if or (.DisableImportLocal) (.DisableMigrations)}}tw-hidden{{end}}"> <div class="ui checkbox"> <label><strong>{{ctx.Locale.Tr "admin.users.allow_import_local"}}</strong></label> - <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if DisableImportLocal}}disabled{{end}}> + <input name="allow_import_local" type="checkbox" {{if .User.CanImportLocal}}checked{{end}} {{if .DisableImportLocal}}disabled{{end}}> </div> </div> {{if not .DisableRegularOrgCreation}} |