BeginPrologContent(); CJSCore::Init(array('date')); //TODO: this code only for old html editor. Need remove after final cut old editor if ( $bFileman && Main\Config\Option::get('iblock', 'use_htmledit') === 'Y' && Main\Config\Option::get('fileman', 'use_editor_3', 'Y') !== 'Y' ) { echo '
'; CFileMan::AddHTMLEditorFrame("SOME_TEXT", "", "SOME_TEXT_TYPE", "text", array('height' => 450, 'width' => '100%'), "N", 0, "", "", $arIBlock["LID"] ); echo '
'; } if($arTranslit["TRANSLITERATION"] == "Y") { CJSCore::Init(array('translit')); ?> EndPrologContent(); $tabControl->BeginEpilogContent(); echo bitrix_sessid_post(); echo GetFilterHiddens("find_");?> 0 && !$bCopy) { ?> 0) { ?> EndEpilogContent(); $customTabber->SetErrorState($bVarsFromForm); $arEditLinkParams = array( "find_section_section" => $find_section_section ); if ($bAutocomplete) { $arEditLinkParams['lookup'] = $strLookup; } if ($adminSidePanelHelper->isPublicFrame()) { $arEditLinkParams["IFRAME"] = "Y"; $arEditLinkParams["IFRAME_TYPE"] = "PUBLIC_FRAME"; } $tabControl->Begin(array( "FORM_ACTION" => $urlBuilder->getElementSaveUrl(null, $arEditLinkParams) )); $tabControl->BeginNextFormTab(); if($ID > 0 && !$bCopy) { $p = CIblockElement::GetByID($ID); $pr = $p->ExtractFields("prn_"); } else { $pr = array(); } if ($ID > 0 && !$bCopy) { if (Loader::includeModule('crm')) { $importProduct = \Bitrix\Crm\Order\Import\Internals\ProductTable::getRow([ 'select' => ['SETTINGS'], 'filter' => [ '=PRODUCT_ID' => CIBlockElement::GetRealElement($ID), ], ]); if (!empty($importProduct)) { $accountName = !empty($importProduct['SETTINGS']['account_name']) ? $importProduct['SETTINGS']['account_name'] : ''; $linkToProduct = !empty($importProduct['SETTINGS']['permalink']) ? $importProduct['SETTINGS']['permalink'] : ''; $tabControl->BeginCustomField('IMPORTED_FROM', GetMessage('IBLOCK_IMPORT_FROM').':'); ?> GetCustomLabelHTML()?> ".GetMessage('IBLOCK_LINK_TO_MEDIA')."" : '')?> EndCustomField('IMPORTED_FROM', ''); } } } $tabControl->BeginCustomField("ID", "ID:"); if ($ID > 0 && !$bCopy) { ?> GetCustomLabelHTML()?> EndCustomField("ID", ''); $tabControl->BeginCustomField("DATE_CREATE", GetMessage("IBLOCK_FIELD_CREATED").":"); if ($ID > 0 && !$bCopy) { if ($str_DATE_CREATE <> ''):?> GetCustomLabelHTML() ?> 0): if (!$adminSidePanelHelper->isPublicSidePanel()): ?>   []Fetch(); if ($arUser): echo ' '.CUser::FormatName($nameFormat, $arUser, false, true); endif; endif; ?> EndCustomField("DATE_CREATE", ''); $tabControl->BeginCustomField("TIMESTAMP_X", GetMessage("IBLOCK_FIELD_LAST_UPDATED").":"); if ($ID > 0 && !$bCopy) { ?> GetCustomLabelHTML() ?> 0): if (!$adminSidePanelHelper->isPublicSidePanel()): ?>   []Fetch(); } if ($arUser) { echo ' ' . CUser::FormatName($nameFormat, $arUser, false, true); } endif ?> EndCustomField("TIMESTAMP_X", ''); $tabControl->AddCheckBoxField("ACTIVE", GetMessage("IBLOCK_FIELD_ACTIVE").":", false, array("Y","N"), $str_ACTIVE=="Y"); $tabControl->BeginCustomField("ACTIVE_FROM", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_FROM"), $arIBlock["FIELDS"]["ACTIVE_FROM"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?>: EndCustomField("ACTIVE_FROM", ''); $tabControl->BeginCustomField("ACTIVE_TO", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_TO"), $arIBlock["FIELDS"]["ACTIVE_TO"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?>: EndCustomField("ACTIVE_TO", ''); if($arTranslit["TRANSLITERATION"] == "Y") { $tabControl->BeginCustomField("NAME", GetMessage("IBLOCK_FIELD_NAME").":", true); ?> GetCustomLabelHTML()?> " class="linked" src="/bitrix/themes/.default/icons/iblock/" onclick="set_linked()" /> EndCustomField("NAME", '' ); $tabControl->BeginCustomField("CODE", GetMessage("IBLOCK_FIELD_CODE").":", $arIBlock["FIELDS"]["CODE"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?> " class="linked" src="/bitrix/themes/.default/icons/iblock/" onclick="set_linked()" /> EndCustomField("CODE", '' ); } else { $tabControl->AddEditField("NAME", GetMessage("IBLOCK_FIELD_NAME").":", true, array("size" => 70, "maxlength" => 255), $str_NAME); $tabControl->AddEditField("CODE", GetMessage("IBLOCK_FIELD_CODE").":", $arIBlock["FIELDS"]["CODE"]["IS_REQUIRED"] === "Y", array("size" => 70, "maxlength" => 255), $str_CODE); } if ( $arShowTabs['sections'] && $arIBlock["FIELDS"]["IBLOCK_SECTION"]["DEFAULT_VALUE"]["KEEP_IBLOCK_SECTION_ID"] === "Y" ) { $arDropdown = array(); if ($str_IBLOCK_ELEMENT_SECTION) { $sectionList = CIBlockSection::GetList( array("left_margin"=>"asc"), array("=ID"=>$str_IBLOCK_ELEMENT_SECTION), false, array("ID", "NAME") ); while ($section = $sectionList->Fetch()) $arDropdown[$section["ID"]] = htmlspecialcharsEx($section["NAME"]); } $tabControl->BeginCustomField("IBLOCK_ELEMENT_SECTION_ID", GetMessage("IBEL_E_MAIN_IBLOCK_SECTION_ID").":", false); ?> GetCustomLabelHTML()?>
EndCustomField("IBLOCK_ELEMENT_SECTION_ID", '' ); } if(COption::GetOptionString("iblock", "show_xml_id", "N")=="Y") { if ($bCopy || $ID == 0) { $tabControl->BeginCustomField("XML_ID", GetMessage("IBLOCK_FIELD_XML_ID") . ":", $arIBlock["FIELDS"]["XML_ID"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML(); ?> EndCustomField("XML_ID", ''); } else { $tabControl->AddEditField("XML_ID", GetMessage("IBLOCK_FIELD_XML_ID") . ":", $arIBlock["FIELDS"]["XML_ID"]["IS_REQUIRED"] === "Y", array("size" => 70, "maxlength" => 255, "id" => "XML_ID"), $str_XML_ID); } } $tabControl->AddEditField("SORT", GetMessage("IBLOCK_FIELD_SORT").":", $arIBlock["FIELDS"]["SORT"]["IS_REQUIRED"] === "Y", array("size" => 7, "maxlength" => 10), $str_SORT); if(!empty($PROP)): if ($arIBlock["SECTION_PROPERTY"] === "Y" || defined("CATALOG_PRODUCT")) { $arPropLinks = array("IBLOCK_ELEMENT_PROP_VALUE"); if(is_array($str_IBLOCK_ELEMENT_SECTION) && !empty($str_IBLOCK_ELEMENT_SECTION)) { foreach($str_IBLOCK_ELEMENT_SECTION as $section_id) { foreach(CIBlockSectionPropertyLink::GetArray($IBLOCK_ID, $section_id) as $PID => $arLink) $arPropLinks[$PID] = "PROPERTY_".$PID; } } else { foreach(CIBlockSectionPropertyLink::GetArray($IBLOCK_ID, 0) as $PID => $arLink) $arPropLinks[$PID] = "PROPERTY_".$PID; } $tabControl->AddFieldGroup("IBLOCK_ELEMENT_PROPERTY", GetMessage("IBLOCK_ELEMENT_PROP_VALUE"), $arPropLinks, $bPropertyAjax); } $tabControl->AddSection("IBLOCK_ELEMENT_PROP_VALUE", GetMessage("IBLOCK_ELEMENT_PROP_VALUE")); foreach($PROP as $prop_code=>$prop_fields): $prop_values = $prop_fields["VALUE"]; $tabControl->BeginCustomField("PROPERTY_".$prop_fields["ID"], $prop_fields["NAME"], $prop_fields["IS_REQUIRED"]==="Y"); ?> " class="adm-detail-file-row"> "> GetCustomLabelHTML();?>: GetFormName(), $bCopy);?> $val) { if($bCopy) { $key = "n".$start; $start++; } if(is_array($val) && array_key_exists("VALUE",$val)) { $hidden .= _ShowHiddenValue('PROP['.$prop_fields["ID"].']['.$key.'][VALUE]', $val["VALUE"]); $hidden .= _ShowHiddenValue('PROP['.$prop_fields["ID"].']['.$key.'][DESCRIPTION]', $val["DESCRIPTION"] ?? ''); } else { $hidden .= _ShowHiddenValue('PROP['.$prop_fields["ID"].']['.$key.'][VALUE]', $val); $hidden .= _ShowHiddenValue('PROP['.$prop_fields["ID"].']['.$key.'][DESCRIPTION]', ""); } } $tabControl->EndCustomField("PROPERTY_".$prop_fields["ID"], $hidden); endforeach;?> 0 && !$bCopy)) { $rsLinkedProps = CIBlockProperty::GetList(array(), array( "PROPERTY_TYPE" => "E", "LINK_IBLOCK_ID" => $IBLOCK_ID, "ACTIVE" => "Y", "FILTRABLE" => "Y", )); $arLinkedProp = $rsLinkedProps->GetNext(); if ($arLinkedProp && !$adminSidePanelHelper->isPublicSidePanel()) { $linkedTitle = ''; $tabControl->BeginCustomField("LINKED_PROP", GetMessage("IBLOCK_ELEMENT_EDIT_LINKED")); ?> GetCustomLabelHTML();?> "> 'Y', 'PROPERTY_'.$arLinkedProp["ID"]=>$ID, 'find_section_section' => -1))); ?> GetNext()); unset($linkedTitle); $tabControl->EndCustomField("LINKED_PROP", ""); } } $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField("PREVIEW_PICTURE", GetMessage("IBLOCK_FIELD_PREVIEW_PICTURE"), $arIBlock["FIELDS"]["PREVIEW_PICTURE"]["IS_REQUIRED"] === "Y"); if($bVarsFromForm && !array_key_exists("PREVIEW_PICTURE", $_REQUEST) && $arElement) $str_PREVIEW_PICTURE = intval($arElement["PREVIEW_PICTURE"]); ?> GetCustomLabelHTML()?>: 0): echo CFileInput::Show( "PREVIEW_PICTURE", $str_PREVIEW_PICTURE, array( "IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array( "W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"), ) ) ); else: echo \Bitrix\Main\UI\FileInput::createInstance(array( "name" => "PREVIEW_PICTURE", "description" => true, "upload" => true, "allowUpload" => "I", "medialib" => true, "fileDialog" => true, "cloud" => true, "delete" => true, "maxCount" => 1 ))->show( ($bVarsFromForm ? $_REQUEST["PREVIEW_PICTURE"] : ($ID > 0 && !$bCopy ? $str_PREVIEW_PICTURE: 0)), $bVarsFromForm ); endif;?> EndCustomField("PREVIEW_PICTURE", ""); $tabControl->BeginCustomField("PREVIEW_TEXT", GetMessage("IBLOCK_FIELD_PREVIEW_TEXT"), $arIBlock["FIELDS"]["PREVIEW_TEXT"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?>
450, 'width' => '100%' ), "N", 0, "", "", $arIBlock["LID"], true, false, array( 'toolbarConfig' => CFileMan::GetEditorToolbarConfig("iblock_".(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? 'public' : 'admin')), 'saveEditorKey' => $IBLOCK_ID, 'hideTypeSelector' => $arIBlock["FIELDS"]["PREVIEW_TEXT_TYPE_ALLOW_CHANGE"]["DEFAULT_VALUE"] === "N", ) );?> > / > EndCustomField("PREVIEW_TEXT", ''. '' ); $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField("DETAIL_PICTURE", GetMessage("IBLOCK_FIELD_DETAIL_PICTURE"), $arIBlock["FIELDS"]["DETAIL_PICTURE"]["IS_REQUIRED"] === "Y"); if($bVarsFromForm && !array_key_exists("DETAIL_PICTURE", $_REQUEST) && $arElement) $str_DETAIL_PICTURE = intval($arElement["DETAIL_PICTURE"]); ?> GetCustomLabelHTML()?>: 0): echo CFileInput::Show( "DETAIL_PICTURE", $str_DETAIL_PICTURE, array( "IMAGE" => "Y", "PATH" => "Y", "FILE_SIZE" => "Y", "DIMENSIONS" => "Y", "IMAGE_POPUP" => "Y", "MAX_SIZE" => array( "W" => COption::GetOptionString("iblock", "detail_image_size"), "H" => COption::GetOptionString("iblock", "detail_image_size"), ) ) ); else: echo \Bitrix\Main\UI\FileInput::createInstance(array( "name" => "DETAIL_PICTURE", "description" => true, "upload" => true, "allowUpload" => "I", "medialib" => true, "fileDialog" => true, "cloud" => true, "delete" => true, "maxCount" => 1 ))->show( $bVarsFromForm ? $_REQUEST["DETAIL_PICTURE"] : ($ID > 0 && !$bCopy? $str_DETAIL_PICTURE: 0), $bVarsFromForm ); endif;?> EndCustomField("DETAIL_PICTURE", ""); $tabControl->BeginCustomField("DETAIL_TEXT", GetMessage("IBLOCK_FIELD_DETAIL_TEXT"), $arIBlock["FIELDS"]["DETAIL_TEXT"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?>
450, 'width' => '100%' ), "N", 0, "", "", $arIBlock["LID"], true, false, array( 'toolbarConfig' => CFileMan::GetEditorToolbarConfig("iblock_".(defined('BX_PUBLIC_MODE') && BX_PUBLIC_MODE == 1 ? 'public' : 'admin')), 'saveEditorKey' => $IBLOCK_ID, 'hideTypeSelector' => $arIBlock["FIELDS"]["DETAIL_TEXT_TYPE_ALLOW_CHANGE"]["DEFAULT_VALUE"] === "N", ) ); ?> > / > EndCustomField("DETAIL_TEXT", ''. '' ); $tabControl->BeginNextFormTab(); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_TITLE", GetMessage("IBEL_E_SEO_META_TITLE")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_TITLE", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_META_TITLE", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_KEYWORDS", GetMessage("IBEL_E_SEO_META_KEYWORDS")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_KEYWORDS", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_META_KEYWORDS", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_DESCRIPTION", GetMessage("IBEL_E_SEO_META_DESCRIPTION")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_META_DESCRIPTION", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_META_DESCRIPTION", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_PAGE_TITLE", GetMessage("IBEL_E_SEO_ELEMENT_TITLE")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_PAGE_TITLE", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_PAGE_TITLE", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> AddSection("IPROPERTY_TEMPLATES_ELEMENTS_PREVIEW_PICTURE", GetMessage("IBEL_E_SEO_FOR_ELEMENTS_PREVIEW_PICTURE")); $tabControl->BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_ALT", GetMessage("IBEL_E_SEO_FILE_ALT")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_ALT", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_PREVIEW_PICTURE_FILE_ALT", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_TITLE", GetMessage("IBEL_E_SEO_FILE_TITLE")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_TITLE", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_PREVIEW_PICTURE_FILE_TITLE", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_NAME", GetMessage("IBEL_E_SEO_FILE_NAME")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_PREVIEW_PICTURE_FILE_NAME", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_PREVIEW_PICTURE_FILE_NAME", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> AddSection("IPROPERTY_TEMPLATES_ELEMENTS_DETAIL_PICTURE", GetMessage("IBEL_E_SEO_FOR_ELEMENTS_DETAIL_PICTURE")); $tabControl->BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_ALT", GetMessage("IBEL_E_SEO_FILE_ALT")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_ALT", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_DETAIL_PICTURE_FILE_ALT", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_TITLE", GetMessage("IBEL_E_SEO_FILE_TITLE")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_TITLE", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_DETAIL_PICTURE_FILE_TITLE", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> BeginCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_NAME", GetMessage("IBEL_E_SEO_FILE_NAME")); ?> GetCustomLabelHTML()?> EndCustomField("IPROPERTY_TEMPLATES_ELEMENT_DETAIL_PICTURE_FILE_NAME", IBlockInheritedPropertyHidden($IBLOCK_ID, "ELEMENT_DETAIL_PICTURE_FILE_NAME", $str_IPROPERTY_TEMPLATES, "E", GetMessage("IBEL_E_SEO_OVERWRITE")) ); ?> AddSection("SEO_ADDITIONAL", GetMessage("IBLOCK_EL_TAB_MO")); $tabControl->BeginCustomField("TAGS", GetMessage("IBLOCK_FIELD_TAGS").":", $arIBlock["FIELDS"]["TAGS"]["IS_REQUIRED"] === "Y"); ?> GetCustomLabelHTML()?>
Fetch()) $arLID[] = $arSite["LID"]; echo InputTags("TAGS", htmlspecialcharsback($str_TAGS), $arLID, 'size="55"'); else:?> EndCustomField("TAGS", '' ); ?> BeginNextFormTab(); $tabControl->BeginCustomField("SECTIONS", GetMessage("IBLOCK_SECTION"), $arIBlock["FIELDS"]["IBLOCK_SECTION"]["IS_REQUIRED"] === "Y"); ?> $IBLOCK_ID), array("ID", "NAME", "DEPTH_LEVEL"));?> GetCustomLabelHTML()?> GetCustomLabelHTML()?> GetNext()) $strPath .= $arChain["NAME"]." / "; if($strPath <> '') { ?>
" OnClick="deleteRow(this)">
 '; ?> " onClick="addPathRow()">
GetCustomLabelHTML()?> GetNext()) $strPath .= $arChain["NAME"]." / "; if($strPath <> '') { ?>
" OnClick="deleteRow(this)">
..." onClick="jsUtils.OpenWindow('iblock_section_search.php?lang=&IBLOCK_ID=&n=input_IBLOCK_SECTION&m=y&iblockfix=y&tableId=iblocksection-', 900, 700);"> '; $tabControl->EndCustomField("SECTIONS", $hidden); endif; if ($arShowTabs['product']) { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField( 'PRODUCT', $catalogTabNames[CCatalogAdminTools::TAB_PRODUCT]['NAME'], false ); $iblockEditProduct = $ID > 0 && !$bCopy ? CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, 'element_edit_price') : CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $MENU_SECTION_ID, 'element_edit_price') ; $allowEdit = false; if ($iblockEditProduct) { $allowEdit = $ID > 0 && !$bCopy ? $allowProductEdit : $allowProductAdd ; } $product = [ 'ID' => $ID, 'IBLOCK_ID' => $IBLOCK_ID, 'TYPE' => Catalog\ProductTable::TYPE_SKU, ]; $productConfig = [ 'FROM_FORM' => $bVarsFromForm, 'ALLOW_EDIT' => $allowEdit, ]; echo CCatalogAdminTools::getSystemProductFieldsHtml($product, $productConfig); $tabControl->EndCustomField('PRODUCT', ''); } if ($arShowTabs['catalog']) { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField( 'CATALOG', $catalogTabNames[CCatalogAdminTools::TAB_CATALOG]['NAME'], true ); include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/catalog/admin/templates/product_edit.php"); $tabControl->EndCustomField("CATALOG", ""); } if ($arShowTabs['sku']) { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField('OFFERS', GetMessage("IBLOCK_EL_TAB_OFFERS"), false); ?>Fetch()) $arSubIBlock["SITE_ID"][] = $arSite["LID"]; $strSubIBlockType = $arSubIBlock['IBLOCK_TYPE_ID']; $arSubIBlockType = CIBlockType::GetByIDLang($strSubIBlockType, LANGUAGE_ID); $boolIncludeOffers = CIBlockRights::UserHasRightTo($intSubIBlockID, $intSubIBlockID, "iblock_admin_display"); $arSubCatalog = CCatalogSku::GetInfoByOfferIBlock($arMainCatalog['IBLOCK_ID']); $boolSubCatalog = (!empty($arSubCatalog) && is_array($arSubCatalog)); if (!$boolCatalogRead && !$boolCatalogPrice) $boolSubCatalog = false; $boolSubWorkFlow = Bitrix\Main\Loader::includeModule("workflow") && $arSubIBlock["WORKFLOW"] != "N"; $boolSubBizproc = Bitrix\Main\Loader::includeModule("bizproc") && $arSubIBlock["BIZPROC"] != "N"; $intSubPropValue = (0 == $ID || $bCopy ? '-'.$TMP_ID : $ID); $strSubTMP_ID = $TMP_ID; $additionalParams = (defined("SELF_FOLDER_URL") ? "&public=y" : ""); $strSubElementAjaxPath = '/bitrix/tools/iblock/iblock_subelement_admin.php?WF=Y&IBLOCK_ID=' . $intSubIBlockID . '&type='.urlencode($strSubIBlockType) . '&lang=' . LANGUAGE_ID . '&find_section_section=0&find_el_property_' . $arSubCatalog['SKU_PROPERTY_ID'] . '='.(0 == $ID || $bCopy ? '-' . $TMP_ID : $ID) . '&TMP_ID=' . urlencode($strSubTMP_ID) . '&urlBuilderId=' . urlencode($urlBuilderId) . $additionalParams ; if ($boolIncludeOffers && file_exists($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/iblock/admin/templates/iblock_subelement_list.php')) { require($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/iblock/admin/templates/iblock_subelement_list.php'); } else { ShowError(GetMessage('IBLOCK_EL_OFFERS_ACCESS_DENIED')); } ?>EndCustomField('OFFERS',''); } if ($arShowTabs['product_set']) { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField('PRODUCT_SET', GetMessage('IBLOCK_EL_PRODUCT_SET').':', false); ?> CCatalogProductSet::TYPE_SET)); if (0 < $intProductID) { $arSets = CCatalogProductSet::getAllSetsByProduct($intProductID, CCatalogProductSet::TYPE_SET); if ($bCopy) CCatalogAdminProductSetEdit::clearOwnerSet($arSets); } if (empty($arSets)) $arSets = CCatalogAdminProductSetEdit::getEmptySet($intProductID); if ($bVarsFromForm) CCatalogAdminProductSetEdit::getFormValues($arSets); CCatalogAdminProductSetEdit::addEmptyValues($arSets); CCatalogAdminProductSetEdit::showEditForm($arSets); ?>EndCustomField('PRODUCT_SET', ''); } if ($arShowTabs['product_group']) { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField('PRODUCT_GROUP', GetMessage('IBLOCK_EL_PRODUCT_GROUP').':', false); ?> CCatalogProductSet::TYPE_GROUP)); if (0 < $intProductID) { $arSets = CCatalogProductSet::getAllSetsByProduct($intProductID, CCatalogProductSet::TYPE_GROUP); if ($bCopy) CCatalogAdminProductSetEdit::clearOwnerSet($arSets); } if (empty($arSets)) $arSets = CCatalogAdminProductSetEdit::getEmptySet($intProductID); if ($bVarsFromForm) CCatalogAdminProductSetEdit::getFormValues($arSets); CCatalogAdminProductSetEdit::addEmptyValues($arSets); CCatalogAdminProductSetEdit::showEditForm($arSets); ?>EndCustomField('PRODUCT_GROUP', ''); } if($arShowTabs['workflow']):?> BeginNextFormTab(); $tabControl->BeginCustomField("WORKFLOW_PARAMS", GetMessage("IBLOCK_EL_TAB_WF_TITLE")); if($pr["DATE_CREATE"] <> ''): ?> 0): ?>   ["> '' && !$bCopy):?> 0): ?>   [ ''):?> 0): ?>   [ EndCustomField("WORKFLOW_PARAMS", ""); if ($WF=="Y" || $view=="Y"): $tabControl->BeginCustomField("WF_STATUS_ID", GetMessage("IBLOCK_FIELD_STATUS").":"); ?> GetCustomLabelHTML()?> 0 && !$bCopy):?> 0 && !$bCopy) $hidden = ''; else { $rsStatus = CWorkflowStatus::GetDropDownList("N", "desc"); $arDefaultStatus = $rsStatus->Fetch(); if($arDefaultStatus) $def_WF_STATUS_ID = intval($arDefaultStatus["REFERENCE_ID"]); else $def_WF_STATUS_ID = ""; $hidden = ''; } $tabControl->EndCustomField("WF_STATUS_ID", $hidden); endif; $tabControl->BeginCustomField("WF_COMMENTS", GetMessage("IBLOCK_COMMENTS")); ?> GetCustomLabelHTML()?> 0 && !$bCopy):?> EndCustomField("WF_COMMENTS", ''); endif; if ($arShowTabs['bizproc']): $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField("BIZPROC_WF_STATUS", GetMessage("IBEL_E_PUBLISHED")); ?> : EndCustomField("BIZPROC_WF_STATUS", ''); ob_start(); $required = false; CBPDocument::AddShowParameterInit(MODULE_ID, "only_users", DOCUMENT_TYPE); $bizProcIndex = 0; if (!isset($arDocumentStates)) { $arDocumentStates = CBPDocument::GetDocumentStates( array(MODULE_ID, ENTITY, DOCUMENT_TYPE), ($ID > 0) ? array(MODULE_ID, ENTITY, $ID) : null ); } foreach ($arDocumentStates as $arDocumentState) { $bizProcIndex++; if ($arDocumentState["ID"] <> '') { $canViewWorkflow = CBPDocument::CanUserOperateDocument( CBPCanUserOperateOperation::ViewWorkflow, $USER->GetID(), array(MODULE_ID, ENTITY, $ID), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["ID"] > 0 ? $arDocumentState["ID"] : $arDocumentState["TEMPLATE_ID"]) ); } else { $canViewWorkflow = CBPDocument::CanUserOperateDocumentType( CBPCanUserOperateOperation::ViewWorkflow, $USER->GetID(), array(MODULE_ID, ENTITY, DOCUMENT_TYPE), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["ID"] > 0 ? $arDocumentState["ID"] : $arDocumentState["TEMPLATE_ID"]) ); } if (!$canViewWorkflow) continue; ?> '' && $arDocumentState["WORKFLOW_STATUS"] <> ''):?> ($WF, "find_section_section" => $find_section_section, "stop_bizproc" => $arDocumentState["ID"], ), "&".bitrix_sessid_get()))?>">) ''):?> ''):?> ''):?>&back_url=GetCurPageParam("", array())) ?>"> '' ? $arDocumentState["STATE_TITLE"] : $arDocumentState["STATE_NAME"] ?> ''):?> GetID(), $arCurrentUserGroups, $arDocumentState, $arIBlock["RIGHTS_MODE"] === "E"); if (!empty($arEvents)) { ?> "> "> '') { $arTasks = CBPDocument::GetUserTasksForWorkflow($USER->GetID(), $arDocumentState["ID"]); if (!empty($arTasks)) { ?> &back_url=GetCurPageParam("", array())) ?>" title="">

