mirror of
https://github.com/simon987/od-database.git
synced 2025-12-13 14:59:02 +00:00
Captcha for searches
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<div class="card">
|
||||
<div class="card-header">Search</div>
|
||||
<div class="card-body">
|
||||
<form action="/search">
|
||||
<form action="/search" id="sfrm">
|
||||
|
||||
<div class="form-row">
|
||||
|
||||
@@ -92,7 +92,14 @@
|
||||
|
||||
{# Search button #}
|
||||
<div class="form-group col-md-7">
|
||||
<input class="btn btn-primary btn-shadow" type="submit" value="Search" style="float: right">
|
||||
|
||||
{% if show_captcha %}
|
||||
<script>function f(token) {document.getElementById("sfrm").submit();}</script>
|
||||
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
|
||||
<button class="g-recaptcha btn btn-primary btn-shadow" data-sitekey="6LcCXWkUAAAAAJo2NR9_m09Obn5YmDrI97sGrr2f" data-callback="f" style="float: right">Search</button>
|
||||
{% else %}
|
||||
<input class="btn btn-primary btn-shadow" type="submit" value="Search" style="float: right">
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user