Reply to thread

Did you try to replace

[code]

<xf:js src="xf/captcha.js" min="1" />

[/code]


with


[code]

<xf:js src="xf/captcha.js" min="1" />


<xf:js>

(function ($, window, document, _undefined)

{

    "use strict";


    XF.ReCaptcha = XF.extend(XF.ReCaptcha, {

        init: function()

        {

            if (!this.options.sitekey)

            {

                return;

            }


            var $form = this.$target.closest('form');


            if (this.options.invisible)

            {

                var $reCaptchaTarget = $('<div />'),

                    $formRow = this.$target.closest('.formRow');


                $formRow.hide();

                $formRow.after($reCaptchaTarget);

                this.$reCaptchaTarget = $reCaptchaTarget;


                $form.on('ajax-submit:before', XF.proxy(this, 'beforeSubmit'));

            }

            else

            {

                this.$reCaptchaTarget = this.$target;

            }


            $form.on('ajax-submit:error ajax-submit:always', XF.proxy(this, 'reload'));


            if (window.grecaptcha)

            {

                this.create();

            }

            else

            {

                XF.ReCaptcha.Callbacks.push(XF.proxy(this, 'create'));


                $.ajax({

                    url: 'https://www.recaptcha.net/recaptcha/api.js?onload=XFReCaptchaCallback&render=explicit&hl=<languagecode>',

                    dataType: 'script',

                    cache: true,

                    global: false

                });

            }

        },

    });

} (jQuery, window, document));

</xf:js>

[/code]


in template captcha_recaptcha ?


Back
Top Bottom