form: add CAPTCHAs

Enabled in Settings > Captchas, shows a captcha on the account creation
form.
This commit is contained in:
Harvey Tindall
2022-01-10 01:55:48 +00:00
parent 8758d74e32
commit d9f8785372
12 changed files with 223 additions and 13 deletions
+12 -7
View File
@@ -3,13 +3,11 @@
<head>
<link rel="stylesheet" type="text/css" href="css/{{ .cssVersion }}bundle.css">
{{ template "header.html" . }}
<title>
{{ if .passwordReset }}
{{ .strings.passwordReset }}
{{ else }}
{{ .strings.pageTitle }}
{{ end }}
</title>
{{ if .passwordReset }}
<title>{{ .strings.passwordReset }}</title>
{{ else }}
<title>{{ .strings.pageTitle }}</title>
{{ end }}
</head>
<body class="max-w-full overflow-x-hidden section">
<div id="modal-success" class="modal">
@@ -177,6 +175,13 @@
{{ end }}
</ul>
</div>
{{ if .captcha }}
<div class="card ~neutral @low mb-4">
<span class="label supra mb-2">CAPTCHA <span id="captcha-success" class="badge lg @low ~critical ml-2 float-right"><i class="ri-close-line"></i></span></span>
<div id="captcha-img" class="mt-2 mb-2"></div>
<input class="field ~neutral @low" id="captcha-input" class="mt-2" placeholder="CAPTCHA">
</div>
{{ end }}
{{ if .contactMessage }}
<aside class="col aside sm ~info mt-4">{{ .contactMessage }}</aside>
{{ end }}