You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
872 B
31 lines
872 B
<script>
|
|
let Data = new GetJson("/api/admin/new/table/{{ .Table }}/");
|
|
</script>
|
|
|
|
<blockstart>
|
|
<h1><a href="/admin/table/{{ .Table }}/">«</a>Admin {{ .Table }}</h1>
|
|
|
|
<block x-data="Data">
|
|
<form method="POST" action="/api/admin/new/table/{{ .Table }}/">
|
|
<card>
|
|
<top><h2>New {{ .Table }}</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>
|
|
|