diff options
author | Unknwon <u@gogs.io> | 2015-09-06 10:56:31 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-06 10:56:31 -0400 |
commit | edc99bc8a4691d09cd42804fd0530c352201340e (patch) | |
tree | 837e4b978fc35a4905f7961bf9d26d5ed6124846 /routers/org | |
parent | 80701d45bbe333f1bdef4673fae43df131b2222f (diff) | |
download | gitea-edc99bc8a4691d09cd42804fd0530c352201340e.tar.gz gitea-edc99bc8a4691d09cd42804fd0530c352201340e.zip |
new org options UI
Diffstat (limited to 'routers/org')
-rw-r--r-- | routers/org/setting.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/routers/org/setting.go b/routers/org/setting.go index a00840b616..c36bafee8c 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -38,29 +38,29 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) { org := ctx.Org.Organization // Check if organization name has been changed. - if org.Name != form.OrgUserName { - isExist, err := models.IsUserExist(org.Id, form.OrgUserName) + if org.Name != form.Name { + isExist, err := models.IsUserExist(org.Id, form.Name) if err != nil { ctx.Handle(500, "IsUserExist", err) return } else if isExist { - ctx.Data["Err_UserName"] = true + ctx.Data["OrgName"] = true ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), SETTINGS_OPTIONS, &form) return - } else if err = models.ChangeUserName(org, form.OrgUserName); err != nil { + } else if err = models.ChangeUserName(org, form.Name); err != nil { if err == models.ErrUserNameIllegal { - ctx.Data["Err_UserName"] = true + ctx.Data["OrgName"] = true ctx.RenderWithErr(ctx.Tr("form.illegal_username"), SETTINGS_OPTIONS, &form) } else { ctx.Handle(500, "ChangeUserName", err) } return } - log.Trace("Organization name changed: %s -> %s", org.Name, form.OrgUserName) - org.Name = form.OrgUserName + log.Trace("Organization name changed: %s -> %s", org.Name, form.Name) + org.Name = form.Name } - org.FullName = form.OrgFullName + org.FullName = form.FullName org.Description = form.Description org.Website = form.Website org.Location = form.Location |