Пример #1
0
        echo GetMessage("IBSEC_E_PROP_TABLE_ACTION_ADD");
        ?>
" onclick="javascript:addSectionProperty(<?php 
        echo $arCatalog["IBLOCK_ID"];
        ?>
, 'select_SKU_SECTION_PROPERTY', 'shadow_SKU_SECTION_PROPERTY', 'table_SKU_SECTION_PROPERTY')">
		</td></tr>
			<?php 
    }
    ?>
	<?php 
    $tabControl->EndCustomField("SECTION_PROPERTY", '');
}
if (strlen($return_url) > 0) {
    $bu = $return_url;
} else {
    $bu = "/bitrix/admin/" . CIBlock::GetAdminSectionListLink($IBLOCK_ID, array('find_section_section' => intval($find_section_section)));
}
if (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1) {
    $tabControl->Buttons(array("disabled" => false, "btnSaveAndAdd" => true, "return_url" => $bu));
} elseif ($nobuttons !== "Y") {
    $save_and_add = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("IBSEC_E_SAVE_AND_ADD")) . "',\n\t\tname: 'save_and_add',\n\t\tid: 'save_and_add',\n\t\tclassName: 'adm-btn-add',\n\t\taction: function () {\n\t\t\tvar FORM = this.parentWindow.GetForm();\n\t\t\tFORM.appendChild(BX.create('INPUT', {\n\t\t\t\tprops: {\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tname: 'save_and_add',\n\t\t\t\t\tvalue: 'Y'\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tthis.parentWindow.hideNotify();\n\t\t\tthis.disableUntilError();\n\t\t\tthis.parentWindow.Submit();\n\t\t}\n\t}";
    $cancel = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("admin_lib_edit_cancel")) . "',\n\t\tname: 'cancel',\n\t\tid: 'cancel',\n\t\taction: function () {\n\t\t\tBX.WindowManager.Get().Close();\n\t\t\tif(window.reloadAfterClose)\n\t\t\t\ttop.BX.reload(true);\n\t\t}\n\t}";
    $tabControl->ButtonsPublic(array('.btnSave', $cancel, $save_and_add));
}
$tabControl->Show();
$tabControl->ShowWarnings($tabControl->GetName(), $message);
if (CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit") && (!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1)) {
    echo BeginNote(), GetMessage("IBSEC_E_IBLOCK_MANAGE_HINT"), ' <a href="iblock_edit.php?type=' . htmlspecialcharsbx($type) . '&amp;lang=' . LANGUAGE_ID . '&amp;ID=' . $IBLOCK_ID . '&amp;admin=Y&amp;return_url=' . urlencode(CIBlock::GetAdminSectionEditLink($IBLOCK_ID, $ID, array("find_section_section" => intval($find_section_section), "return_url" => strlen($return_url) > 0 ? $return_url : null))) . '">', GetMessage("IBSEC_E_IBLOCK_MANAGE_HINT_HREF"), '</a>', EndNote();
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
Пример #2
0
			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);
		}
	}";
	$tabControl->ButtonsPublic(array(
		'.btnSave',
		($ID > 0 && $bWorkflow? $wfClose: $cancel),
		$save_and_add,
	));
endif;

