tokarchuk/v1.17
Unknown 11 years ago
parent 57ac15aa20
commit ee9b7f322f
  1. 2
      routers/user/setting.go
  2. 2
      routers/user/user.go
  3. 9
      templates/org/settings.tmpl

@ -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">&times;</button> aria-hidden="true">&times;</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…
Cancel
Save