Add the String() method to InputField
This commit is contained in:
parent
c685fc496b
commit
1ab48d2947
|
@ -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
|
||||
|
|
|
@ -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 @@
|
|||
<p>
|
||||
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
||||
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
||||
<a>{{ .Name.Val }}</a>
|
||||
<a>{{ .Name }}</a>
|
||||
</p>
|
||||
</nav>
|
||||
<section class="dialog-content">
|
||||
<h2>{{printf (pgettext "Edit Product “%s”" "title") .Name.Val }}</h2>
|
||||
<h2>{{printf (pgettext "Edit Product “%s”" "title") .Name }}</h2>
|
||||
<form method="POST">
|
||||
{{ csrfToken }}
|
||||
{{ putMethod }}
|
||||
|
|
Loading…
Reference in New Issue