$tabControl->Show();
if (
	(!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1)
	&& CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit")
	&& !$bAutocomplete
)
{

	echo
		BeginNote(),
		GetMessage("IBEL_E_IBLOCK_MANAGE_HINT"),
Пример #3
0
"><?php 
            }
            $buttons_add_html = ob_get_contents();
            ob_end_clean();
            $tabControl->Buttons(false, $buttons_add_html);
        } elseif (!$bPropertyAjax && $nobuttons !== "Y") {
            $wfClose = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("IBLOCK_EL_CANC")) . "',\n\t\tname: 'dontsave',\n\t\tid: 'dontsave',\n\t\taction: function () {\n\t\t\tvar FORM = this.parentWindow.GetForm();\n\t\t\tFORM.appendChild(BX.create('INPUT', {\n\t\t\t\tprops: {\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tname: this.name,\n\t\t\t\t\tvalue: 'Y'\n\t\t\t\t}\n\t\t\t}));\n\t\t\tthis.disableUntilError();\n\t\t\tthis.parentWindow.Submit();\n\t\t}\n\t}";
            $save_and_add = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("IBLOCK_EL_SAVE_AND_ADD")) . "',\n\t\tname: 'save_and_add',\n\t\tid: 'save_and_add',\n\t\tclassName: 'adm-btn-add',\n\t\taction: function () {\n\t\t\tvar FORM = this.parentWindow.GetForm();\n\t\t\tFORM.appendChild(BX.create('INPUT', {\n\t\t\t\tprops: {\n\t\t\t\t\ttype: 'hidden',\n\t\t\t\t\tname: 'save_and_add',\n\t\t\t\t\tvalue: 'Y'\n\t\t\t\t}\n\t\t\t}));\n\n\t\t\tthis.parentWindow.hideNotify();\n\t\t\tthis.disableUntilError();\n\t\t\tthis.parentWindow.Submit();\n\t\t}\n\t}";
            $cancel = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage("IBLOCK_EL_CANC")) . "',\n\t\tname: 'cancel',\n\t\tid: 'cancel',\n\t\taction: function () {\n\t\t\tBX.WindowManager.Get().Close();\n\t\t\tif(window.reloadAfterClose)\n\t\t\t\ttop.BX.reload(true);\n\t\t}\n\t}";
            $editInPanelParams = array('WF' => $WF == 'Y' ? 'Y' : null, 'find_section_section' => (int) $find_section_section, 'menu' => null);
            if (!empty($arMainCatalog)) {
                $editInPanelParams = CCatalogAdminTools::getFormParams($editInPanelParams);
            }
            $edit_in_panel = "{\n\t\ttitle: '" . CUtil::JSEscape(GetMessage('IBLOCK_EL_EDIT_IN_PANEL')) . "',\n\t\tname: 'edit_in_panel',\n\t\tid: 'edit_in_panel',\n\t\tclassName: 'adm-btn-add',\n\t\taction: function () {\n\t\t\tlocation.href = '/bitrix/admin/" . CIBlock::GetAdminElementEditLink($IBLOCK_ID, $ID, $editInPanelParams) . "';\n\t\t}\n\t}";
            unset($editInPanelParams);
            $tabControl->ButtonsPublic(array('.btnSave', $ID > 0 && $bWorkflow ? $wfClose : $cancel, $edit_in_panel, $save_and_add));
        }
        $tabControl->Show();
        if ((!defined('BX_PUBLIC_MODE') || BX_PUBLIC_MODE != 1) && CIBlockRights::UserHasRightTo($IBLOCK_ID, $IBLOCK_ID, "iblock_edit") && !$bAutocomplete) {
            echo BeginNote(), GetMessage("IBEL_E_IBLOCK_MANAGE_HINT"), ' <a href="/bitrix/admin/iblock_edit.php?type=' . htmlspecialcharsbx($type) . '&amp;lang=' . LANGUAGE_ID . '&amp;ID=' . $IBLOCK_ID . '&amp;admin=Y&amp;return_url=' . urlencode("/bitrix/admin/" . CIBlock::GetAdminElementEditLink($IBLOCK_ID, $ID, array("WF" => $WF == "Y" ? "Y" : null, "find_section_section" => intval($find_section_section), "return_url" => strlen($return_url) > 0 ? $return_url : null))) . '">', GetMessage("IBEL_E_IBLOCK_MANAGE_HINT_HREF"), '</a>', EndNote();
        }
        //////////////////////////
        //END of the custom form
        //////////////////////////
    }
}
if ($bAutocomplete) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_popup_admin.php";
} elseif ($bPropertyAjax) {
    require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin_js.php";
} else {