HEX
Server: nginx/1.18.0
System: Linux iZj6c1ieg2jrpk1z5tzi19Z 6.3.9-1.el7.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 21 22:18:40 EDT 2023 x86_64
User: www (1001)
PHP: 8.2.4
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,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,imap_open,apache_setenv
Upload Files
File: /www/wwwroot/www.cytocare.cn/wp-content/plugins/woo-stripe-payment/assets/js/frontend/cc-forms.js
(function($) {
	function minimalist() {
		this.index = 1;
		this.total_steps = $('.wc-stripe-steps').data('steps');
		this.updateSteppers();
		this.updateStyles();
		$(document.body).on('click', '.wc-stripe-back', this.prev.bind(this))
			.on('click', '.wc-stripe-next', this.next.bind(this))
			.on('updated_checkout', this.updated_checkout.bind(this));
	}

	minimalist.prototype.next = function(e) {
		e.preventDefault();
		this.index++;
		$('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden');
		$('.wc-stripe-minimalist-form .field-container[data-index="' + (this.index - 1) + '"]').addClass('field-container--hidden');
		this.updateSteppers();
	}

	minimalist.prototype.prev = function(e) {
		e.preventDefault();
		this.index--;
		$('.wc-stripe-minimalist-form .field-container[data-index="' + (this.index + 1) + '"]').addClass('field-container--hidden');
		$('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden');
		this.updateSteppers();
	}

	minimalist.prototype.updateText = function() {
		var text = $('.wc-stripe-step').data('text');
		$('.wc-stripe-step').text(text.replace('%s', this.index));
	}

	minimalist.prototype.updateSteppers = function() {
		if (this.index == 1) {
			$('.wc-stripe-back').hide();
		} else if (this.index == this.total_steps) {
			$('.wc-stripe-next').hide();
		} else {
			$('.wc-stripe-next').show();
			$('.wc-stripe-back').show();
		}
		this.updateText();
	}

	minimalist.prototype.updated_checkout = function() {
		$('.wc-stripe-minimalist-form .field-container[data-index="' + this.index + '"]').removeClass('field-container--hidden');
		this.updateSteppers();
		this.updateStyles();
	}

	minimalist.prototype.updateStyles = function() {
		if (wc_stripe.credit_card) {
			var width = $('ul.payment_methods').outerWidth();
			if ($('ul.payment_methods').outerWidth() < 400) {
				var options = {
					style: {
						base: {
							fontSize: '18px'
						}
					}
				};
				wc_stripe.credit_card.cardNumber.update(options);
				wc_stripe.credit_card.cardExpiry.update(options);
				wc_stripe.credit_card.cardCvc.update(options);
				$('ul.payment_methods').addClass('wc-stripe-sm');
			}
		}
	}

	new minimalist();
}(jQuery))