diff options
author | Tamás Molnár <moltam@gmail.com> | 2016-03-06 17:36:30 +0100 |
---|---|---|
committer | Tamás Molnár <moltam@gmail.com> | 2016-03-06 17:36:30 +0100 |
commit | 9c91e279338f4d8bf09e1f7f5904d34cd525b102 (patch) | |
tree | 32882aa197724e0f75608c9bfd16a24650b7be22 /routers/org/setting.go | |
parent | c2ca103d30b0f47b5ad0fa544ab5a07263894ea3 (diff) | |
download | gitea-9c91e279338f4d8bf09e1f7f5904d34cd525b102.tar.gz gitea-9c91e279338f4d8bf09e1f7f5904d34cd525b102.zip |
Added: Ability to delete org avatar.
Diffstat (limited to 'routers/org/setting.go')
-rw-r--r-- | routers/org/setting.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/routers/org/setting.go b/routers/org/setting.go index 0b1b512d34..29ce34f5d9 100644 --- a/routers/org/setting.go +++ b/routers/org/setting.go @@ -96,6 +96,14 @@ func SettingsAvatar(ctx *middleware.Context, form auth.UploadAvatarForm) { ctx.Redirect(ctx.Org.OrgLink + "/settings") } +func SettingsDeleteAvatar(ctx *middleware.Context) { + if err := ctx.Org.Organization.DeleteAvatar(); err != nil { + ctx.Flash.Error(err.Error()) + } + + ctx.Redirect(ctx.Org.OrgLink + "/settings") +} + func SettingsDelete(ctx *middleware.Context) { ctx.Data["Title"] = ctx.Tr("org.settings") ctx.Data["PageIsSettingsDelete"] = true |