From 1a7a550a12f1236f98bc1678bf261b80eec4f36b Mon Sep 17 00:00:00 2001 From: Evandro Junior Date: Fri, 26 Jun 2015 11:54:53 -0300 Subject: [PATCH] captcha matching theme --- js/main.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/js/main.js b/js/main.js index 05aa4e8..2b7f54c 100644 --- a/js/main.js +++ b/js/main.js @@ -1143,15 +1143,14 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun $(document).on('click', '.new-user', function(e) { var loginForm = $(this).parents('#login-form'); var signupForm = loginForm.siblings('#signup-form'); - + console.log("novo usuário"); loginForm.hide(); signupForm.show(); signupForm.find(".password").show(); signupForm.find(".password-confirmation").show(); loginForm.find('.message').hide(); signupForm.find('#g-recaptcha').empty(); - //grecaptcha.render(signupForm.find('#g-recaptcha')[0], {'sitekey' : window.recaptchaSiteKey }); - Recaptcha.create(window.recaptchaSiteKey, "g-recaptcha", { theme: "red", callback: Recaptcha.focus_response_field } ); + Recaptcha.create(window.recaptchaSiteKey, signupForm.find('#g-recaptcha')[0], { lang : 'pt', theme: "clean", callback: Recaptcha.focus_response_field } ); e.preventDefault(); }) @@ -1159,8 +1158,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun var signupForm = $(this).parents('#signup-form'); signupForm.hide(); signupForm.siblings('#login-form').show(); - //Reset captcha here - //grecaptcha.reset(); e.preventDefault(); }); @@ -1215,8 +1212,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun // $loginPanel.hide(); // } }); - //Reset captcha here - //grecaptcha.reset(); e.preventDefault(); }); -- libgit2 0.21.2