numerus/web/template/expenses/new.gohtml

37 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-05-03 10:46:25 +00:00
{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.expenseForm*/ -}}
{{( pgettext "New Expense" "title" )}}
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.expenseForm*/ -}}
<nav data-hx-target="main" data-hx-boost="true">
<p>
<a href="{{ companyURI "/" }}">{{( pgettext "Home" "title" )}}</a> /
<a href="{{ companyURI "/expenses"}}">{{( pgettext "Expenses" "title" )}}</a> /
<a>{{( pgettext "New Expense" "title" )}}</a>
</p>
</nav>
{{- end }}
{{ define "content" }}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.expenseForm*/ -}}
<section class="dialog-content" id="new-expense-dialog-content" data-hx-target="main">
<h2>{{(pgettext "New Expense" "title")}}</h2>
<form method="POST" action="{{ companyURI "/expenses" }}" data-hx-boost="true">
{{ csrfToken }}
{{ template "select-field" .Invoicer }}
{{ template "input-field" .InvoiceNumber }}
{{ template "input-field" .InvoiceDate }}
{{ template "input-field" .Amount }}
{{ template "select-field" .Tax }}
{{ template "tags-field" .Tags }}
<fieldset>
<button class="primary" type="submit">{{( pgettext "New expense" "action" )}}</button>
</fieldset>
</form>
</section>
{{- end }}