numerus/web/template/expenses/edit.gohtml

45 lines
1.8 KiB
Plaintext
Raw Normal View History

2023-05-03 10:46:25 +00:00
{{ define "title" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editExpensePage*/ -}}
{{ printf ( pgettext "Edit Expense “%s”" "title" ) .Slug }}
{{- end }}
{{ define "breadcrumbs" -}}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editExpensePage*/ -}}
<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>{{ .Slug }}</a>
</p>
</nav>
{{- end }}
{{ define "content" }}
{{- /*gotype: dev.tandem.ws/tandem/numerus/pkg.editExpensePage*/ -}}
2023-05-23 21:13:21 +00:00
<section id="new-expense-dialog-content" data-hx-target="main">
2023-05-03 10:46:25 +00:00
<h2>{{ printf (pgettext "Edit Expense “%s”" "title") .Slug }}</h2>
<form enctype="multipart/form-data" method="POST" action="{{ companyURI "/expenses/" }}{{ .Slug }}"
data-hx-boost="true">
2023-05-03 10:46:25 +00:00
{{ csrfToken }}
{{ putMethod }}
{{ with .Form -}}
<div class="expenses-data">
{{ template "select-field" .Invoicer }}
{{ template "input-field" .InvoiceNumber }}
{{ template "input-field" .InvoiceDate }}
{{ template "input-field" .Amount }}
{{ template "select-field" .Tax }}
{{ template "tags-field" .Tags }}
{{ template "select-field" .ExpenseStatus }}
{{ template "file-field" .File }}
</div>
2023-05-03 10:46:25 +00:00
{{- end }}
<fieldset>
<button class="primary" type="submit">{{( pgettext "Save" "action" )}}</button>
2023-05-03 10:46:25 +00:00
</fieldset>
</form>
</section>
{{- end }}