[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.145.59.167: ~ $
window.onload = function() {
	var createHiddenField = function( name, value ) {
		var input = document.createElement( 'input' );
		input.type = 'hidden';
		input.name = name;
		input.value = value;
		return input;
	};
	var removeChildren = function( element ) {
		while ( element.firstChild ) {
			element.removeChild( element.firstChild );
		}
	};

	var showExtraPriceTypeFields = function( priceType ) {
		document.getElementById( 'ld_cw_paynow_div' ).style.display = 'none';
		document.getElementById( 'ld_cw_subscribe_div' ).style.display = 'none';

		if ( priceType === 'paynow' ) {
			document.getElementById( 'ld_cw_paynow_div' ).style.display = 'block';
		} else if ( priceType === 'subscribe' ) {
			document.getElementById( 'ld_cw_subscribe_div' ).style.display = 'block';
		}
	};
	var coursePriceSelected = document.querySelector( 'input[name="ld_cw_course_price_type"]:checked' );
	if ( coursePriceSelected ) {
		showExtraPriceTypeFields( coursePriceSelected.value );
	}

	// show extra fields when the user selects a course price type
	var coursePriceTypeRadios = document.getElementsByName( 'ld_cw_course_price_type' );
	if ( coursePriceTypeRadios.length > 0 ) {
		for ( var i = 0; i < coursePriceTypeRadios.length; i++ ) {
			coursePriceTypeRadios[i].addEventListener( 'change', function( event ) {
				showExtraPriceTypeFields( event.target.value );
			} );
		}
	}

	// show services branding when the user fills down the URL field
	var showButtonBranding = function( url ) {
		var buttonLabel = ldCourseWizard.buttons.default.label;
		var buttonImageSrc,
			buttonImageAlt,
			buttonImageClass = null;
		var button = document.getElementById( 'ld_cw_load_data_button' );
		removeChildren( button );

		if ( url.includes( 'youtube.com' ) ) {
			buttonLabel = ldCourseWizard.buttons.youtube.label;
			buttonImageSrc = ldCourseWizard.buttons.youtube.img_src;
			buttonImageAlt = ldCourseWizard.buttons.youtube.img_alt;
			buttonImageClass = ldCourseWizard.buttons.youtube.img_class;
		} else if ( url.includes( 'vimeo.com' ) ) {
			buttonLabel = ldCourseWizard.buttons.vimeo.label;
			buttonImageSrc = ldCourseWizard.buttons.vimeo.img_src;
			buttonImageAlt = ldCourseWizard.buttons.vimeo.img_alt;
			buttonImageClass = ldCourseWizard.buttons.vimeo.img_class;
		} else if ( url.includes( 'wistia.com' ) ) {
			buttonLabel = ldCourseWizard.buttons.wistia.label;
			buttonImageSrc = ldCourseWizard.buttons.wistia.img_src;
			buttonImageAlt = ldCourseWizard.buttons.wistia.img_alt;
			buttonImageClass = ldCourseWizard.buttons.wistia.img_class;
		}

		// add the image if it exists
		if ( buttonImageSrc ) {
			var img = document.createElement( 'img' );
			img.src = buttonImageSrc;
			img.alt = buttonImageAlt;
			img.className = buttonImageClass;
			button.appendChild( img );
		}
		// add the button label
		var label = document.createElement( 'span' );
		label.textContent = buttonLabel;
		button.appendChild( label );
	};
	var playlistUrl = document.getElementById( 'ld_cw_playlist_url' );
	if ( playlistUrl ) {
		playlistUrl.addEventListener( 'keyup',
			function( event ) {
				showButtonBranding( event.target.value );
			}
		);
		playlistUrl.addEventListener( 'change',
			function( event ) {
				showButtonBranding( event.target.value );
			}
		);
		showButtonBranding( playlistUrl.value );
	}

	// billing cycle control
	var billingCycle = document.getElementById( 'ld_cw_course_price_billing_interval' );
	var billingCycleNumber = document.getElementById( 'ld_cw_course_price_billing_number' );
	var maxValue = 0;
	if ( billingCycle && billingCycleNumber ) {
		billingCycle.addEventListener( 'change', function( event ) {
			switch ( event.target.value ) {
				case 'D':
					maxValue = ldCourseWizard.valid_recurring_paypal_day_max;
					break;

				case 'W':
					maxValue = ldCourseWizard.valid_recurring_paypal_week_max;
					break;

				case 'M':
					maxValue = ldCourseWizard.valid_recurring_paypal_month_max;
					break;

				case 'Y':
					maxValue = ldCourseWizard.valid_recurring_paypal_year_max;
					break;

				default:
					maxValue = 0;
					break;
			}
			if ( billingCycleNumber.value > maxValue ) {
				billingCycleNumber.value = maxValue;
			}
			billingCycleNumber.setAttribute( 'max', maxValue );
		} );
	}

	// add event listener for the submit button
	var createCourseButton = document.getElementById( 'ld_cw_create_course_btn' );
	if ( createCourseButton ) {
		createCourseButton.addEventListener( 'click', function() {
			var form = document.getElementById( 'ld_cw_create_course_form' );
			var courseType = document.querySelector( 'input[name="ld_cw_course_price_type"]:checked' ).value;
			if ( form ) {
				form.appendChild(
					createHiddenField( 'course_price_type'
						, courseType )
				);
				form.appendChild(
					createHiddenField( 'course_disable_lesson_progression'
						, document.querySelector( 'input[name="ld_cw_course_progression"]:checked' ).value )
				);

				if ( courseType === 'paynow' ) {
					form.appendChild(
						createHiddenField( 'course_price'
							, document.getElementById( 'ld_cw_course_price_type_paynow_price' ).value )
					);
				} else if ( courseType === 'subscribe' ) {
					form.appendChild(
						createHiddenField( 'course_price'
							, document.getElementById( 'ld_cw_course_price_type_subscribe_price' ).value )
					);
					form.appendChild(
						createHiddenField( 'course_price_billing_number'
							, document.getElementById( 'ld_cw_course_price_billing_number' ).value )
					);
					form.appendChild(
						createHiddenField( 'course_price_billing_interval'
							, document.getElementById( 'ld_cw_course_price_billing_interval' ).value )
					);
				}
				form.submit();
			}
		} );
	}
};

Filemanager

Name Type Size Permission Actions
builder Folder 0755
setup-wizard Folder 0755
design-wizard.js File 16.24 KB 0644
design-wizard.min.js File 16.12 KB 0644
help.js File 3.54 KB 0644
help.min.js File 3.43 KB 0644
jquery.dropdown.js File 5.19 KB 0644
jquery.dropdown.min.js File 2.76 KB 0644
learndash-admin-binary-selector.js File 28.02 KB 0644
learndash-admin-binary-selector.min.js File 14.19 KB 0644
learndash-admin-menu.js File 1.02 KB 0644
learndash-admin-menu.min.js File 652 B 0644
learndash-admin-overview-page.js File 8.03 KB 0644
learndash-admin-overview-page.min.js File 5.3 KB 0644
learndash-admin-pointers.js File 3.09 KB 0644
learndash-admin-pointers.min.js File 983 B 0644
learndash-admin-settings-bulk-edit.js File 719 B 0644
learndash-admin-settings-bulk-edit.min.js File 409 B 0644
learndash-admin-settings-data-reports.js File 2.75 KB 0644
learndash-admin-settings-data-reports.min.js File 1.56 KB 0644
learndash-admin-settings-data-upgrades.js File 7.59 KB 0644
learndash-admin-settings-data-upgrades.min.js File 4.28 KB 0644
learndash-admin-settings-page-translations.js File 864 B 0644
learndash-admin-settings-page-translations.min.js File 610 B 0644
learndash-admin-settings-page.js File 67.94 KB 0644
learndash-admin-settings-page.min.js File 35.47 KB 0644
learndash-admin-shortcodes-tinymce.js File 650 B 0644
learndash-admin-shortcodes-tinymce.min.js File 405 B 0644
learndash-admin-shortcodes.js File 7.91 KB 0644
learndash-admin-shortcodes.min.js File 4.36 KB 0644
learndash-builder.js File 53.82 KB 0644
learndash-builder.min.js File 28 KB 0644
learndash-course-wizard.js File 5.57 KB 0644
learndash-course-wizard.min.js File 3.14 KB 0644
learndash-password-strength-meter.js File 5.33 KB 0644
learndash-password-strength-meter.min.js File 3.04 KB 0644
learndash-payments.js File 1.04 KB 0644
learndash-payments.min.js File 706 B 0644
learndash_video_script.js File 53.41 KB 0644
learndash_video_script.min.js File 28.91 KB 0644
setup.js File 2.69 KB 0644
setup.min.js File 2.61 KB 0644
sfwd-admin-groups.js File 1.47 KB 0644
sfwd-admin-groups.min.js File 1014 B 0644
sfwd-admin-user-profile.js File 1.87 KB 0644
sfwd-admin-user-profile.min.js File 1.14 KB 0644
sfwd_module.js File 77.44 KB 0644
sfwd_module.min.js File 42.73 KB 0644