mirror of
https://github.com/EDeev/deev.space.git
synced 2026-06-15 19:11:09 +03:00
27 lines
No EOL
910 B
HTML
27 lines
No EOL
910 B
HTML
<div class="smart-captcha-wrapper" style="height: 100px;">
|
|
<div id="captcha-container"
|
|
class="smart-captcha"
|
|
data-sitekey="{{ client_key }}"
|
|
data-hl="ru"></div>
|
|
<input type="hidden" name="{{ widget.name }}" id="smart-captcha-token" value="">
|
|
</div>
|
|
|
|
<script>
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
// Ожидаем загрузки SmartCaptcha
|
|
function initSmartCaptcha() {
|
|
if (window.smartCaptcha) {
|
|
window.smartCaptcha.render('captcha-container', {
|
|
sitekey: '{{ client_key }}',
|
|
hl: 'ru',
|
|
callback: function(token) {
|
|
document.getElementById('smart-captcha-token').value = token;
|
|
}
|
|
});
|
|
} else {
|
|
setTimeout(initSmartCaptcha, 100);
|
|
}
|
|
}
|
|
initSmartCaptcha();
|
|
});
|
|
</script> |