From 4cf7a1fca5ed22c4d46317477e6feab324fb337e Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 25 Jun 2014 03:55:59 -0400 Subject: [PATCH] Mirror update on create repo page --- routers/repo/repo.go | 13 +++++++++++++ templates/repo/create.tmpl | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/routers/repo/repo.go b/routers/repo/repo.go index 2ead24df..6d241699 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -36,6 +36,13 @@ func Create(ctx *middleware.Context) { ctx.Data["PageIsNewRepo"] = true ctx.Data["LanguageIgns"] = models.LanguageIgns ctx.Data["Licenses"] = models.Licenses + + if err := ctx.User.GetOrganizations(); err != nil { + ctx.Handle(500, "home.Dashboard(GetOrganizations)", err) + return + } + ctx.Data["Orgs"] = ctx.User.Orgs + ctx.HTML(200, CREATE) } @@ -45,6 +52,12 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) { ctx.Data["LanguageIgns"] = models.LanguageIgns ctx.Data["Licenses"] = models.Licenses + if err := ctx.User.GetOrganizations(); err != nil { + ctx.Handle(500, "home.Dashboard(GetOrganizations)", err) + return + } + ctx.Data["Orgs"] = ctx.User.Orgs + if ctx.HasError() { ctx.HTML(200, CREATE) return diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index c3ba89ae..3288b736 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -19,12 +19,21 @@