parent
b0ba0c7e16
commit
e178ca6733
@ -0,0 +1,31 @@ |
|||||||
|
<script> |
||||||
|
let Data = new GetJson("/api/admin/new/table/{{ .Table }}/"); |
||||||
|
</script> |
||||||
|
|
||||||
|
<blockstart> |
||||||
|
<h1>Admin Tables</h1> |
||||||
|
|
||||||
|
<block x-init="item = await Data.oneThing()" x-data="{item: {}}"> |
||||||
|
<form method="POST" action="/api/admin/new/table/{{ .Table }}/"> |
||||||
|
<card> |
||||||
|
<top><h2>{{ .Table }} : New</h2></top> |
||||||
|
<middle> |
||||||
|
<template x-for="(value, key) in item"> |
||||||
|
<div> |
||||||
|
<label x-text="key" x-bind:for="key"></label> |
||||||
|
<input x-bind:name="key" x-text="value" x-model="item[key]" x-bind:id="key" /> |
||||||
|
</div> |
||||||
|
</template> |
||||||
|
</middle> |
||||||
|
<bottom> |
||||||
|
<button-group> |
||||||
|
<button type="button"><a href="/admin/table/{{ .Table }}/">Back</a></button> |
||||||
|
<button type="submit">Insert</button> |
||||||
|
<button type="button">Clear</button> |
||||||
|
</button-group> |
||||||
|
</bottom> |
||||||
|
</card> |
||||||
|
</form> |
||||||
|
</block> |
||||||
|
|
||||||
|
</blockstart> |
Loading…
Reference in new issue