mirror of
https://gitee.com/gitea/gitea.git
synced 2024-11-30 02:37:38 +08:00
fix new team 500 (#6749)
* fix new team 500 * Update models/unit.go Co-Authored-By: lunny <xiaolunwen@gmail.com>
This commit is contained in:
parent
dabee9b1a4
commit
65b3f513c3
@ -25,6 +25,11 @@ const (
|
||||
UnitTypeExternalTracker // 7 ExternalTracker
|
||||
)
|
||||
|
||||
// Value returns integer value for unit type
|
||||
func (u UnitType) Value() int {
|
||||
return int(u)
|
||||
}
|
||||
|
||||
func (u UnitType) String() string {
|
||||
switch u {
|
||||
case UnitTypeCode:
|
||||
|
@ -57,7 +57,7 @@
|
||||
{{range $t, $unit := $.Units}}
|
||||
<div class="field">
|
||||
<div class="ui toggle checkbox">
|
||||
<input type="checkbox" class="hidden" name="units" value="{{$unit.Type}}"{{if or (eq $.Team.ID 0) ($.Team.UnitEnabled $unit.Type)}} checked{{end}}>
|
||||
<input type="checkbox" class="hidden" name="units" value="{{$unit.Type.Value}}"{{if or (eq $.Team.ID 0) ($.Team.UnitEnabled $unit.Type)}} checked{{end}}>
|
||||
<label>{{$.i18n.Tr $unit.NameKey}}</label>
|
||||
<span class="help">{{$.i18n.Tr $unit.DescKey}}</span>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user