CCrmViewHelper::RenderInstantEditorField

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. RenderInstantEditorField
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::RenderInstantEditorField
static function RenderInstantEditorField($arParams)
{
	$fieldID = isset($arParams['FIELD_ID']) ? $arParams['FIELD_ID'] : '';
	$type = isset($arParams['TYPE']) ? $arParams['TYPE'] : '';

	if($type === 'TEXT')
	{
		$value = isset($arParams['VALUE']) ? $arParams['VALUE'] : '';
		$suffixHtml = isset($arParams['SUFFIX_HTML']) ? $arParams['SUFFIX_HTML'] : '';
		if($suffixHtml === '')
		{
			$suffix = isset($arParams['SUFFIX']) ? $arParams['SUFFIX'] : '';
			if($suffix !== '')
			{
				$suffixHtml = htmlspecialcharsbx($suffix);
			}
		}
		$inputWidth = isset($arParams['INPUT_WIDTH']) ? intval($arParams['INPUT_WIDTH']) : 0;

		echo '',
		'', htmlspecialcharsbx($value), '';

		echo '',
		'';

		if($suffixHtml !== '')
		{
			echo '', $suffixHtml, '';
		}

		echo '';
	}
	elseif($type === 'LHE')
	{
		$editorID = isset($arParams['EDITOR_ID']) ? $arParams['EDITOR_ID'] : '';
		if($editorID ==='')
		{
			$editorID = uniqid('LHE_');
		}

		$editorJsName = isset($arParams['EDITOR_JS_NAME']) ? $arParams['EDITOR_JS_NAME'] : '';
		if($editorJsName ==='')
		{
			$editorJsName = $editorID;
		}


		$value = isset($arParams['VALUE']) ? $arParams['VALUE'] : '';

		/*if($value === '
') { $value = ''; }*/ echo ''; echo $value; echo ''; echo '
'; echo ''; echo ''; $wrapperID = isset($arParams['WRAPPER_ID']) ? $arParams['WRAPPER_ID'] : ''; if($wrapperID ==='') { $wrapperID = $editorID.'_WRAPPER'; } $toolbarConfig = is_array($arParams['TOOLBAR_CONFIG']) ? $arParams['TOOLBAR_CONFIG'] : ''; if ($toolbarConfig === '') { $toolbarConfig = array( 'Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent' ); } echo ''; echo ''; } }

Добавить комментарий