summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/auth/org.go5
-rw-r--r--routers/org/org.go9
-rw-r--r--templates/org/create.tmpl4
3 files changed, 10 insertions, 8 deletions
diff --git a/modules/auth/org.go b/modules/auth/org.go
index 2abffdf74e..94e659cb5b 100644
--- a/modules/auth/org.go
+++ b/modules/auth/org.go
@@ -22,8 +22,9 @@ import (
// CreateOrgForm form for creating organization
type CreateOrgForm struct {
- OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
- Visibility structs.VisibleType
+ OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
+ Visibility structs.VisibleType
+ RepoAdminChangeTeamAccess bool
}
// Validate validates the fields
diff --git a/routers/org/org.go b/routers/org/org.go
index 3821b32216..85bc25217b 100644
--- a/routers/org/org.go
+++ b/routers/org/org.go
@@ -47,10 +47,11 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) {
}
org := &models.User{
- Name: form.OrgName,
- IsActive: true,
- Type: models.UserTypeOrganization,
- Visibility: form.Visibility,
+ Name: form.OrgName,
+ IsActive: true,
+ Type: models.UserTypeOrganization,
+ Visibility: form.Visibility,
+ RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess,
}
if err := models.CreateOrganization(org, ctx.User); err != nil {
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
index 8ae0fc22af..82c8766a95 100644
--- a/templates/org/create.tmpl
+++ b/templates/org/create.tmpl
@@ -33,9 +33,9 @@
</div>
</div>
- <div class="field" id="permission_box">
+ <div class="inline field" id="permission_box">
<label>{{.i18n.Tr "org.settings.permission"}}</label>
- <div class="field">
+ <div class="inline-grouped-list">
<div class="ui checkbox">
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
<label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>