ajax.js: fix previous commit

This commit is contained in:
Zankaria 2025-02-08 18:52:20 +01:00
parent 222c4c4d27
commit d48ba6113a

View file

@ -19,16 +19,17 @@ $(window).ready(function() {
// Enable submit button if disabled (cache problem) // Enable submit button if disabled (cache problem)
$('input[type="submit"]').removeAttr('disabled'); $('input[type="submit"]').removeAttr('disabled');
// In the captcha is present, halt if it does not have a response..
if (captcha_renderer && postCaptchaId && !captcha_renderer.hasResponse(postCaptchaId)) {
captcha_renderer.execute(postCaptchaId);
return false;
}
var setup_form = function($form) { var setup_form = function($form) {
$form.submit(function() { $form.submit(function() {
if (do_not_ajax) if (do_not_ajax)
return true; return true;
// In the captcha is present, halt if it does not have a response..
if (captcha_renderer && postCaptchaId && !captcha_renderer.hasResponse(postCaptchaId)) {
captcha_renderer.execute(postCaptchaId);
return false;
}
var form = this; var form = this;
var submit_txt = $(this).find('input[type="submit"]').val(); var submit_txt = $(this).find('input[type="submit"]').val();
if (window.FormData === undefined) if (window.FormData === undefined)