Commit 4ed1bedd32c867f0c893357dc9c1aea763c42849
1 parent
6ce449ba
Exists in
master
and in
5 other branches
adds old captcha using ajax
Showing
2 changed files
with
4 additions
and
8 deletions
Show diff stats
index.html
@@ -438,13 +438,7 @@ | @@ -438,13 +438,7 @@ | ||
438 | <div class="oauth-providers"> | 438 | <div class="oauth-providers"> |
439 | <input id="user_oauth_providers" name="oauth_providers" type="hidden"> | 439 | <input id="user_oauth_providers" name="oauth_providers" type="hidden"> |
440 | </div> | 440 | </div> |
441 | - <div class="captcha col-sm-12"> | ||
442 | - <script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=6LdsWAcTAAAAAChTUUD6yu9fCDhdIZzNd7F53zf-" async defer></script> | ||
443 | - <noscript> | ||
444 | - <iframe src="http://www.google.com/recaptcha/api/noscript?k=6LdsWAcTAAAAAChTUUD6yu9fCDhdIZzNd7F53zf-" height="300" width="500" frameborder="0"></iframe><br/> | ||
445 | - <textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea> | ||
446 | - <input type="hidden" name="recaptcha_response_field" value="manual_challenge"/> | ||
447 | - </noscript> | 441 | + <div class="captcha col-sm-12" id="captcha_v1"> |
448 | </div> | 442 | </div> |
449 | <div class="actions col-sm-12"> | 443 | <div class="actions col-sm-12"> |
450 | <div class="row"> | 444 | <div class="row"> |
@@ -550,6 +544,8 @@ | @@ -550,6 +544,8 @@ | ||
550 | loadRequireJS(); | 544 | loadRequireJS(); |
551 | </script> | 545 | </script> |
552 | 546 | ||
547 | + <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js" async defer></script> | ||
548 | + | ||
553 | </body> | 549 | </body> |
554 | 550 | ||
555 | </html> | 551 | </html> |
js/main.js
@@ -38,7 +38,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | @@ -38,7 +38,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | ||
38 | var cat_seguranca_publica = 182; | 38 | var cat_seguranca_publica = 182; |
39 | var cat_educacao = 181; | 39 | var cat_educacao = 181; |
40 | var cat_reducao_da_pobreza = 183; | 40 | var cat_reducao_da_pobreza = 183; |
41 | - | ||
42 | window.recaptchaSiteKey = '6LcLPAcTAAAAAKsd0bxY_TArhD_A7OL19SRCW7_i' | 41 | window.recaptchaSiteKey = '6LcLPAcTAAAAAKsd0bxY_TArhD_A7OL19SRCW7_i' |
43 | }else{ | 42 | }else{ |
44 | var host = 'http://noosfero.com:3001'; | 43 | var host = 'http://noosfero.com:3001'; |
@@ -1152,6 +1151,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | @@ -1152,6 +1151,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | ||
1152 | loginForm.find('.message').hide(); | 1151 | loginForm.find('.message').hide(); |
1153 | signupForm.find('#g-recaptcha').empty(); | 1152 | signupForm.find('#g-recaptcha').empty(); |
1154 | //grecaptcha.render(signupForm.find('#g-recaptcha')[0], {'sitekey' : window.recaptchaSiteKey }); | 1153 | //grecaptcha.render(signupForm.find('#g-recaptcha')[0], {'sitekey' : window.recaptchaSiteKey }); |
1154 | + Recaptcha.create(window.recaptchaSiteKey, "captcha_v1", { theme: "red", callback: Recaptcha.focus_response_field } ); | ||
1155 | e.preventDefault(); | 1155 | e.preventDefault(); |
1156 | }) | 1156 | }) |
1157 | 1157 |