Добавлена Яндекс.Капча

This commit is contained in:
mi
2026-07-23 18:53:32 +03:00
parent 31efbf3b69
commit 8c3c454998
36 changed files with 836 additions and 35 deletions
@@ -2,7 +2,7 @@
<@layout.registrationLayout displayMessage=false; section>
<#if section = "header">${msg("otpTitle")}
<#elseif section = "form">
<link rel="stylesheet" href="${url.resourcesPath}/css/han-login.css?v=4"/>
<link rel="stylesheet" href="${url.resourcesPath}/css/han-login.css?v=6"/>
<div class="han-auth-screen han-otp-screen">
<button class="han-back-button" type="button" onclick="window.history.back()">
<span aria-hidden="true">←</span>
@@ -22,6 +22,18 @@
<input type="hidden" name="han_os_name" class="han-os-name" value="${hanOsName!""}"/>
<input type="hidden" name="han_os_version" class="han-os-version" value="${hanOsVersion!""}"/>
<input type="hidden" name="han_app_version" class="han-app-version" value="${hanAppVersion!""}"/>
<#if captchaEnabled!false>
<input id="han-captcha-token" name="smart-token" type="hidden" value=""/>
<div id="han-captcha-container" class="han-captcha"
data-sitekey="${captchaClientKey!""}"
data-form-id="kc-otp-form"
data-submit-id="han-resend-button"
data-resend-only="true"></div>
<div id="han-captcha-client-error" class="han-error" role="alert" hidden>
<span class="han-error-icon">!</span>
<span>${msg("captchaUnavailable")}</span>
</div>
</#if>
<div id="han-otp-inputs" class="han-otp-inputs <#if message?has_content>han-shake</#if>"
style="grid-template-columns: repeat(${otpCodeLength!6}, minmax(0, 1fr));">
<#list 0..((otpCodeLength!6) - 1) as index>
@@ -54,6 +66,10 @@
</button>
</form>
</div>
<script src="${url.resourcesPath}/js/han-login.js?v=4"></script>
<script src="${url.resourcesPath}/js/han-login.js?v=5"></script>
<#if captchaEnabled!false>
<script src="https://smartcaptcha.cloud.yandex.ru/captcha.js?render=onload&amp;onload=hanCaptchaOnload"
async defer></script>
</#if>
</#if>
</@layout.registrationLayout>