mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-17 11:59:30 +00: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:
parent
aa4c33b43d
commit
af7054511e
3 changed files with 12 additions and 7 deletions
|
@ -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{}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue