Skip to content

Commit

Permalink
Convert visibility to number (go-gitea#29226)
Browse files Browse the repository at this point in the history
Backport go-gitea#29226

Don't throw error while creating user (Fixes go-gitea#29218)
  • Loading branch information
zokkis committed Feb 18, 2024
1 parent efe7561 commit 53bd3bd
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 @@ -29,7 +29,7 @@
<div class="inline field {{if .Err_Visibility}}error{{end}}">
<span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span>
<div class="ui selection type dropdown">
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{printf "%d" .visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
<div class="text">
{{if .DefaultUserVisibilityMode.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}}
{{if .DefaultUserVisibilityMode.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}}
Expand Down

0 comments on commit 53bd3bd

Please sign in to comment.