diff --git a/src/Asset/ReCaptcha.php b/src/Asset/ReCaptcha.php
index 5b99559..9ae9c19 100644
--- a/src/Asset/ReCaptcha.php
+++ b/src/Asset/ReCaptcha.php
@@ -35,13 +35,16 @@ class ReCaptcha extends JavaScript
/** @var string */
protected $renderType;
+ /** @var string */
+ protected $theme;
+
/**
* {@inheritdoc}
*/
public function __toString()
{
$onLoad = ($this->getRenderType() == 'invisible') ? '&render=explicit&onload=invisibleRecaptchaOnLoad' : '';
- $theme = sprintf('', 'clean');
+ $theme = sprintf('', $this->getTheme());
$api = sprintf('', $this->getHtmlLang(), $onLoad);
return $theme . $api;
@@ -86,4 +89,23 @@ public function setRenderType($type)
return $this;
}
+
+ /**
+ * @return string
+ */
+ public function getTheme()
+ {
+ return $this->theme;
+ }
+
+ /**
+ * @param string $theme
+ * @return ReCaptcha
+ */
+ public function setTheme($theme)
+ {
+ $this->theme = $theme;
+
+ return $this;
+ }
}
diff --git a/src/BoltForms.php b/src/BoltForms.php
index e17b895..2916dcf 100644
--- a/src/BoltForms.php
+++ b/src/BoltForms.php
@@ -276,6 +276,7 @@ private function queueReCaptcha()
$reCaptcha
->setHtmlLang($this->app['locale'])
->setRenderType($this->config->getReCaptcha()->get('type'))
+ ->setTheme($this->config->getReCaptcha()->get('theme'))
->setLocation(Target::END_OF_BODY)
->setZone(Zone::FRONTEND)
;