本文整理汇总了PHP中CAdminForm::ButtonsPublic方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminForm::ButtonsPublic方法的具体用法?PHP CAdminForm::ButtonsPublic怎么用?PHP CAdminForm::ButtonsPublic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminForm
的用法示例。
在下文中一共展示了CAdminForm::ButtonsPublic方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
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) . '&lang=' . LANGUAGE_ID . '&ID=' . $IBLOCK_ID . '&admin=Y&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: function
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: elseif
"><?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) . '&lang=' . LANGUAGE_ID . '&ID=' . $IBLOCK_ID . '&admin=Y&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 {