formidable/internal/server/template/blocks/form.html.tmpl

35 lines
1.3 KiB
Cheetah
Raw Permalink Normal View History

2022-03-22 09:21:55 +01:00
{{define "form"}}
<form method="post">
<table width="100%">
<tbody>
<tr>
<td align="left" nowrap="">
<strong>{{ .Schema.Title }}</strong>
<em>{{ .Schema.Description }}</em>
</td>
2022-03-22 09:21:55 +01:00
<td align="right" nowrap="">
<input
class="bg-green-600 text-white my-4 px-4 py-2 rounded-md text-xl font-medium hover:bg-green-700 transition duration-300"
type="submit"
2022-05-09 14:23:23 +02:00
name="submit" value="Save" />
2022-03-22 09:21:55 +01:00
</td>
</tr>
</tbody>
</table>
{{ if .Error }}
<div class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative">
<strong class="font-bold">There is some(s) error(s) !</strong>
<br />
<span class="block">{{ .Error.Message }}</span>
</div>
{{ end }}
{{ if .SuccessMessage }}
<div class="bg-green-100 border border-green-600 text-green-600 px-4 py-3 rounded relative">
<strong class="font-bold">Success !</strong>
<br />
<span class="block">{{ .SuccessMessage }}</span>
</div>
{{ end }}
2022-03-22 09:21:55 +01:00
{{template "form_item" .}}
</form>
{{end}}