• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/mobile_helper.php
  • Класс: \CCrmMobileHelper
  • Вызов: CCrmMobileHelper::PrepareAddressFormFields
static function PrepareAddressFormFields($arFields)
{
	if (!is_array($arFields) || empty($arFields))
		return;

	$addressLabels = Bitrix\Crm\EntityAddress::getLabels();
	$html = "";

	foreach($arFields as $itemKey => $item)
	{
		$itemValue = isset($item['VALUE']) ? $item['VALUE'] : '';
		$itemName = isset($item['NAME']) ? $item['NAME'] : $itemKey;
		$itemLocality = isset($item['LOCALITY']) ? $item['LOCALITY'] : null;

		$html.= '
'; $html.= '
'.$addressLabels[$itemKey].'
'; $html.= (isset($item['IS_MULTILINE']) && $item['IS_MULTILINE']) ? '
' : '
'; if(is_array($itemLocality)) { $searchInputID = "{$arParams['FORM_ID']}_{$itemName}"; $dataInputID = "{$arParams['FORM_ID']}_{$itemLocality['NAME']}"; $html.=' '; } else { if (isset($item['IS_MULTILINE']) && $item['IS_MULTILINE']): $html.=''; else: $html.=''; endif; } $html.= '
'; $html.= '
'; } return $html; }