This repository has been archived on 2021-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
goddit/templates/thread_create.html
2021-08-29 18:22:08 +02:00

27 lines
1.4 KiB
HTML

{{define "header"}}
<h1 class="mb-0">Create a new thread</h1>
{{end}}
{{define "content"}}
<form action="/threads" method="POST">
{{.CSRF}}
<div class="form-group">
<label>Title</label>
<input name="title" type="text" class="form-control {{with .Form.Errors.Title}}is-invalid{{end}}" placeholder="Give your thread a great title" value="{{with .Form.Title}}{{.}}{{end}}">
{{with .Form.Errors.Title}}
<div class="invalid-feedack">{{.}}</div>
{{end}}
</div>
<div class="form-group">
<label>Description</label>
<textarea name="description" class="form-control {{with .Form.Errors.Description}}is-invalid{{end}}" rows="3"
placeholder="Tell people what your thread is about">
{{- with .Form.Description}}{{.}}{{end -}}
</textarea>
{{with .Form.Errors.Description}}
<div class="invalid-feedack">{{.}}</div>
{{end}}
</div>
<button type="submit" class="btn btn-primary">Create Thread</button>
</form>
{{end}}