From 54af319a53ee917a54e7d798256c3a98737c40c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20M=C3=BCller?= <p.mueller@pcsg.de> Date: Mon, 7 Mar 2022 15:38:59 +0100 Subject: [PATCH] fix: prevent double submit of contact form quiqqer/captcha#11 --- bin/Controls/SimpleContact.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/Controls/SimpleContact.js b/bin/Controls/SimpleContact.js index da2a6f5..01c01e0 100644 --- a/bin/Controls/SimpleContact.js +++ b/bin/Controls/SimpleContact.js @@ -56,7 +56,9 @@ define('package/quiqqer/bricks/bin/Controls/SimpleContact', [ var Button = this.Form.getElement('.quiqqer-simple-contact-button'); if (Button) { - Button.addEvent('click', function () { + Button.addEvent('click', function (event) { + event.stop(); + if (self.$captchaRequired && !self.$captchaResponse) { QUI.getMessageHandler(function (MH) { MH.options.displayTimeMessages = 2000; -- GitLab