|
@@ -32,11 +32,13 @@ class Captcha extends Text
|
|
|
public function render()
|
|
public function render()
|
|
|
{
|
|
{
|
|
|
$this->script = <<<JS
|
|
$this->script = <<<JS
|
|
|
-$('#{$this->column}-captcha').click(function () {
|
|
|
|
|
- $(this).attr('src', $(this).attr('src')+'?'+Math.random());
|
|
|
|
|
|
|
+$('.field-refresh-captcha').off('click').click(function () {
|
|
|
|
|
+ $(this).attr('src', $(this).attr('data-url')+'?'+Math.random());
|
|
|
});
|
|
});
|
|
|
JS;
|
|
JS;
|
|
|
|
|
|
|
|
|
|
+ $this->addVariables(['captchaSrc' => captcha_src()]);
|
|
|
|
|
+
|
|
|
return parent::render();
|
|
return parent::render();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|