mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 01:05:14 +00:00
Enable user pronoun editing from the admin ui
While users can edit their own pronouns, the admin UI enables an admin to edit *any* user setting. As such, pronouns should be editable here, too. For the sake of simplicity, the input here is a simple text input field, rather than a dropdown. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
This commit is contained in:
parent
efa9649696
commit
6aba69ce85
|
@ -435,6 +435,7 @@ func EditUserPost(ctx *context.Context) {
|
|||
FullName: optional.Some(form.FullName),
|
||||
Website: optional.Some(form.Website),
|
||||
Location: optional.Some(form.Location),
|
||||
Pronouns: optional.Some(form.Pronouns),
|
||||
IsActive: optional.Some(form.Active),
|
||||
IsAdmin: optional.Some(form.Admin),
|
||||
AllowGitHook: optional.Some(form.AllowGitHook),
|
||||
|
|
|
@ -42,6 +42,7 @@ type AdminEditUserForm struct {
|
|||
Website string `binding:"ValidUrl;MaxSize(255)"`
|
||||
Location string `binding:"MaxSize(50)"`
|
||||
Language string `binding:"MaxSize(5)"`
|
||||
Pronouns string `binding:"MaxSize(50)"`
|
||||
MaxRepoCreation int
|
||||
Active bool
|
||||
Admin bool
|
||||
|
|
|
@ -61,6 +61,10 @@
|
|||
<label for="full_name">{{ctx.Locale.Tr "settings.full_name"}}</label>
|
||||
<input id="full_name" name="full_name" value="{{.User.FullName}}" maxlength="100">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="pronouns">{{ctx.Locale.Tr "settings.pronouns"}}</label>
|
||||
<input id="pronouns" name="pronouns" value="{{.User.Pronouns}}" maxlength="50">
|
||||
</div>
|
||||
<div class="required field {{if .Err_Email}}error{{end}}">
|
||||
<label for="email">{{ctx.Locale.Tr "email"}}</label>
|
||||
<input id="email" name="email" type="email" value="{{.User.Email}}" autofocus required>
|
||||
|
|
Loading…
Reference in a new issue