mirror of
https://github.com/go-gitea/gitea
synced 2024-11-18 16:01:36 +01:00
Clean code
This commit is contained in:
parent
57ac15aa20
commit
ee9b7f322f
3 changed files with 5 additions and 8 deletions
|
@ -68,7 +68,7 @@ func SettingPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
|
||||||
ctx.User.Avatar = base.EncodeMd5(form.Avatar)
|
ctx.User.Avatar = base.EncodeMd5(form.Avatar)
|
||||||
ctx.User.AvatarEmail = form.Avatar
|
ctx.User.AvatarEmail = form.Avatar
|
||||||
if err := models.UpdateUser(ctx.User); err != nil {
|
if err := models.UpdateUser(ctx.User); err != nil {
|
||||||
ctx.Handle(500, "setting.Setting", err)
|
ctx.Handle(500, "setting.Setting(UpdateUser)", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName)
|
log.Trace("%s User setting updated: %s", ctx.Req.RequestURI, ctx.User.LowerName)
|
||||||
|
|
|
@ -296,7 +296,7 @@ func DeletePost(ctx *middleware.Context) {
|
||||||
case models.ErrUserOwnRepos:
|
case models.ErrUserOwnRepos:
|
||||||
ctx.Flash.Error("Your account still have ownership of repository, you have to delete or transfer them first.")
|
ctx.Flash.Error("Your account still have ownership of repository, you have to delete or transfer them first.")
|
||||||
default:
|
default:
|
||||||
ctx.Handle(500, "user.Delete", err)
|
ctx.Handle(500, "user.Delete(DeleteUser)", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -98,11 +98,9 @@
|
||||||
<div class="modal fade" id="delete-org-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
<div class="modal fade" id="delete-org-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||||
aria-hidden="true">
|
aria-hidden="true">
|
||||||
<div class="modal-dialog">
|
<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">
|
class="modal-content">
|
||||||
{{.CsrfTokenHtml}}
|
{{.CsrfTokenHtml}}
|
||||||
<input type="hidden" name="action" value="delete">
|
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<button type="button" class="close" data-dismiss="modal"
|
<button type="button" class="close" data-dismiss="modal"
|
||||||
aria-hidden="true">×</button>
|
aria-hidden="true">×</button>
|
||||||
|
@ -111,9 +109,8 @@
|
||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Please enter your organization name "<strong class="text-danger">{{.Repository.Name}}</strong>"</label>
|
<label>Make sure your are owner of this organization. Please enter your password.<strong class="text-danger">*</strong></label>
|
||||||
<input name="organization" class="form-control" type="text"
|
<input name="password" class="form-control" type="password" placeholder="Type your account password" required="required">
|
||||||
placeholder="Type your organization name" required="required">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue