aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-01-01 18:02:34 +0800
committerGitHub <noreply@github.com>2025-01-01 18:02:34 +0800
commit2564c15cb006a551ab21dac66369c363a4e78473 (patch)
tree72859af96eee778816c52e2ba972e76507fdbcf1 /templates/admin
parent57eb9d0b644bb893ffb90d0066066a3971de3f1a (diff)
downloadgitea-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.tmpl8
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}}