PluginProbe
Contact Forms by Cimatti / 2.1.2
Contact Forms by Cimatti v2.1.2
2.3.6 2.3.5 2.3.0 2.2.32 2.2.4 2.2.0 2.1.2 2.1.1 trunk 1.0 1.1 1.2 1.2.1 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 All 62 releases
contact-forms / assets / js / frontend / recaptcha2.js

recaptcha2.js in Contact Forms by Cimatti 2.1.2, at assets/js/frontend/recaptcha2.js

28 lines 929 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 var accuaform_recaptcha2_ajax_loaded = true;
2 var accuaform_recaptcha2_initialized = false;
3 var accuaform_recaptcha2_delayed = [];
4 var accuaform_recaptcha2_loaded = {};
5
6 function accua_forms_show_recaptcha2(id, opts) {
7 if (accuaform_recaptcha2_initialized) {
8 var grid = grecaptcha.render(id, opts);
9 accuaform_recaptcha2_loaded[id] = grid;
10 } else {
11 accuaform_recaptcha2_delayed.push({id: id, opts: opts});
12 }
13 }
14
15 function accua_forms_reload_recaptcha2(id) {
16 if ((typeof accuaform_recaptcha2_loaded[id]) != 'undefined') {
17 grecaptcha.reset(accuaform_recaptcha2_loaded[id]);
18 }
19 }
20
21 function accua_forms_onload_recaptcha2(){
22 accuaform_recaptcha2_initialized = true;
23 for (var i=0; i<accuaform_recaptcha2_delayed.length; i++){
24 accua_forms_show_recaptcha2(accuaform_recaptcha2_delayed[i]['id'], accuaform_recaptcha2_delayed[i]['opts']);
25 }
26 accuaform_recaptcha2_delayed = [];
27 }
28