Skip to content

Commit a40762d

Browse files
zokkisearl-warren
authored andcommitted
Convert visibility to number (go-gitea#29226) (go-gitea#29244)
Backport go-gitea#29226 Don't throw error while creating user (Fixes go-gitea#29218) --- The backport info from Giteabot go-gitea#29226 (comment) needs to specify the version, because the default is v1.18 (cherry picked from commit 39735c4)
1 parent 8782275 commit a40762d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/admin/user/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<div class="inline field {{if .Err_Visibility}}error{{end}}">
2727
<span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "settings.visibility"}}</label></span>
2828
<div class="ui selection type dropdown">
29-
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
29+
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{printf "%d" .visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
3030
<div class="text">
3131
{{if .DefaultUserVisibilityMode.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}}
3232
{{if .DefaultUserVisibilityMode.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}}

0 commit comments

Comments
 (0)