diff options
author | Unknown <joe2010xtmf@163.com> | 2014-06-27 23:14:33 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-06-27 23:14:33 -0400 |
commit | ee9b7f322ff4c4c14952c2f83fb03e90fa583cad (patch) | |
tree | 1a55ce6029ca82add9a137db3771ad7d5d4fa55e | |
parent | 57ac15aa20a24583cf0799fd46d2c36816d28692 (diff) | |
download | gitea-ee9b7f322ff4c4c14952c2f83fb03e90fa583cad.tar.gz gitea-ee9b7f322ff4c4c14952c2f83fb03e90fa583cad.zip |
Clean code
-rw-r--r-- | routers/user/setting.go | 2 | ||||
-rw-r--r-- | routers/user/user.go | 2 | ||||
-rw-r--r-- | templates/org/settings.tmpl | 9 |
3 files changed, 5 insertions, 8 deletions
diff --git a/routers/user/setting.go b/routers/user/setting.go index 9075ee0b43..8e4b0840c7 100644 --- a/routers/user/setting.go +++ b/routers/user/setting.go @@ -68,7 +68,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) { ctx.User.Avatar = base.EncodeMd5(form.Avatar) ctx.User.AvatarEmail = form.Avatar if err := models.UpdateUser(ctx.User); err != nil { - ctx.Handle(500, "setting.Setting", err) + ctx.Handle(500, "setting.Setting(UpdateUser)", err) return } log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName) diff --git a/routers/user/user.go b/routers/user/user.go index a50f126c0c..a402744b86 100644 --- a/routers/user/user.go +++ b/routers/user/user.go @@ -296,7 +296,7 @@ func DeletePost(ctx *middleware.Context) { case models.ErrUserOwnRepos: ctx.Flash.Error("Your account still have ownership of repository, you have to delete or transfer them first.") default: - ctx.Handle(500, "user.Delete", err) + ctx.Handle(500, "user.Delete(DeleteUser)", err) return } } else { diff --git a/templates/org/settings.tmpl b/templates/org/settings.tmpl index e19c027d44..fd0d6a1c14 100644 --- a/templates/org/settings.tmpl +++ b/templates/org/settings.tmpl @@ -98,11 +98,9 @@ <div class="modal fade" id="delete-org-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> - <form action="/{{.Owner.Name}}/{{.Repository.Name}}/settings" method="post" + <form action="/org/{{.Org.Name}}/settings/delete" method="post" class="modal-content"> {{.CsrfTokenHtml}} - <input type="hidden" name="action" value="delete"> - <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> @@ -111,9 +109,8 @@ <div class="modal-body"> <div class="form-group"> - <label>Please enter your organization name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label> - <input name="organization" class="form-control" type="text" - placeholder="Type your organization name" required="required"> + <label>Make sure your are owner of this organization. Please enter your password.<strong class="text-danger">*</strong></label> + <input name="password" class="form-control" type="password" placeholder="Type your account password" required="required"> </div> </div> |