41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
{{ define "title" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editProductPage*/ -}}
|
|
{{printf (pgettext "Edit Product “%s”" "title") .ProductName }}
|
|
{{- end }}
|
|
|
|
{{ define "breadcrumbs" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editProductPage*/ -}}
|
|
<nav data-hx-target="main" data-hx-boost="true">
|
|
<p>
|
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
|
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
|
<a>{{ .ProductName }}</a>
|
|
</p>
|
|
</nav>
|
|
{{- end }}
|
|
|
|
{{ define "content" }}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editProductPage*/ -}}
|
|
<section class="dialog-content" id="edit-product-dialog-content" data-hx-target="this">
|
|
<h2>{{printf (pgettext "Edit Product “%s”" "title") .ProductName }}</h2>
|
|
<form method="POST" action="{{ companyURI "/products/" }}{{ .Slug }}"
|
|
data-hx-boost="true" data-hx-select="#edit-product-dialog-content"
|
|
>
|
|
{{ csrfToken }}
|
|
{{ putMethod }}
|
|
|
|
{{ with .Form }}
|
|
{{ template "input-field" .Name | addInputAttr "autofocus" }}
|
|
{{ template "input-field" .Description }}
|
|
{{ template "input-field" .Price }}
|
|
{{ template "select-field" .Tax }}
|
|
{{ template "tags-field" .Tags }}
|
|
{{ end }}
|
|
|
|
<fieldset>
|
|
<button class="primary" type="submit">{{( pgettext "Update product" "action" )}}</button>
|
|
</fieldset>
|
|
</form>
|
|
</section>
|
|
{{- end }}
|