aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Svantesson2019-10-14 20:20:42 +0200
committerzeripath2019-10-14 19:20:42 +0100
commit366806db3219ee75010d7f699cc34e6264ab2685 (patch)
tree4fc2ea82913062299c72c7552cd817e493cb3410
parent54c137b373bc05885d710653faaf23ee18cc1807 (diff)
Fix errors in create org UI regarding team access permission. (#8506)
-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 2abffdf74..94e659cb5 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 3821b3221..85bc25217 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 8ae0fc22a..82c8766a9 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>