'; } 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; $bDisabled = ($view=="Y") || ($bWorkflow && $prn_LOCK_STATUS=="red") || ( (($ID <= 0) || $bCopy) && !CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, $MENU_SECTION_ID, "section_element_bind") ) || ( (($ID > 0) && !$bCopy)
if ($ID > 0) { $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $ID); $htmlHidden = ''; foreach ($obSectionRights->GetRights() as $RIGHT_ID => $arRight) { $htmlHidden .= ' <input type="hidden" name="RIGHTS[][RIGHT_ID]" value="' . htmlspecialcharsbx($RIGHT_ID) . '"> <input type="hidden" name="RIGHTS[][GROUP_CODE]" value="' . htmlspecialcharsbx($arRight["GROUP_CODE"]) . '"> <input type="hidden" name="RIGHTS[][TASK_ID]" value="' . htmlspecialcharsbx($arRight["TASK_ID"]) . '"> '; } } else { $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $str_IBLOCK_SECTION_ID); $htmlHidden = ''; } $tabControl->BeginCustomField("RIGHTS", GetMessage("IBSEC_E_RIGHTS_FIELD")); IBlockShowRights('section', $IBLOCK_ID, $ID, GetMessage("IBSEC_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obSectionRights->GetRightsList(), $obSectionRights->GetRights(array("count_overwrited" => true, "parent" => $str_IBLOCK_SECTION_ID)), true, $ID <= 0); $tabControl->EndCustomField("RIGHTS", $htmlHidden); } if ($arIBlock["SECTION_PROPERTY"] === "Y") { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField("SECTION_PROPERTY", GetMessage("IBSEC_E_SECTION_PROPERTY_FIELD")); ?> <tr><td align="right" colspan="2"> <a id="modeChangeToTree" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'tree')"><?php echo GetMessage("IBSEC_E_PROP_TREE_MODE"); ?> </a> <a id="modeChangeToFlat" style="display: none;" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'flat')"><?php echo GetMessage("IBSEC_E_PROP_FLAT_MODE"); ?> </a>
if ($ID > 0) { $obRights = new CIBlockElementRights($IBLOCK_ID, $ID); $htmlHidden = ''; foreach ($obRights->GetRights() as $RIGHT_ID => $arRight) { $htmlHidden .= ' <input type="hidden" name="SUB_RIGHTS[][RIGHT_ID]" value="' . htmlspecialcharsbx($RIGHT_ID) . '"> <input type="hidden" name="SUB_RIGHTS[][GROUP_CODE]" value="' . htmlspecialcharsbx($arRight["GROUP_CODE"]) . '"> <input type="hidden" name="SUB_RIGHTS[][TASK_ID]" value="' . htmlspecialcharsbx($arRight["TASK_ID"]) . '"> '; } } else { $obRights = new CIBlockSectionRights($IBLOCK_ID, 0); $htmlHidden = ''; } $tabControl->BeginCustomField("RIGHTS", GetMessage("IBEL_E_RIGHTS_FIELD")); IBlockShowRights('element', $IBLOCK_ID, $ID, GetMessage("IBEL_E_RIGHTS_SECTION_TITLE"), "SUB_RIGHTS", $obRights->GetRightsList(), $obRights->GetRights(array("count_overwrited" => true, "parents" => array())), false, $ID <= 0 || $bCopy); $tabControl->EndCustomField("RIGHTS", $htmlHidden); } $bDisabled = $view == "Y" || $bWorkflow && $prn_LOCK_STATUS == "red" || ($ID <= 0 || $bCopy) && !CIBlockSectionRights::UserHasRightTo($IBLOCK_ID, 0, "section_element_bind") || $ID > 0 && !$bCopy && !CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $ID, "element_edit") || $bBizproc && !$canWrite; if ($ID > 0 && !$bSubCopy && BX_SUB_SETTINGS) { if (!$ajaxReload) { $reloadParams = array('bxpublic' => 'Y', 'bxsku' => 'Y', 'WF' => 'Y', 'TMP_ID' => $strSubTMP_ID, 'ajaxReload' => 'Y'); if ($arShowTabs['product_group']) { $reloadParams['groupdel'] = 'Y'; $reloadParams['sessid'] = bitrix_sessid(); $setBtn = "{\n\t\t\t\ttitle: '" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_DELETE')) . "',\n\t\t\t\tname: 'groupdel',\n\t\t\t\tid: 'groupdel',\n\t\t\t\tclassName: 'adm-btn-add',\n\t\t\t\taction: function () {\n\t\t\t\t\tif (confirm('" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_DELETE_CONFIRM')) . "'))\n\t\t\t\t\t{\n\t\t\t\t\t\ttop.BX.showWait();\n\t\t\t\t\t\ttop.BX.ajax.get(\n\t\t\t\t\t\t\t'" . CIBlock::GetAdminSubElementEditLink($IBLOCK_ID, $intProductID, $ID, $reloadParams, '', true) . "',\n\t\t\t\t\t\t\tfunction (result) {\n\t\t\t\t\t\t\t\ttop.BX.closeWait();\n\t\t\t\t\t\t\t\ttop.BX.WindowManager.Get().SetContent(result);\n\t\t\t\t\t\t\t\tif (BX('groupdel'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tBX.style(BX('groupdel'), 'display', 'none');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}"; } else { $reloadParams['SUBPRODUCT_TYPE'] = CCatalogAdminTools::TAB_GROUP; $setBtn = "{\n\t\t\t\ttitle: '" . CUtil::JSEscape(GetMessage('IB_SE_SET_PRODUCT_TYPE_GROUP_ADD')) . "',\n\t\t\t\tname: 'groupset',\n\t\t\t\tid: 'groupset',\n\t\t\t\tclassName: 'adm-btn-add',\n\t\t\t\taction: function () {\n\t\t\t\t\ttop.BX.showWait();\n\t\t\t\t\ttop.BX.ajax.get('" . CIBlock::GetAdminSubElementEditLink($IBLOCK_ID, $intProductID, $ID, $reloadParams, '', true) . "',\n\t\t\t\t\tfunction (result) {\n\t\t\t\t\t\ttop.BX.closeWait();\n\t\t\t\t\t\ttop.BX.WindowManager.Get().SetContent(result);\n\t\t\t\t\t\tif (BX('groupset'))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tBX.style(BX('groupset'), 'display', 'none');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}"; } $tabControl->ButtonsPublic(array($setBtn));
'; } else { $obSectionRights = new CIBlockSectionRights($IBLOCK_ID, $str_IBLOCK_SECTION_ID); $htmlHidden = ''; } $tabControl->BeginCustomField("RIGHTS", GetMessage("IBSEC_E_RIGHTS_FIELD")); IBlockShowRights( 'section', $IBLOCK_ID, $ID, GetMessage("IBSEC_E_RIGHTS_SECTION_TITLE"), "RIGHTS", $obSectionRights->GetRightsList(), $obSectionRights->GetRights(array("count_overwrited" => true, "parent" => $str_IBLOCK_SECTION_ID)), true, /*$bForceInherited=*/($ID <= 0) ); $tabControl->EndCustomField("RIGHTS", $htmlHidden); } if($arIBlock["SECTION_PROPERTY"] === "Y") { $tabControl->BeginNextFormTab(); $tabControl->BeginCustomField("SECTION_PROPERTY", GetMessage("IBSEC_E_SECTION_PROPERTY_FIELD")); ?> <tr><td align="right" colspan="2"> <a id="modeChangeToTree" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'tree')"><?echo GetMessage("IBSEC_E_PROP_TREE_MODE");?></a> <a id="modeChangeToFlat" style="display: none;" href="javascript:setMode(BX('table_SECTION_PROPERTY'), 'flat')"><?echo GetMessage("IBSEC_E_PROP_FLAT_MODE");?></a> </td></tr>