mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 16:03:20 +02:00
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:
1 parent
aa4c33b43d
commit
af7054511e
3 files changed
+12
-7
No files matched your search
@@ -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{}) {
|
||||
|
||||
Reference in new issue
Block a user