Remove obsolete jquery code for the captcha registration
authorMarcel Werk <burntime@woltlab.com>
Sat, 8 Jun 2024 11:13:09 +0000 (13:13 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 8 Jun 2024 11:13:09 +0000 (13:13 +0200)
com.woltlab.wcf/templates/shared_captchaQuestion.tpl

index 252037aad14be4846ffdaddfbf8505fab14992c7..80217ef24d77e522a74eec628b94deb7d440ad63 100644 (file)
                
        {if !$ajaxCaptcha|empty}
                <script data-relocate="true">
-                       $(function() {
-                               WCF.System.Captcha.addCallback('{$captchaID}', function() {
+                       require(['WoltLabSuite/Core/Controller/Captcha'], (ControllerCaptcha) => {
+                               ControllerCaptcha.add('{unsafe:$captchaID|encodeJS}', () => {
                                        return {
-                                               captchaAnswer: $('#captchaAnswer').val(),
-                                               captchaQuestion: '{$captchaQuestion}'
+                                               captchaAnswer: document.getElementById('captchaAnswer').value,
+                                               captchaQuestion: '{unsafe:$captchaQuestion|encodeJS}'
                                        };
                                });
                        });