-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #63 from cdvv7788/develop
Add support for nocaptcha recaptcha (recaptcha2)
- Loading branch information
Showing
3 changed files
with
66 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script src='https://www.google.com/recaptcha/api.js'></script> | ||
<script type="text/javascript"> | ||
var DjangoRecaptchaOptions = {{options}}; | ||
if (typeof RecaptchaOptions !== 'object') { | ||
RecaptchaOptions = DjangoRecaptchaOptions; | ||
} else { | ||
for (key in DjangoRecaptchaOptions) { | ||
RecaptchaOptions[key] = DjangoRecaptchaOptions[key]; | ||
} | ||
} | ||
</script> | ||
<div class="g-recaptcha" data-sitekey="{{ public_key }}"></div> | ||
<noscript> | ||
<div style="width: 302px; height: 352px;"> | ||
<div style="width: 302px; height: 352px; position: relative;"> | ||
<div style="width: 302px; height: 352px; position: absolute;"> | ||
<iframe src="https://www.google.com/recaptcha/api/fallback?k={{ public_key }}" | ||
frameborder="0" scrolling="no" | ||
style="width: 302px; height:352px; border-style: none;"> | ||
</iframe> | ||
</div> | ||
<div style="width: 250px; height: 80px; position: absolute; border-style: none; | ||
bottom: 21px; left: 25px; margin: 0px; padding: 0px; right: 25px;"> | ||
<textarea id="g-recaptcha-response" name="g-recaptcha-response" | ||
class="recaptcha_challenge_field" | ||
style="width: 250px; height: 80px; border: 1px solid #c1c1c1; | ||
margin: 0px; padding: 0px; resize: none;" value=""> | ||
</textarea> | ||
<input type='hidden' name='recaptcha_response_field' value='manual_challenge' /> | ||
</div> | ||
</div> | ||
</div> | ||
</noscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters