protected function connectionFile($fieldId, $key, $value, $type) { if ($type == 'F') { $fieldId = $fieldId . '[' . $key . '][VALUE]'; } $obFile = new CListFile($this->iblockId, $this->lists['ELEMENT_FIELDS']["IBLOCK_SECTION_ID"], $this->lists['ELEMENT_ID'], $fieldId, $value["VALUE"]); $obFile->SetSocnetGroup($this->socnetGroupId); $obFileControl = new CListFileControl($obFile, $fieldId); return $obFileControl->getHTML(array('max_size' => 102400, 'max_width' => 150, 'max_height' => 150, 'url_template' => '', 'a_title' => Loc::getMessage("LISTS_SEAC_ENLARGE"), 'download_text' => Loc::getMessage("LISTS_SEAC_DOWNLOAD"))); }
if ($arField["MULTIPLE"] == "Y") { $html = '<table id="tbl' . $FIELD_ID . '">'; foreach ($arResult["FORM_DATA"][$FIELD_ID] as $key => $value) { $html .= '<tr><td>'; $obFile = new CListFile($arResult["IBLOCK_ID"], $arResult["ELEMENT_FIELDS"]["IBLOCK_SECTION_ID"], $arResult["ELEMENT_ID"], $FIELD_ID, $value["VALUE"]); $obFile->SetSocnetGroup($arParams["SOCNET_GROUP_ID"]); $obFileControl = new CListFileControl($obFile, $FIELD_ID . '[' . $key . '][VALUE]'); $html .= $obFileControl->GetHTML(array('max_size' => 102400, 'max_width' => 150, 'max_height' => 150, 'url_template' => $arParams["~LIST_FILE_URL"], 'a_title' => GetMessage("CT_BLEE_ENLARGE"), 'download_text' => GetMessage("CT_BLEE_DOWNLOAD"))); $html .= '</td></tr>'; } $html .= '</table>'; $html .= '<input type="button" onclick="addNewTableRow(\'tbl' . $FIELD_ID . '\', 1, /' . $FIELD_ID . '\\[(n)([0-9]*)\\]/g, 2)" value="' . GetMessage("CT_BLEE_ADD_BUTTON") . '">'; $arTabElement[] = array("id" => $FIELD_ID, "name" => $arField["~NAME"], "required" => $arField["IS_REQUIRED"] == "Y" ? true : false, "type" => "custom", "value" => $html, "show" => $show); } else { foreach ($arResult["FORM_DATA"][$FIELD_ID] as $key => $value) { $obFile = new CListFile($arResult["IBLOCK_ID"], $arResult["ELEMENT_FIELDS"]["IBLOCK_SECTION_ID"], $arResult["ELEMENT_ID"], $FIELD_ID, $value["VALUE"]); $obFile->SetSocnetGroup($arParams["SOCNET_GROUP_ID"]); $obFileControl = new CListFileControl($obFile, $FIELD_ID . '[' . $key . '][VALUE]'); $html = $obFileControl->GetHTML(array('max_size' => 102400, 'max_width' => 150, 'max_height' => 150, 'url_template' => $arParams["~LIST_FILE_URL"], 'a_title' => GetMessage("CT_BLEE_ENLARGE"), 'download_text' => GetMessage("CT_BLEE_DOWNLOAD"))); $arTabElement[] = array("id" => $FIELD_ID . '[' . $key . '][VALUE]', "name" => $arField["~NAME"], "required" => $arField["IS_REQUIRED"] == "Y" ? true : false, "type" => "custom", "value" => $html, "show" => $show); } } } elseif ($arField["PROPERTY_TYPE"] == "G") { if ($arField["IS_REQUIRED"] == "Y") { $items = array(); } else { $items = array("" => GetMessage("CT_BLEE_NO_VALUE")); } $rsSections = CIBlockSection::GetTreeList(array("IBLOCK_ID" => $arField["LINK_IBLOCK_ID"])); while ($ar = $rsSections->GetNext()) { $items[$ar["ID"]] = str_repeat(" . ", $ar["DEPTH_LEVEL"]) . $ar["~NAME"];