2021-10-05 21:46:17 +03:00
|
|
|
{{ define "post-form" }}
|
|
|
|
<div class="d-flex justify-content-center">
|
|
|
|
|
|
|
|
<div class="col col-lg-6 col-md-8">
|
|
|
|
{{ if eq .FirstPostID 0 }}
|
|
|
|
<form id="postForm" action="/" method="POST" enctype="multipart/form-data">
|
|
|
|
{{ else }}
|
|
|
|
<form id="postForm" action="/{{ .FirstPostID }}" method="POST" enctype="multipart/form-data">
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
{{ if eq .FirstPostID 0 }}
|
|
|
|
<input class="form-control" id="postTitle" placeholder="Title" name="title">
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<textarea class="form-control" id="postText" rows="5" placeholder="Text" name="text"></textarea>
|
|
|
|
<input class="form-control" type="file" id="postFiles" multiple name="files">
|
|
|
|
|
2022-01-27 20:23:51 +03:00
|
|
|
{{ if .IsCaptchaActive }}
|
2022-01-28 02:49:09 +03:00
|
|
|
{{ template "captcha" .CaptchaID}}
|
2022-01-27 20:23:51 +03:00
|
|
|
{{ end }}
|
2021-10-05 21:46:17 +03:00
|
|
|
|
|
|
|
<div class="row">
|
|
|
|
{{ if ne .FirstPostID 0 }}
|
|
|
|
<div class="col">
|
2021-10-07 10:51:18 +03:00
|
|
|
<input class="form-check-input" type="checkbox" value="on" id="postSage" name="sage">
|
2021-10-05 21:46:17 +03:00
|
|
|
<label class="form-check-label" for="postSage">
|
|
|
|
Sage
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
<div class="col text-end">
|
|
|
|
<button class="col btn btn-outline-primary" type="submit" >
|
|
|
|
{{ if ne .FirstPostID 0 }}
|
|
|
|
Send
|
|
|
|
{{ else }}
|
|
|
|
Create thread
|
|
|
|
{{ end }}
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{{ end }}
|