summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
Diffstat (limited to 'routers')
-rw-r--r--routers/repo/repo.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/routers/repo/repo.go b/routers/repo/repo.go
index 2614389aaa..3832b89971 100644
--- a/routers/repo/repo.go
+++ b/routers/repo/repo.go
@@ -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{}) {