Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Issue invisible (#63)
Browse files Browse the repository at this point in the history
* Add invisible featured
  • Loading branch information
mohsen1369 authored and himiklab committed Feb 27, 2018
1 parent 7f40838 commit 980abb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ReCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class ReCaptcha extends InputWidget

const SIZE_NORMAL = 'normal';
const SIZE_COMPACT = 'compact';
const SIZE_INVISIBLE = 'invisible';

/** @var string Your sitekey. */
public $siteKey;
Expand All @@ -63,7 +64,7 @@ class ReCaptcha extends InputWidget
/** @var string The type of CAPTCHA to serve. [[TYPE_IMAGE]] (default) or [[TYPE_AUDIO]] */
public $type;

/** @var string The size of the widget. [[SIZE_NORMAL]] (default) or [[SIZE_COMPACT]] */
/** @var string The size of the widget. [[SIZE_NORMAL]] (default) or [[SIZE_COMPACT]] or [[SIZE_INVISIBLE]] */
public $size;

/** @var integer The tabindex of the widget */
Expand Down Expand Up @@ -142,6 +143,10 @@ public function run()
},
});
reCaptcha.data("recaptcha-client-id", recaptchaClientId);
if (reCaptcha.data("size") === "invisible") {
grecaptcha.execute(recaptchaClientId);
}
}
});
};
Expand Down

0 comments on commit 980abb9

Please sign in to comment.