Commit c880c608 authored by Yerzhan Hn's avatar Yerzhan Hn Committed by GitHub

Fix problem on multi recaptcha

parent 821b8ca1
......@@ -41,26 +41,33 @@ class NoCaptcha
{
$this->secret = $secret;
$this->sitekey = $sitekey;
$this->http = new Client([ 'timeout' => 2.0 ]);
$this->http = new Client([ 'timeout' => 30 ]);
}
/**
* Render HTML captcha.
*
* @param array $attributes
* @param string $lang
* @param boolean $callback
*
* @return string
*/
public function display($attributes = [], $lang = null, $callback = false, $onLoadClass = 'onloadCallBack')
public function display($attributes = [])
{
$attributes['data-sitekey'] = $this->sitekey;
return '<div class="g-recaptcha"'.$this->buildAttributes($attributes).'></div>';
}
$html = '<script src="'.$this->getJsLink($lang, $callback, $onLoadClass).'" async defer></script>'."\n";
$html .= '<div class="g-recaptcha"'.$this->buildAttributes($attributes).'></div>';
return $html;
/**
* Render js source
*
* @param null $lang
* @param bool $callback
* @param string $onLoadClass
* @return string
*/
public function renderJs($lang = null, $callback = false, $onLoadClass = 'onloadCallBack')
{
return '<script src="'.$this->getJsLink($lang, $callback, $onLoadClass).'" async defer></script>'."\n";
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment