summaryrefslogtreecommitdiffstats
path: root/routers/org
diff options
context:
space:
mode:
Diffstat (limited to 'routers/org')
-rw-r--r--routers/org/teams.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/org/teams.go b/routers/org/teams.go
index cbf7f19a80..914561b52a 100644
--- a/routers/org/teams.go
+++ b/routers/org/teams.go
@@ -156,6 +156,7 @@ func NewTeam(ctx *context.Context) {
ctx.Data["PageIsOrgTeams"] = true
ctx.Data["PageIsOrgTeamsNew"] = true
ctx.Data["Team"] = &models.Team{}
+ ctx.Data["Units"] = models.Units
ctx.HTML(200, tplTeamNew)
}
@@ -170,6 +171,7 @@ func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
Name: form.TeamName,
Description: form.Description,
Authorize: models.ParseAccessMode(form.Permission),
+ UnitTypes: form.Units,
}
ctx.Data["Team"] = t
@@ -220,6 +222,7 @@ func EditTeam(ctx *context.Context) {
ctx.Data["PageIsOrgTeams"] = true
ctx.Data["team_name"] = ctx.Org.Team.Name
ctx.Data["desc"] = ctx.Org.Team.Description
+ ctx.Data["Units"] = models.Units
ctx.HTML(200, tplTeamNew)
}
@@ -258,6 +261,7 @@ func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) {
}
}
t.Description = form.Description
+ t.UnitTypes = form.Units
if err := models.UpdateTeam(t, isAuthChanged); err != nil {
ctx.Data["Err_TeamName"] = true
switch {