numerus/web/template/products/new.gohtml

36 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

{{ define "title" -}}
{{( pgettext "New Product" "title" )}}
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.productForm*/ -}}
2023-04-02 14:10:13 +00:00
<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*/ -}}
2023-05-23 21:13:21 +00:00
<section 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 }}
2023-05-23 21:13:21 +00:00
<div class="product-data">
{{ template "input-field" .Name | addInputAttr "autofocus" }}
{{ template "input-field" .Price }}
{{ template "select-field" .Tax }}
{{ template "tags-field" .Tags }}
2023-05-23 21:13:21 +00:00
{{ template "input-field" .Description }}
</div>
<fieldset>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
</fieldset>
</form>
</section>
{{- end }}