31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
|
{{ define "title" -}}
|
||
|
{{printf (pgettext "Edit Product “%s”" "title") .Name.Val }}
|
||
|
{{- end }}
|
||
|
|
||
|
{{ define "content" }}
|
||
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productForm*/ -}}
|
||
|
<nav>
|
||
|
<p>
|
||
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
||
|
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
||
|
<a>{{ .Name.Val }}</a>
|
||
|
</p>
|
||
|
</nav>
|
||
|
<section class="dialog-content">
|
||
|
<h2>{{printf (pgettext "Edit Product “%s”" "title") .Name.Val }}</h2>
|
||
|
<form method="POST">
|
||
|
{{ csrfToken }}
|
||
|
{{ putMethod }}
|
||
|
|
||
|
{{ template "input-field" .Name | addInputAttr "autofocus" }}
|
||
|
{{ template "input-field" .Description }}
|
||
|
{{ template "input-field" .Price }}
|
||
|
{{ template "select-field" .Tax }}
|
||
|
|
||
|
<fieldset>
|
||
|
<button class="primary" type="submit">{{( pgettext "Update product" "action" )}}</button>
|
||
|
</fieldset>
|
||
|
</form>
|
||
|
</section>
|
||
|
{{- end }}
|