mirror of
https://github.com/yanislav-igonin/micrach
synced 2025-04-20 03:40:33 +03:00
feat: captcha component
This commit is contained in:
parent
2809a418a2
commit
d3202064a2
7
templates/captcha.html
Normal file
7
templates/captcha.html
Normal file
@ -0,0 +1,7 @@
|
||||
{{ define "captcha" }}
|
||||
<div class="captcha-container text-center">
|
||||
<img src="/captcha/{{ . }}" alt="Captcha">
|
||||
</div>
|
||||
<input class="form-control" type="hidden" name="captchaId" value="{{ . }}">
|
||||
<input class="form-control" id="postCaptcha" type="tel" pattern="\d+" placeholder="Captcha" name="captcha">
|
||||
{{ end }}
|
@ -16,11 +16,7 @@
|
||||
<input class="form-control" type="file" id="postFiles" multiple name="files">
|
||||
|
||||
{{ if .IsCaptchaActive }}
|
||||
<div class="captcha-container text-center">
|
||||
<img src="/captcha/{{ .CaptchaID }}" alt="Captcha">
|
||||
</div>
|
||||
<input class="form-control" type="hidden" name="captchaId" value="{{ .CaptchaID }}">
|
||||
<input class="form-control" id="postCaptcha" type="tel" pattern="\d+" placeholder="Captcha" name="captcha">
|
||||
{{ template "captcha" .CaptchaID}}
|
||||
{{ end }}
|
||||
|
||||
<div class="row">
|
||||
|
Loading…
Reference in New Issue
Block a user