aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2021-08-28 15:19:52 +0100
committerGitHub <noreply@github.com>2021-08-28 15:19:52 +0100
commit90c01804470f45018de0653a19d5211c986c035c (patch)
tree90139a0f4b650f2b50937c9bad09523ebf6bb64f /templates/admin
parentcad70599a65894651d91ad230b57857a443a4d26 (diff)
downloadgitea-90c01804470f45018de0653a19d5211c986c035c.tar.gz
gitea-90c01804470f45018de0653a19d5211c986c035c.zip
Ensure that the default visibility is set on the user create page (#16845)
Set the default visibility on the user create page. Fix #16840 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'templates/admin')
-rw-r--r--templates/admin/user/new.tmpl2
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl
index d454d1cd98..0de1a5c775 100644
--- a/templates/admin/user/new.tmpl
+++ b/templates/admin/user/new.tmpl
@@ -28,7 +28,7 @@
<div class="inline field {{if .Err_Visibility}}error{{end}}">
<span class="inline required field"><label for="visibility">{{.i18n.Tr "settings.visibility"}}</label></span>
<div class="ui selection type dropdown">
- <input type="hidden" id="visibility" name="visibility" value="{{.visibility}}">
+ <input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
<div class="text">
{{if .DefaultUserVisibilityMode.IsPublic}}{{.i18n.Tr "settings.visibility.public"}}{{end}}
{{if .DefaultUserVisibilityMode.IsLimited}}{{.i18n.Tr "settings.visibility.limited"}}{{end}}