From dec7af6e2341443157ced27216aaff4d07299d90 Mon Sep 17 00:00:00 2001 From: Nicholas Chau Date: Mon, 11 Jul 2022 16:51:40 -0700 Subject: [PATCH] captcha reset on failure --- src/RegistrationController.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/RegistrationController.js b/src/RegistrationController.js index 79ab46b346..15c67de1ca 100644 --- a/src/RegistrationController.js +++ b/src/RegistrationController.js @@ -191,13 +191,15 @@ function ( //console.log('vn'); self.registerUser(postData); } else { - alert('Something went wrong with reCAPTCHA. Please try again or refresh the page and try again.'); + //alert('Something went wrong with reCAPTCHA. Please try again or refresh the page and try again.'); //console.log(response.data); + grecaptcha.reset(); } }) .catch((error) => { - alert('Something went wrong with reCAPTCHA. Please refresh the page and try again.'); - console.error(error); + alert('Could not verify reCAPTCHA. Please try again.'); + grecaptcha.reset(); + //console.error(error); }); } }, function (errors) {