diff options
Diffstat (limited to 'packages/meteor-useraccounts-core/lib/templates_helpers/at_reCaptcha.js')
-rw-r--r-- | packages/meteor-useraccounts-core/lib/templates_helpers/at_reCaptcha.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/meteor-useraccounts-core/lib/templates_helpers/at_reCaptcha.js b/packages/meteor-useraccounts-core/lib/templates_helpers/at_reCaptcha.js new file mode 100644 index 00000000..ea0c0c69 --- /dev/null +++ b/packages/meteor-useraccounts-core/lib/templates_helpers/at_reCaptcha.js @@ -0,0 +1,19 @@ +AT.prototype.atReCaptchaRendered = function() { + $.getScript('//www.google.com/recaptcha/api.js?hl=' + T9n.getLanguage()); +}; + +AT.prototype.atReCaptchaHelpers = { + key: function() { + if (AccountsTemplates.options.reCaptcha && AccountsTemplates.options.reCaptcha.siteKey) + return AccountsTemplates.options.reCaptcha.siteKey; + return Meteor.settings.public.reCaptcha.siteKey; + }, + + theme: function() { + return AccountsTemplates.options.reCaptcha && AccountsTemplates.options.reCaptcha.theme; + }, + + data_type: function() { + return AccountsTemplates.options.reCaptcha && AccountsTemplates.options.reCaptcha.data_type; + }, +}; |