diff options
author | zeripath <art27@cantab.net> | 2021-08-28 15:19:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-28 15:19:52 +0100 |
commit | 90c01804470f45018de0653a19d5211c986c035c (patch) | |
tree | 90139a0f4b650f2b50937c9bad09523ebf6bb64f /templates/admin | |
parent | cad70599a65894651d91ad230b57857a443a4d26 (diff) | |
download | gitea-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.tmpl | 2 |
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}} |