diff --git a/pkg/form.go b/pkg/form.go index 117447c..bd96807 100644 --- a/pkg/form.go +++ b/pkg/form.go @@ -74,6 +74,10 @@ func (field *InputField) Float64() float64 { return value } +func (field *InputField) String() string { + return field.Val +} + type SelectOption struct { Value string Label string diff --git a/web/template/products/edit.gohtml b/web/template/products/edit.gohtml index aa36815..2fd3085 100644 --- a/web/template/products/edit.gohtml +++ b/web/template/products/edit.gohtml @@ -1,5 +1,5 @@ {{ define "title" -}} - {{printf (pgettext "Edit Product “%s”" "title") .Name.Val }} + {{printf (pgettext "Edit Product “%s”" "title") .Name }} {{- end }} {{ define "content" }} @@ -8,11 +8,11 @@

{{( pgettext "Home" "title" )}} / {{( pgettext "Products" "title" )}} / - {{ .Name.Val }} + {{ .Name }}

-

{{printf (pgettext "Edit Product “%s”" "title") .Name.Val }}

+

{{printf (pgettext "Edit Product “%s”" "title") .Name }}

{{ csrfToken }} {{ putMethod }}