From 2c14337428ee4d79a6e01a432c246f0b589e42df Mon Sep 17 00:00:00 2001 From: David Date: Tue, 7 Apr 2015 21:06:23 +0200 Subject: Fix TReCaptcha::regenerateToken via Forum see http://www.pradosoft.com/forum/index.php?topic=17436.msg65686 --- framework/Web/UI/WebControls/TReCaptcha.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/WebControls/TReCaptcha.php b/framework/Web/UI/WebControls/TReCaptcha.php index a5a360c3..429f194f 100644 --- a/framework/Web/UI/WebControls/TReCaptcha.php +++ b/framework/Web/UI/WebControls/TReCaptcha.php @@ -217,12 +217,7 @@ class TReCaptcha extends TWebControl implements IValidatable // if we're in a callback, then schedule re-rendering of the control // if not, don't do anything, because a new challenge will be rendered anyway if ($this->Page->IsCallback) - $this->Page->ClientScript->registerEndScript($this->getClientID().'::refresh', implode(' ', array( - // work-around for "ReCaptchaState is undefined" bug - // (if there's no previous instance yet, regenerating the token is not needed anyway) - 'if (typeof ReCaptchaState != "undefined") '. - ' Recaptcha.reload();', - ))); + $this->Page->CallbackClient->jQuery($this->getClientID().' #recaptcha_reload','click'); } public function renderContents($writer) -- cgit v1.2.3