diff --git a/context.go b/context.go index fba3e7a..ad1321d 100644 --- a/context.go +++ b/context.go @@ -68,9 +68,8 @@ func (c *Context) RequestParamExists(key string) bool { return c.Request.httpRequest.Form.Has(key) } -func (c *Context) GetRequesForm(key string) interface{} { - c.Request.httpRequest.ParseForm() - return c.Request.httpRequest.Form[key] +func (c *Context) GetRequesForm() interface{} { + return c.Request.httpRequest.Form } func (c *Context) GetRequesBodyMap() map[string]interface{} { diff --git a/template/components/content_table.go b/template/components/content_table.go index 9e77908..1cb7024 100644 --- a/template/components/content_table.go +++ b/template/components/content_table.go @@ -10,7 +10,7 @@ type ContentTable struct { type ContentTableTH struct { ID string - ValueType string // -> default string, href, badge, list, checkbox + ValueType string // -> default string, href, badge Value string } diff --git a/template/components/content_table.html b/template/components/content_table.html index e5aaf50..2bf559d 100644 --- a/template/components/content_table.html +++ b/template/components/content_table.html @@ -13,10 +13,6 @@ {{template "content_href" $item.Value}} {{ else if eq $x.ValueType "badge"}} {{template "content_badge" $item.Value}} - {{ else if eq $x.ValueType "list"}} - {{template "content_list" $item.Value}} - {{ else if eq $x.ValueType "checkbox"}} - {{template "form_checkbox" $item.Value}} {{ else }} {{ $item.Value }} {{end}} diff --git a/template/components/form_checkbox.html b/template/components/form_checkbox.html index 992cff0..9a8d845 100644 --- a/template/components/form_checkbox.html +++ b/template/components/form_checkbox.html @@ -1,6 +1,6 @@ {{define "form_checkbox"}}
- {{ if .Label }}{{end}} + {{range $options := .AllCheckbox}}