0): $bStartWorkflowPermission = CBPDocument::CanUserOperateDocument( CBPCanUserOperateOperation::StartWorkflow, $USER->GetID(), array(MODULE_ID, ENTITY, $ID), array("AllUserGroups" => $arCurrentUserGroups, "DocumentStates" => $arDocumentStates, "WorkflowId" => $arDocumentState["TEMPLATE_ID"]) ); if ($bStartWorkflowPermission): ?> "> BeginCustomField("BIZPROC", GetMessage("IBEL_E_TAB_BIZPROC"), $required); echo $html; $tabControl->EndCustomField("BIZPROC", ""); endif; if($arShowTabs['edit_rights']): $tabControl->BeginNextFormTab(); if($ID > 0) { $obRights = new CIBlockElementRights($IBLOCK_ID, $ID); $htmlHidden = ''; foreach($obRights->GetRights() as $RIGHT_ID => $arRight) $htmlHidden .= ' '; } else { $obRights = new CIBlockSectionRights($IBLOCK_ID, $MENU_SECTION_ID); $htmlHidden = ''; } $tabControl->BeginCustomField("RIGHTS", GetMessage("IBEL_E_RIGHTS_FIELD")); IBlockShowRights( 'element', $IBLOCK_ID, $ID, GetMessage("IBEL_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obRights->GetRightsList(), $obRights->GetRights(array("count_overwrited" => true, "parents" => $str_IBLOCK_ELEMENT_SECTION)), false, /*$bForceInherited=*/($ID <= 0) || $bCopy ); $tabControl->EndCustomField("RIGHTS", $htmlHidden); endif; $newElement = ($ID <= 0) || $bCopy; $currentElement = ($ID > 0) && !$bCopy; $bDisabled = ($view=="Y") || ($bWorkflow && $prn_LOCK_STATUS=="red") || ( $newElement && !CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $MENU_SECTION_ID, "section_element_bind") ) || ( $currentElement && !CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_edit") ) || ( $bBizproc && !$canWrite ) ; if ( !$bDisabled && $bCatalog && !empty($arMainCatalog) && $newElement && !$allowProductAdd ) { $bDisabled = true; } if ($adminSidePanelHelper->isSidePanelFrame()): $tabControl->Buttons(array( 'disabled' => $bDisabled, 'btnApply' => false, )); elseif(!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1): ob_start(); $disableHtml = $bDisabled ? ' disabled data-btn-disabled="Y"' : '' ; ?> type="submit" class="adm-btn-save" name="save" id="save" value=""> type="submit" class="button" name="apply" id="apply" value=""> type="submit" class="button" name="dontsave" id="dontsave" value=""> type="submit" class="adm-btn-add" name="save_and_add" id="save_and_add" value="">Buttons(false, $buttons_add_html); elseif(!$bPropertyAjax && (!isset($_REQUEST['nobuttons']) || $_REQUEST['nobuttons'] !== "Y")): $wfClose = "{ title: '".CUtil::JSEscape(GetMessage("IBLOCK_EL_CANC"))."', name: 'dontsave', id: 'dontsave', action: function () { var FORM = this.parentWindow.GetForm(); FORM.appendChild(BX.create('INPUT', { props: { type: 'hidden', name: this.name, value: 'Y' } })); this.disableUntilError(); this.parentWindow.Submit(); } }"; $save_and_add = "{ title: '".CUtil::JSEscape(GetMessage("IBLOCK_EL_SAVE_AND_ADD"))."', name: 'save_and_add', id: 'save_and_add', className: 'adm-btn-add', action: function () { var FORM = this.parentWindow.GetForm(); FORM.appendChild(BX.create('INPUT', { props: { type: 'hidden', name: 'save_and_add', value: 'Y' } })); this.parentWindow.hideNotify(); this.disableUntilError(); this.parentWindow.Submit(); } }"; $cancel = "{ title: '".CUtil::JSEscape(GetMessage("IBLOCK_EL_CANC"))."', name: 'cancel', id: 'cancel', action: function () { BX.WindowManager.Get().Close(); if(window.reloadAfterClose) top.BX.reload(true); } }"; $editInPanelParams = array( 'WF' => ($WF == 'Y' ? 'Y': null), 'find_section_section' => $find_section_section, 'menu' => null ); if (!empty($arMainCatalog)) $editInPanelParams = CCatalogAdminTools::getFormParams($editInPanelParams); $edit_in_panel = "{ title: '".CUtil::JSEscape(GetMessage('IBLOCK_EL_EDIT_IN_PANEL'))."', name: 'edit_in_panel', id: 'edit_in_panel', className: 'adm-btn-add', action: function () { location.href = '".$selfFolderUrl.CIBlock::GetAdminElementEditLink( $IBLOCK_ID, $ID, $editInPanelParams )."'; } }"; unset($editInPanelParams); $tabControl->ButtonsPublic(array( '.btnSave', ($ID > 0 && $bWorkflow? $wfClose: $cancel), $edit_in_panel, $save_and_add )); endif; $tabControl->Show(); if ( (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1) && CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit") && !$bAutocomplete && !$adminSidePanelHelper->isSidePanel() ) { echo BeginNote(), GetMessage("IBEL_E_IBLOCK_MANAGE_HINT"), ' ($WF=="Y"? "Y": null), "find_section_section" => $find_section_section, "IBLOCK_SECTION_ID" => $find_section_section, "return_url" => ($return_url <> ''? $return_url: null)))).'">', GetMessage("IBEL_E_IBLOCK_MANAGE_HINT_HREF"), '', EndNote() ; } ////////////////////////// //END of the custom form //////////////////////////