2023-02-04 10:32:39 +00:00
|
|
|
{{ define "title" -}}
|
|
|
|
{{( pgettext "New Product" "title" )}}
|
|
|
|
{{- end }}
|
|
|
|
|
2023-03-20 12:09:52 +00:00
|
|
|
{{ define "breadcrumbs" -}}
|
2023-02-04 10:32:39 +00:00
|
|
|
{{- /*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>{{( pgettext "New Product" "title" )}}</a>
|
|
|
|
</p>
|
|
|
|
</nav>
|
2023-03-20 12:09:52 +00:00
|
|
|
{{- end }}
|
|
|
|
|
|
|
|
{{ define "content" }}
|
|
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productForm*/ -}}
|
2023-03-27 07:44:04 +00:00
|
|
|
<section class="dialog-content" id="new-product-dialog-content" data-hx-target="this">
|
2023-02-04 10:32:39 +00:00
|
|
|
<h2>{{(pgettext "New Product" "title")}}</h2>
|
2023-03-27 07:44:04 +00:00
|
|
|
<form method="POST" action="{{ companyURI "/products" }}"
|
|
|
|
data-hx-boost="true" data-hx-select="#new-product-dialog-content"
|
|
|
|
>
|
2023-02-04 10:32:39 +00:00
|
|
|
{{ csrfToken }}
|
|
|
|
|
|
|
|
{{ template "input-field" .Name | addInputAttr "autofocus" }}
|
|
|
|
{{ template "input-field" .Description }}
|
|
|
|
{{ template "input-field" .Price }}
|
|
|
|
{{ template "select-field" .Tax }}
|
2023-03-26 11:51:57 +00:00
|
|
|
{{ template "tags-field" .Tags }}
|
2023-02-04 10:32:39 +00:00
|
|
|
|
|
|
|
<fieldset>
|
|
|
|
<button class="primary" type="submit">{{( pgettext "New product" "action" )}}</button>
|
|
|
|
</fieldset>
|
|
|
|
|
|
|
|
</form>
|
|
|
|
</section>
|
|
|
|
{{- end }}
|