UI: Confirmation box
This commit is contained in:
parent
cd084dacf1
commit
a046a31d2b
12 changed files with 60 additions and 39 deletions
|
@ -112,6 +112,9 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
|
|||
} else if !isExist {
|
||||
ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), SETTINGS_OPTIONS, nil)
|
||||
return
|
||||
} else if !ctx.User.ValidtePassword(ctx.Query("password")) {
|
||||
ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), SETTINGS_OPTIONS, nil)
|
||||
return
|
||||
} else if err = models.TransferOwnership(ctx.User, newOwner, ctx.Repo.Repository); err != nil {
|
||||
if err == models.ErrRepoAlreadyExist {
|
||||
ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), SETTINGS_OPTIONS, nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue