mirror of
https://github.com/go-gitea/gitea
synced 2024-11-25 23:02:52 +01:00
Merge pull request #1244 from jamesa/develop
Add full name field to admin's user edit page (fixes #1130)
This commit is contained in:
commit
91ab2538c3
3 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,7 @@ import (
|
|||
)
|
||||
|
||||
type AdminEditUserForm struct {
|
||||
FullName string `form:"fullname" binding:"MaxSize(100)"`
|
||||
Email string `binding:"Required;Email;MaxSize(50)"`
|
||||
Password string `binding:"OmitEmpty;MinSize(6);MaxSize(255)"`
|
||||
Website string `binding:"MaxSize(50)"`
|
||||
|
|
|
@ -185,6 +185,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
|
|||
u.EncodePasswd()
|
||||
}
|
||||
|
||||
u.FullName = form.FullName
|
||||
u.Email = form.Email
|
||||
u.Website = form.Website
|
||||
u.Location = form.Location
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
<label>{{.i18n.Tr "username"}}</label>
|
||||
<label class="text-left">{{.User.Name}}</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="full-name">{{.i18n.Tr "settings.full_name"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_FullName}}ipt-error{{end}}" id="full-name" name="fullname" type="text" value="{{.User.FullName}}" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="req" for="email">{{.i18n.Tr "email"}}</label>
|
||||
<input class="ipt ipt-large ipt-radius {{if .Err_Email}}ipt-error{{end}}" id="email" name="email" type="email" value="{{.User.Email}}" required/>
|
||||
|
|
Loading…
Reference in a new issue