added team view to season_leagues
This commit is contained in:
@@ -27,7 +27,18 @@ func (f *FormGetter) Get(key string) string {
|
||||
}
|
||||
|
||||
func (f *FormGetter) GetList(key string) []string {
|
||||
return strings.Split(f.Get(key), ",")
|
||||
if f.r.Form == nil {
|
||||
return nil
|
||||
}
|
||||
values, ok := f.r.Form[key]
|
||||
if !ok || len(values) == 0 {
|
||||
return nil
|
||||
}
|
||||
// Support both comma-separated single values and multiple form fields
|
||||
if len(values) == 1 {
|
||||
return strings.Split(values[0], ",")
|
||||
}
|
||||
return values
|
||||
}
|
||||
|
||||
func (f *FormGetter) GetMaps(key string) []map[string]string {
|
||||
@@ -72,6 +83,10 @@ func (f *FormGetter) Int(key string) *IntField {
|
||||
return newIntField(key, f)
|
||||
}
|
||||
|
||||
func (f *FormGetter) Bool(key string) *BoolField {
|
||||
return newBoolField(key, f)
|
||||
}
|
||||
|
||||
func (f *FormGetter) Time(key string, format *timefmt.Format) *TimeField {
|
||||
return newTimeField(key, format, f)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user