2023-02-04 10:32:39 +00:00
|
|
|
{{ define "title" -}}
|
2023-03-27 07:44:04 +00:00
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editProductPage*/ -}}
|
|
|
|
{{printf (pgettext "Edit Product “%s”" "title") .ProductName }}
|
2023-02-04 10:32:39 +00:00
|
|
|
{{- end }}
|
|
|
|
|
2023-03-20 12:09:52 +00:00
|
|
|
{{ define "breadcrumbs" -}}
|
2023-03-27 07:44:04 +00:00
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editProductPage*/ -}}
|
2023-02-04 10:32:39 +00:00
|
|
|
<nav>
|
|
|
|
<p>
|
|
|
|
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
|
|
|
|
<a href="{{ companyURI "/products"}}">{{( pgettext "Products" "title" )}}</a> /
|
2023-03-27 07:44:04 +00:00
|
|
|
<a>{{ .ProductName }}</a>
|
2023-02-04 10:32:39 +00:00
|
|
|
</p>
|
|
|
|
</nav>
|
2023-03-20 12:09:52 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "content" }}
|
2023-03-27 07:44:04 +00:00
|
|
|
{{- /*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"
|
|
|
|
>
|
2023-02-04 10:32:39 +00:00
|
|
|
{{ csrfToken }}
|
|
|
|
{{ putMethod }}
|
|
|
|
|
2023-03-27 07:44:04 +00:00
|
|
|
{{ 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 }}
|
2023-02-04 10:32:39 +00:00
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<button class="primary" type="submit">{{( pgettext "Update product" "action" )}}</button>
|
|
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
{{- end }}
|