36 lines
1.3 KiB
Plaintext
36 lines
1.3 KiB
Plaintext
{{ define "title" -}}
|
|
{{( pgettext "New Product" "title" )}}
|
|
{{- end }}
|
|
|
|
{{ define "breadcrumbs" -}}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productForm*/ -}}
|
|
<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>{{( pgettext "New Product" "title" )}}</a>
|
|
</p>
|
|
</nav>
|
|
{{- end }}
|
|
|
|
{{ define "content" }}
|
|
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productForm*/ -}}
|
|
<section class="dialog-content" id="new-product-dialog-content" data-hx-target="main">
|
|
<h2>{{(pgettext "New Product" "title")}}</h2>
|
|
<form method="POST" action="{{ companyURI "/products" }}" data-hx-boost="true">
|
|
{{ csrfToken }}
|
|
|
|
{{ template "input-field" .Name | addInputAttr "autofocus" }}
|
|
{{ template "input-field" .Description }}
|
|
{{ template "input-field" .Price }}
|
|
{{ template "select-field" .Tax }}
|
|
{{ template "tags-field" .Tags }}
|
|
|
|
<fieldset>
|
|
<button class="primary" type="submit">{{( pgettext "New product" "action" )}}</button>
|
|
</fieldset>
|
|
|
|
</form>
|
|
</section>
|
|
{{- end }}
|