forked from Shiloh/githaven
Fix errors in create org UI regarding team access permission. (#8506)
This commit is contained in:
parent
54c137b373
commit
366806db32
@ -24,6 +24,7 @@ import (
|
|||||||
type CreateOrgForm struct {
|
type CreateOrgForm struct {
|
||||||
OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
|
OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"`
|
||||||
Visibility structs.VisibleType
|
Visibility structs.VisibleType
|
||||||
|
RepoAdminChangeTeamAccess bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates the fields
|
// Validate validates the fields
|
||||||
|
@ -51,6 +51,7 @@ func CreatePost(ctx *context.Context, form auth.CreateOrgForm) {
|
|||||||
IsActive: true,
|
IsActive: true,
|
||||||
Type: models.UserTypeOrganization,
|
Type: models.UserTypeOrganization,
|
||||||
Visibility: form.Visibility,
|
Visibility: form.Visibility,
|
||||||
|
RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := models.CreateOrganization(org, ctx.User); err != nil {
|
if err := models.CreateOrganization(org, ctx.User); err != nil {
|
||||||
|
@ -33,9 +33,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="field" id="permission_box">
|
<div class="inline field" id="permission_box">
|
||||||
<label>{{.i18n.Tr "org.settings.permission"}}</label>
|
<label>{{.i18n.Tr "org.settings.permission"}}</label>
|
||||||
<div class="field">
|
<div class="inline-grouped-list">
|
||||||
<div class="ui checkbox">
|
<div class="ui checkbox">
|
||||||
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
|
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
|
||||||
<label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>
|
<label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user