renamed cake editor

This commit is contained in:
Bronku 2025-01-31 20:12:26 +01:00
parent 331f3080f9
commit 353dffdd82
4 changed files with 4 additions and 4 deletions

View file

@ -1,5 +1,4 @@
<form hx-post="new_cake" hx-swap="outerHTML">
<label>{{.ID}}</label>
<div>
<label for="name">Name</label>
<input type="text" id="name" name="name" required value="{{.Name}}">

View file

@ -4,7 +4,7 @@
<button hx-get="cake_editor" hx-swap="innerHTML" hx-target="#cake_editor">New</button>
<div id="cakes">
{{range .Cakes}}
<button>{{.Name}}</button>
<button hx-get="cake_editor/{{.ID}}" hx-swap="innerHTML" hx-target="#cake_editor">{{.Name}}</button>
{{end}}
</div>
<div id="cake_editor"></div>