for ($i = 0; $i < $countLang; $i++) { $arRegion = CSaleLocation::GetRegionLangByID($arLoc['REGION_ID'], $arSysLangs[$i]); /* $arResult['FIELDS']['tab_params'][] = array( 'id' => 'R_LANG_'.$arSysLangs[$i], 'value' => '<b>['.$arSysLangs[$i].'] '.$arSysLangNames[$i].'</b>', 'colspan' => true, 'type' => 'label' ); */ $arResult['FIELDS']['tab_params'][] = array('id' => 'REGION_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arRegion["NAME"]), 'required' => true, 'type' => 'text'); $arResult['FIELDS']['tab_params'][] = array('id' => 'REGION_SHORT_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arRegion["SHORT_NAME"]), 'type' => 'text'); } /* CITY SECTION */ $arResult['FIELDS']['tab_params'][] = array('id' => 'loc_city', 'name' => GetMessage('CRM_LOC_SECTION_CITY'), 'type' => 'section'); $arCity = CSaleLocation::GetCityByID($arLoc['CITY_ID']); $arResult['FIELDS']['tab_params'][] = array('id' => 'WITHOUT_CITY', 'name' => GetMessage('CRM_LOC_FIELD_WITHOUT_CITY'), 'value' => intval($locID) > 0 && !is_null($arLoc['CITY_ID']) && $arCity ? 'N' : 'Y', 'type' => 'checkbox'); $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME', 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_NAME_ORIG']), 'required' => true, 'type' => 'text'); $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME', 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arLoc['CITY_SHORT_NAME']), 'type' => 'text'); for ($i = 0; $i < $countLang; $i++) { $arCity = CSaleLocation::GetCityLangByID($arLoc['CITY_ID'], $arSysLangs[$i]); /* $arResult['FIELDS']['tab_params'][] = array( 'id' => 'CI_LANG_'.$arSysLangs[$i], 'value' => '<b>['.$arSysLangs[$i].'] '.$arSysLangNames[$i].'</b>', 'colspan' => true, 'type' => 'label' ); */ $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_NAME'), 'value' => htmlspecialcharsEx($arCity["NAME"]), 'required' => true, 'type' => 'text'); $arResult['FIELDS']['tab_params'][] = array('id' => 'CITY_SHORT_NAME_' . $arSysLangs[$i], 'name' => GetMessage('CRM_LOC_FIELD_SHORT_NAME'), 'value' => htmlspecialcharsEx($arCity["SHORT_NAME"]), 'type' => 'text');
</tr> <?php } ?> <script language="JavaScript"> SetContact(); ResetRegion(); </script> <tr class="heading"> <td colspan="2"><?php echo GetMessage("SALE_CITY"); ?> </td> </tr> <?php if ($arCity = CSaleLocation::GetCityByID($str_CITY_ID)) { $str_CITY_NAME = htmlspecialcharsEx($arCity["NAME"]); $str_CITY_SHORT_NAME = htmlspecialcharsEx($arCity["SHORT_NAME"]); $str_WITHOUT_CITY = "N"; } else { if ($ID > 0) { $str_WITHOUT_CITY = "Y"; } else { $str_WITHOUT_CITY = "N"; } } if ($bInitVars) { $str_CITY_NAME = htmlspecialcharsEx($CITY_NAME); $str_CITY_SHORT_NAME = htmlspecialcharsEx($CITY_SHORT_NAME); $str_WITHOUT_CITY = $WITHOUT_CITY == "Y" ? "Y" : "N"; }