From 676a257a9bc41dc07947c99f365a87c622f818f0 Mon Sep 17 00:00:00 2001 From: Norwin Date: Wed, 30 Mar 2022 22:45:30 +0200 Subject: [PATCH] Fix creating new org teams regression from #18518 --- templates/org/team/new.tmpl | 8 ++++---- templates/org/team/sidebar.tmpl | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl index 2531868ec8ca..7db7e752934e 100644 --- a/templates/org/team/new.tmpl +++ b/templates/org/team/new.tmpl @@ -101,17 +101,17 @@
- +
- +
- +
@@ -123,7 +123,7 @@ {{if lt $unit.MaxPerm 2}}
- + {{$.i18n.Tr $unit.DescKey}}
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl index 8adee3cc7a18..3247a52ebc93 100644 --- a/templates/org/team/sidebar.tmpl +++ b/templates/org/team/sidebar.tmpl @@ -61,11 +61,11 @@ {{if and (lt $unit.MaxPerm 2) (not $unit.Type.UnitGlobalDisabled)}} {{$.i18n.Tr $unit.NameKey}} - {{if eq ($.Team.UnitAccessMode $unit.Type) 0 -}} + {{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}} {{$.i18n.Tr "org.teams.none_access"}} - {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1) -}} + {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}} {{$.i18n.Tr "org.teams.read_access"}} - {{- else if eq ($.Team.UnitAccessMode $unit.Type) 2 -}} + {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}} {{$.i18n.Tr "org.teams.write_access"}} {{- end}}