Fix #149
This commit is contained in:
parent
d0ea4c7b68
commit
89c99167b2
|
@ -46,6 +46,7 @@ type User struct {
|
||||||
Id int64
|
Id int64
|
||||||
LowerName string `xorm:"unique not null"`
|
LowerName string `xorm:"unique not null"`
|
||||||
Name string `xorm:"unique not null"`
|
Name string `xorm:"unique not null"`
|
||||||
|
FullName string
|
||||||
Email string `xorm:"unique not null"`
|
Email string `xorm:"unique not null"`
|
||||||
Passwd string `xorm:"not null"`
|
Passwd string `xorm:"not null"`
|
||||||
LoginType int
|
LoginType int
|
||||||
|
|
|
@ -75,6 +75,7 @@ type FeedsForm struct {
|
||||||
|
|
||||||
type UpdateProfileForm struct {
|
type UpdateProfileForm struct {
|
||||||
UserName string `form:"username" binding:"Required;AlphaDash;MaxSize(30)"`
|
UserName string `form:"username" binding:"Required;AlphaDash;MaxSize(30)"`
|
||||||
|
FullName string `form:"fullname" binding:"MaxSize(40)"`
|
||||||
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
|
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
|
||||||
Website string `form:"website" binding:"MaxSize(50)"`
|
Website string `form:"website" binding:"MaxSize(50)"`
|
||||||
Location string `form:"location" binding:"MaxSize(50)"`
|
Location string `form:"location" binding:"MaxSize(50)"`
|
||||||
|
|
|
@ -54,6 +54,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
|
||||||
user.Name = form.UserName
|
user.Name = form.UserName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
user.FullName = form.FullName
|
||||||
user.Email = form.Email
|
user.Email = form.Email
|
||||||
user.Website = form.Website
|
user.Website = form.Website
|
||||||
user.Location = form.Location
|
user.Location = form.Location
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<a href="http://gravatar.com/emails/" class="center-block" data-toggle="tooltip" data-placement="bottom" title="Change your avatar at gravatar.com">
|
<a href="http://gravatar.com/emails/" class="center-block" data-toggle="tooltip" data-placement="bottom" title="Change your avatar at gravatar.com">
|
||||||
<img id="user-avatar" src="{{.Owner.AvatarLink}}?s=200" alt="user-avatar" title="{{.Owner.Name}}"/>
|
<img id="user-avatar" src="{{.Owner.AvatarLink}}?s=200" alt="user-avatar" title="{{.Owner.Name}}"/>
|
||||||
</a>
|
</a>
|
||||||
|
{{if .Owner.FullName}}<span id="user-name" class="center-block">{{.Owner.FullName}}</span>{{end}}
|
||||||
<span id="user-name" class="center-block">{{.Owner.Name}}</span>
|
<span id="user-name" class="center-block">{{.Owner.Name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-info">
|
<div class="profile-info">
|
||||||
|
|
|
@ -17,6 +17,13 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="col-md-2 control-label">Full Name</label>
|
||||||
|
<div class="col-md-8">
|
||||||
|
<input name="fullname" class="form-control" placeholder="Type your full name" value="{{.SignedUser.FullName}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-2 control-label">Email<strong class="text-danger">*</strong></label>
|
<label class="col-md-2 control-label">Email<strong class="text-danger">*</strong></label>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
|
|
Loading…
Reference in New Issue