Commit 4ed1bedd32c867f0c893357dc9c1aea763c42849

Authored by Evandro Junior
1 parent 6ce449ba

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 438 <div class="oauth-providers">
439 439 <input id="user_oauth_providers" name="oauth_providers" type="hidden">
440 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 442 </div>
449 443 <div class="actions col-sm-12">
450 444 <div class="row">
... ... @@ -550,6 +544,8 @@
550 544 loadRequireJS();
551 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 549 </body>
554 550  
555 551 </html>
... ...
js/main.js
... ... @@ -38,7 +38,6 @@ define([&#39;jquery&#39;, &#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;, &#39;piwik&#39;], fun
38 38 var cat_seguranca_publica = 182;
39 39 var cat_educacao = 181;
40 40 var cat_reducao_da_pobreza = 183;
41   -
42 41 window.recaptchaSiteKey = '6LcLPAcTAAAAAKsd0bxY_TArhD_A7OL19SRCW7_i'
43 42 }else{
44 43 var host = 'http://noosfero.com:3001';
... ... @@ -1152,6 +1151,7 @@ define([&#39;jquery&#39;, &#39;handlebars&#39;, &#39;fastclick&#39;, &#39;handlebars_helpers&#39;, &#39;piwik&#39;], fun
1152 1151 loginForm.find('.message').hide();
1153 1152 signupForm.find('#g-recaptcha').empty();
1154 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 1155 e.preventDefault();
1156 1156 })
1157 1157  
... ...