Skip to content

Commit

Permalink
added reCaptcha support see meteor-useraccounts/core#268
Browse files Browse the repository at this point in the history
  • Loading branch information
splendido committed Feb 12, 2015
1 parent 72e097f commit 502e3b8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/at_pwd_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
{{#each fields}}
{{> atInput}}
{{/each}}
{{#if showReCaptcha}}
{{> atReCaptcha}}
{{/if}}
{{#if showForgotPasswordLink}}
{{> atPwdLink}}
{{/if}}
Expand Down
3 changes: 3 additions & 0 deletions lib/at_reCaptcha.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<template name="atReCaptcha">
<div class="g-recaptcha" data-sitekey='{{key}}' data-theme='{{theme}}' data-type='{{data_type}}'></div>
</template>
5 changes: 5 additions & 0 deletions lib/at_reCaptcha.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Simply 'inherites' rendered callback from AccountsTemplates
Template.atReCaptcha.rendered = AccountsTemplates.atReCaptchaRendered;

// Simply 'inherites' helpers from AccountsTemplates
Template.atReCaptcha.helpers(AccountsTemplates.atReCaptchaHelpers);
2 changes: 2 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ Package.on_use(function(api, where) {
"lib/at_pwd_form_btn.js",
"lib/at_pwd_link.html",
"lib/at_pwd_link.js",
"lib/at_reCaptcha.html",
"lib/at_reCaptcha.js",
"lib/at_result.html",
"lib/at_result.js",
"lib/at_sep.html",
Expand Down

0 comments on commit 502e3b8

Please sign in to comment.