ajax.js: do not send request if captcha does not have a response

This commit is contained in:
Zankaria 2025-02-08 18:47:07 +01:00
parent ae6b9edf45
commit 222c4c4d27

View file

@ -19,6 +19,12 @@ $(window).ready(function() {
// Enable submit button if disabled (cache problem)
$('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) {
$form.submit(function() {
if (do_not_ajax)