diff options
author | Sergio Benitez <sbenitez@mit.edu> | 2015-09-09 13:44:51 -0700 |
---|---|---|
committer | Sergio Benitez <sbenitez@mit.edu> | 2015-09-09 13:44:51 -0700 |
commit | 964d0262ff353db6a50ed5be83ebd22f71aa6e69 (patch) | |
tree | 8cbab6b6a9b4f62cbe9acb2a0b8752b531633362 /modules/auth | |
parent | 079a2d68db5c843ef2dbba65aeca46d5887d6b02 (diff) | |
parent | b75d0378cbbf0523963fd9bc749543244be7392b (diff) | |
download | gitea-964d0262ff353db6a50ed5be83ebd22f71aa6e69.tar.gz gitea-964d0262ff353db6a50ed5be83ebd22f71aa6e69.zip |
Merged conflicts.
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/org.go | 15 | ||||
-rw-r--r-- | modules/auth/user_form.go | 16 |
2 files changed, 14 insertions, 17 deletions
diff --git a/modules/auth/org.go b/modules/auth/org.go index 0dfab951e4..6d9a7269ec 100644 --- a/modules/auth/org.go +++ b/modules/auth/org.go @@ -17,8 +17,7 @@ import ( // \/ /_____/ \/ \/ \/ \/ \/ type CreateOrgForm struct { - OrgName string `form:"org_name" binding:"Required;AlphaDashDot;MaxSize(30)"` - Email string `form:"email" binding:"Required;Email;MaxSize(50)"` + OrgName string `binding:"Required;AlphaDashDot;MaxSize(30)" locale:"org.org_name_holder"` } func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { @@ -26,13 +25,11 @@ func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) bind } type UpdateOrgSettingForm struct { - OrgUserName string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(30)" locale:"org.org_name_holder"` - OrgFullName string `form:"fullname" binding:"MaxSize(100)"` - Email string `form:"email" binding:"Required;Email;MaxSize(50)"` - Description string `form:"desc" binding:"MaxSize(255)"` - Website string `form:"website" binding:"Url;MaxSize(100)"` - Location string `form:"location" binding:"MaxSize(50)"` - Avatar string `form:"avatar" binding:"Required;Email;MaxSize(50)"` + Name string `binding:"Required;AlphaDashDot;MaxSize(30)" locale:"org.org_name_holder"` + FullName string `binding:"MaxSize(100)"` + Description string `binding:"MaxSize(255)"` + Website string `binding:"Url;MaxSize(100)"` + Location string `binding:"MaxSize(50)"` } func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index 424a410f07..dda429b7db 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -88,12 +88,12 @@ func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding // \/ \/ \/ \/ \/ type UpdateProfileForm struct { - UserName string `form:"uname" binding:"Required;MaxSize(35)"` - FullName string `form:"fullname" binding:"MaxSize(100)"` - Email string `form:"email" binding:"Required;Email;MaxSize(254)"` - Website string `form:"website" binding:"Url;MaxSize(100)"` - Location string `form:"location" binding:"MaxSize(50)"` - Avatar string `form:"avatar" binding:"Required;Email;MaxSize(254)"` + Name string `binding:"Required;MaxSize(35)"` + FullName string `binding:"MaxSize(100)"` + Email string `binding:"Required;Email;MaxSize(254)"` + Website string `binding:"Url;MaxSize(100)"` + Location string `binding:"MaxSize(50)"` + Gravatar string `binding:"Required;Email;MaxSize(254)"` } func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { @@ -101,8 +101,8 @@ func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) } type UploadAvatarForm struct { - Enable bool `form:"enable"` - Avatar *multipart.FileHeader `form:"avatar"` + Enable bool + Avatar *multipart.FileHeader } func (f *UploadAvatarForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { |