diff --git a/models/org.go b/models/org.go index 30009d432..e75b5f0e2 100644 --- a/models/org.go +++ b/models/org.go @@ -127,7 +127,6 @@ func CreateOrganization(org, owner *User) (err error) { org.NumTeams = 1 org.NumMembers = 1 org.Type = UserTypeOrganization - org.Visibility = VisibleType(setting.Service.DefaultVisibilityMode) sess := x.NewSession() defer sess.Close() diff --git a/routers/org/org.go b/routers/org/org.go index bb7540277..f1b54d50d 100644 --- a/routers/org/org.go +++ b/routers/org/org.go @@ -1,4 +1,5 @@ // Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. @@ -23,6 +24,7 @@ const ( // Create render the page for create organization func Create(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("new_org") + ctx.Data["DefaultVisibilityMode"] = Setting.Service.DefaultVisibilityMode if !ctx.User.CanCreateOrganization() { ctx.ServerError("Not allowed", errors.New(ctx.Tr("org.form.create_org_not_allowed"))) return diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl index 765ef240e..39412b16a 100644 --- a/templates/org/create.tmpl +++ b/templates/org/create.tmpl @@ -15,6 +15,28 @@ {{.i18n.Tr "org.org_name_helper"}} +
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+