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
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (field *InputField) String() string {
|
||||||
|
return field.Val
|
||||||
|
}
|
||||||
|
|
||||||
type SelectOption struct {
|
type SelectOption struct {
|
||||||
Value string
|
Value string
|
||||||
Label string
|
Label string
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{{ define "title" -}}
|
{{ define "title" -}}
|
||||||
{{printf (pgettext "Edit Product “%s”" "title") .Name.Val }}
|
{{printf (pgettext "Edit Product “%s”" "title") .Name }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ define "content" }}
|
{{ define "content" }}
|
||||||
|
@ -8,11 +8,11 @@
|
||||||
<p>
|
<p>
|
||||||
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
||||||
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
||||||
<a>{{ .Name.Val }}</a>
|
<a>{{ .Name }}</a>
|
||||||
</p>
|
</p>
|
||||||
</nav>
|
</nav>
|
||||||
<section class="dialog-content">
|
<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">
|
<form method="POST">
|
||||||
{{ csrfToken }}
|
{{ csrfToken }}
|
||||||
{{ putMethod }}
|
{{ putMethod }}
|
||||||
|
|
Loading…
Reference in New Issue