summaryrefslogtreecommitdiff
path: root/framework/Web/UI/WebControls/TReCaptcha.php
diff options
context:
space:
mode:
authorDavid <ottodavid@gmx.net>2015-04-07 21:06:23 +0200
committerDavid <ottodavid@gmx.net>2015-04-07 21:06:55 +0200
commit2c14337428ee4d79a6e01a432c246f0b589e42df (patch)
treeca97add7e4fef5d3d3071a2214ffe755576631c4 /framework/Web/UI/WebControls/TReCaptcha.php
parent16475815a81ec42364c729b634188f2363ca13ee (diff)
Fix TReCaptcha::regenerateToken
via Forum see http://www.pradosoft.com/forum/index.php?topic=17436.msg65686
Diffstat (limited to 'framework/Web/UI/WebControls/TReCaptcha.php')
-rw-r--r--framework/Web/UI/WebControls/TReCaptcha.php7
1 files changed, 1 insertions, 6 deletions
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)