Commit 1a7a550a12f1236f98bc1678bf261b80eec4f36b
1 parent
e1345a91
Exists in
master
and in
5 other branches
captcha matching theme
Showing
1 changed file
with
2 additions
and
7 deletions
Show diff stats
js/main.js
| @@ -1143,15 +1143,14 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | @@ -1143,15 +1143,14 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | ||
| 1143 | $(document).on('click', '.new-user', function(e) { | 1143 | $(document).on('click', '.new-user', function(e) { |
| 1144 | var loginForm = $(this).parents('#login-form'); | 1144 | var loginForm = $(this).parents('#login-form'); |
| 1145 | var signupForm = loginForm.siblings('#signup-form'); | 1145 | var signupForm = loginForm.siblings('#signup-form'); |
| 1146 | - | 1146 | + console.log("novo usuário"); |
| 1147 | loginForm.hide(); | 1147 | loginForm.hide(); |
| 1148 | signupForm.show(); | 1148 | signupForm.show(); |
| 1149 | signupForm.find(".password").show(); | 1149 | signupForm.find(".password").show(); |
| 1150 | signupForm.find(".password-confirmation").show(); | 1150 | signupForm.find(".password-confirmation").show(); |
| 1151 | loginForm.find('.message').hide(); | 1151 | loginForm.find('.message').hide(); |
| 1152 | signupForm.find('#g-recaptcha').empty(); | 1152 | signupForm.find('#g-recaptcha').empty(); |
| 1153 | - //grecaptcha.render(signupForm.find('#g-recaptcha')[0], {'sitekey' : window.recaptchaSiteKey }); | ||
| 1154 | - Recaptcha.create(window.recaptchaSiteKey, "g-recaptcha", { theme: "red", callback: Recaptcha.focus_response_field } ); | 1153 | + Recaptcha.create(window.recaptchaSiteKey, signupForm.find('#g-recaptcha')[0], { lang : 'pt', theme: "clean", callback: Recaptcha.focus_response_field } ); |
| 1155 | e.preventDefault(); | 1154 | e.preventDefault(); |
| 1156 | }) | 1155 | }) |
| 1157 | 1156 | ||
| @@ -1159,8 +1158,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | @@ -1159,8 +1158,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | ||
| 1159 | var signupForm = $(this).parents('#signup-form'); | 1158 | var signupForm = $(this).parents('#signup-form'); |
| 1160 | signupForm.hide(); | 1159 | signupForm.hide(); |
| 1161 | signupForm.siblings('#login-form').show(); | 1160 | signupForm.siblings('#login-form').show(); |
| 1162 | - //Reset captcha here | ||
| 1163 | - //grecaptcha.reset(); | ||
| 1164 | e.preventDefault(); | 1161 | e.preventDefault(); |
| 1165 | }); | 1162 | }); |
| 1166 | 1163 | ||
| @@ -1215,8 +1212,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | @@ -1215,8 +1212,6 @@ define(['jquery', 'handlebars', 'fastclick', 'handlebars_helpers', 'piwik'], fun | ||
| 1215 | // $loginPanel.hide(); | 1212 | // $loginPanel.hide(); |
| 1216 | // } | 1213 | // } |
| 1217 | }); | 1214 | }); |
| 1218 | - //Reset captcha here | ||
| 1219 | - //grecaptcha.reset(); | ||
| 1220 | e.preventDefault(); | 1215 | e.preventDefault(); |
| 1221 | }); | 1216 | }); |
| 1222 | 1217 |