Skip to content

Commit

Permalink
Ensure that the default visibility is set on the user create page
Browse files Browse the repository at this point in the history
Set the default visibility on the user create page.

Fix go-gitea#16840

Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed Aug 27, 2021
1 parent cd8db3a commit e52e07b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/admin/user/new.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down

0 comments on commit e52e07b

Please sign in to comment.