Add TrN for repository limit (#12492)

* Added TrN for repository limit

* Removed form.reach_limit_of_creation_0

* disable Create Button if user can not create

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
EV3R4and6543 authored and GitHub committed 2021-01-22 00:44:37 +01:00
1 parent aa4c33b43d
commit af7054511e
3 files changed
+12 -7

No files matched your search

+4 -5
View File
@@ -144,11 +144,10 @@ func Create(ctx *context.Context) {
}
}
if !ctx.User.CanCreateRepo() {
ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.MaxCreationLimit()), tplCreate, nil)
} else {
ctx.HTML(200, tplCreate)
}
ctx.Data["CanCreateRepo"] = ctx.User.CanCreateRepo()
ctx.Data["MaxCreationLimit"] = ctx.User.MaxCreationLimit()
ctx.HTML(200, tplCreate)
}
func handleCreateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form interface{}) {