| Server IP : 194.30.32.123 / Your IP : 216.73.216.89 Web Server : Apache System : Linux 4f6650a08421 5.10.0-44-amd64 #1 SMP Debian 5.10.257-1 (2026-05-27) x86_64 User : ftpbegirale ( 1001) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,curl_multi_exec,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /expert/htwebs/www.begirale.com/public/wp-content/plugins/ninja-forms/assets/js/min/ |
Upload File : |
// TODO: Fix error collecting.
//window.onerror = function(message, url, lineNumber) {
// var data;
//
// data = {
// 'action': 'nf_log_js_error',
// 'security': nfFrontEnd.ajaxNonce,
// 'message': message,
// 'url': url,
// 'lineNumber': lineNumber
// };
//
// jQuery.ajax({
// url: nfFrontEnd.adminAjax,
// type: 'POST',
// data: data,
// cache: false,
// success: function( data, textStatus, jqXHR ) {
// try {
//
// } catch( e ) {
// console.log( e );
// console.log( 'Parse Error' );
// console.log( e );
// }
//
// },
// error: function( jqXHR, textStatus, errorThrown ) {
// // Handle errors here
// console.log('ERRORS: ' + errorThrown);
// console.log( jqXHR );
//
// try {
//
// } catch( e ) {
// console.log( 'Parse Error' );
// }
// }
// });
// return false;
//};
var nfRadio = Backbone.Radio;
nfRadio.channel( 'form' ).on( 'render:view', function() {
jQuery( '.g-recaptcha' ).each( function() {
var callback = jQuery( this ).data( 'callback' );
var fieldID = jQuery( this ).data( 'fieldid' );
if ( typeof window[ callback ] !== 'function' ){
window[ callback ] = function( response ) {
nfRadio.channel( 'recaptcha' ).request( 'update:response', response, fieldID );
};
}
} );
} );
var nfRecaptcha = Marionette.Object.extend( {
initialize: function() {
/*
* If we've already rendered our form view, render our recaptcha fields.
*/
if ( 0 != jQuery( '.g-recaptcha' ).length ) {
this.renderCaptcha();
}
/*
* We haven't rendered our form view, so hook into the view render radio message, and then render.
*/
this.listenTo( nfRadio.channel( 'form' ), 'render:view', this.renderCaptcha );
this.listenTo( nfRadio.channel( 'captcha' ), 'reset', this.renderCaptcha );
},
renderCaptcha: function() {
jQuery( '.g-recaptcha' ).each( function() {
var opts = {
fieldid: jQuery( this ).data( 'fieldid' ),
size: jQuery( this ).data( 'size' ),
theme: jQuery( this ).data( 'theme' ),
sitekey: jQuery( this ).data( 'sitekey' ),
callback: jQuery( this ).data( 'callback' )
};
var grecaptchaID = grecaptcha.render( jQuery( this )[0], opts );
if ( opts.size === 'invisible' ) {
try {
grecaptcha.execute( grecaptchaID );
} catch( e ){
console.log( 'Notice: Error trying to execute grecaptcha.' );
}
}
} );
}
} );
var nfRenderRecaptcha = function() {
new nfRecaptcha();
}