Skip to content

Commit

Permalink
Use jQuery for create captcha into plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Mar 14, 2014
1 parent 70a7b73 commit a51fef3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/captcha/recaptcha/recaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function onInit($id)
$document = JFactory::getDocument();
$app = JFactory::getApplication();

JHtml::_('jquery.framework');

$lang = $this->_getLanguage();
$pubkey = $this->params->get('public_key', '');
$theme = $this->params->get('theme', 'clean');
Expand All @@ -62,7 +64,7 @@ public function onInit($id)
}

JHtml::_('script', $server . '/js/recaptcha_ajax.js');
$document->addScriptDeclaration('window.addEvent(\'domready\', function()
$document->addScriptDeclaration('jQuery( document ).ready(function()
{
Recaptcha.create("' . $pubkey . '", "dynamic_recaptcha_1", {theme: "' . $theme . '",' . $lang . 'tabindex: 0});});'
);
Expand Down

0 comments on commit a51fef3

Please sign in to comment.