feat: center captch, add input

This commit is contained in:
Yanislav Igonin 2021-10-04 19:30:59 +03:00
parent 096948bcaa
commit 8ec262f09c

View File

@ -65,6 +65,7 @@
{{ define "post-form" }} {{ define "post-form" }}
<div class="col col-12"> <div class="col col-12">
{{ if eq .FirstPostID 0 }} {{ if eq .FirstPostID 0 }}
<form id="postForm" action="/" method="POST" enctype="multipart/form-data"> <form id="postForm" action="/" method="POST" enctype="multipart/form-data">
{{ else }} {{ else }}
@ -74,11 +75,15 @@
{{ if eq .FirstPostID 0 }} {{ if eq .FirstPostID 0 }}
<input class="form-control" id="postTitle" placeholder="Title" name="title"> <input class="form-control" id="postTitle" placeholder="Title" name="title">
{{ end }} {{ end }}
<textarea class="form-control" id="postText" rows="5" placeholder="Text" name="text"></textarea> <textarea class="form-control" id="postText" rows="5" placeholder="Text" name="text"></textarea>
<input class="form-control" type="file" id="postFiles" multiple name="files"> <input class="form-control" type="file" id="postFiles" multiple name="files">
<input class="form-control" type="hidden" id="postCaptcha" name="captchaId" value="{{ .CaptchaID }}">
<div class="captcha-container text-center">
<img src="/captcha/{{ .CaptchaID }}" alt="Captcha"> <img src="/captcha/{{ .CaptchaID }}" alt="Captcha">
</div>
<input class="form-control" type="hidden" id="postCaptcha" name="captchaId" value="{{ .CaptchaID }}">
<input class="form-control" id="postCaptcha" placeholder="Captcha" name="captcha">
<div class="row"> <div class="row">
{{ if ne .FirstPostID 0 }} {{ if ne .FirstPostID 0 }}