Commit d1017a301aae25e0a1dedbce544202d0905b3299
1 parent
ef06a6c9
Exists in
master
and in
5 other branches
Set Serpro captcha draft on the front end ONLY
Showing
2 changed files
with
19 additions
and
6 deletions
Show diff stats
index.html
... | ... | @@ -439,7 +439,23 @@ |
439 | 439 | <input id="user_oauth_providers" name="oauth_providers" type="hidden"> |
440 | 440 | </div> |
441 | 441 | <div class="captcha col-sm-12"> |
442 | - <div id="g-recaptcha"></div> | |
442 | + <div id="idAntiRobo"> | |
443 | + <!--<div data-ui-captcha-serpro="css1; input" data-clienteid="41ff278aba054a4cb14ab7a03d2f4c4d"></div>--> | |
444 | + <!--<div data-ui-captcha-serpro="css1; input" data-urlimagem="./captcha/gerarCaptcha.asp" data-urlsom="./captcha/gerarSom.asp"></div>--> | |
445 | + <div style="border: 1px solid black; width: 210px; padding: 4px; float: left;"> | |
446 | + <div style="width: 100%;"> | |
447 | + <div style="float: left;"> | |
448 | + <img id="imgCaptcha" alt="Imagem Captcha" src="http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/captcha/gerarCaptcha.asp"> | |
449 | + </div> | |
450 | + <div style="width: 20px; float: right;"> | |
451 | + <a href="javascript: reloadImagemCaptcha();"><img alt="" src="http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/Images/reload.png"/></a> | |
452 | + <a href="javascript: play_sound('/aplicacoes/atcta/cpf/captcha/captcha/gerarSom.asp')"><img alt="" src="http://www.receita.fazenda.gov.br/aplicacoes/atcta/cpf/Images/som.png" /></a> | |
453 | + </div> | |
454 | + </div> | |
455 | + <label id="labelcaptcha">Digite os caracteres acima:</label> | |
456 | + <input type="text" id="txtTexto_captcha_serpro_gov_br" autocomplete="off" name="txtTexto_captcha_serpro_gov_br" /> | |
457 | + </div> | |
458 | + </div> | |
443 | 459 | </div> |
444 | 460 | <div id="terms-of-use-box" class="col-sm-12"> |
445 | 461 | <div class="checkbox"> |
... | ... | @@ -554,7 +570,7 @@ |
554 | 570 | loadRequireJS(); |
555 | 571 | </script> |
556 | 572 | |
557 | - <script type="text/javascript" src="http://www.google.com/recaptcha/api/js/recaptcha_ajax.js" async defer></script> | |
573 | + <script src="http://captcha2.servicoscorporativos.serpro.gov.br/js/captcha.serpro.gov.br.js"></script> | |
558 | 574 | |
559 | 575 | </body> |
560 | 576 | ... | ... |
js/main.js
... | ... | @@ -1152,8 +1152,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun |
1152 | 1152 | signupForm.find(".password").show(); |
1153 | 1153 | signupForm.find(".password-confirmation").show(); |
1154 | 1154 | loginForm.find('.message').hide(); |
1155 | - signupForm.find('#g-recaptcha').empty(); | |
1156 | - Recaptcha.create(window.recaptchaSiteKey, signupForm.find('#g-recaptcha')[0], { lang : 'pt', theme: "clean", callback: Recaptcha.focus_response_field } ); | |
1157 | 1155 | e.preventDefault(); |
1158 | 1156 | }) |
1159 | 1157 | |
... | ... | @@ -1190,8 +1188,7 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun |
1190 | 1188 | $(document).trigger('login:success', data); |
1191 | 1189 | }).fail(function(data) { |
1192 | 1190 | var msg = ""; |
1193 | - window.signupForm.find('#g-recaptcha').empty(); | |
1194 | - Recaptcha.create(window.recaptchaSiteKey, window.signupForm.find('#g-recaptcha')[0], { lang : 'pt', theme: "clean", callback: Recaptcha.focus_response_field } ); | |
1191 | + //RELOAD CAPTCHA HERE | |
1195 | 1192 | |
1196 | 1193 | try{ |
1197 | 1194 | msg = Main.responseToText(data.responseJSON.message); | ... | ... |