35 lines
1.2 KiB
HTML
35 lines
1.2 KiB
HTML
|
|
{{define "title"}}Manage{{end}}
|
||
|
|
{{define "content"}}
|
||
|
|
<p><a href="/">← Back to upload</a></p>
|
||
|
|
<h1>Manage lists</h1>
|
||
|
|
<p><small>Rename fixes the label everywhere it's used (receipts reference these by id). Adding a new entry creates a fresh id.</small></p>
|
||
|
|
{{if .Error}}<div class="err">{{.Error}}</div>{{end}}
|
||
|
|
|
||
|
|
<h2>Categories</h2>
|
||
|
|
{{range .Categories}}
|
||
|
|
<form class="row" method="post" action="/manage/categories/rename">
|
||
|
|
<input type="hidden" name="id" value="{{.ID}}">
|
||
|
|
<input type="text" name="label" value="{{.Label}}">
|
||
|
|
<button type="submit">Save</button>
|
||
|
|
</form>
|
||
|
|
{{end}}
|
||
|
|
<form class="row add" method="post" action="/manage/categories">
|
||
|
|
<input type="text" name="label" placeholder="New category">
|
||
|
|
<button type="submit">Add</button>
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<h2>Who</h2>
|
||
|
|
{{if not .People}}<p><small>No entries yet — add one below.</small></p>{{end}}
|
||
|
|
{{range .People}}
|
||
|
|
<form class="row" method="post" action="/manage/people/rename">
|
||
|
|
<input type="hidden" name="id" value="{{.ID}}">
|
||
|
|
<input type="text" name="label" value="{{.Label}}">
|
||
|
|
<button type="submit">Save</button>
|
||
|
|
</form>
|
||
|
|
{{end}}
|
||
|
|
<form class="row add" method="post" action="/manage/people">
|
||
|
|
<input type="text" name="label" placeholder="New person">
|
||
|
|
<button type="submit">Add</button>
|
||
|
|
</form>
|
||
|
|
{{end}}
|