本文整理汇总了PHP中CAdminForm::Begin方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminForm::Begin方法的具体用法?PHP CAdminForm::Begin怎么用?PHP CAdminForm::Begin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminForm
的用法示例。
在下文中一共展示了CAdminForm::Begin方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
/**
* {@inheritdoc}
*/
public function show()
{
if (!$this->hasReadRights()) {
$this->addErrors(Loc::getMessage('DIGITALWAND_ADMIN_HELPER_ACCESS_FORBIDDEN'));
$this->showMessages();
return false;
}
$context = new \CAdminContextMenu($this->getMenu());
$context->Show();
$this->tabControl->BeginPrologContent();
$this->showMessages();
$this->showProlog();
$this->tabControl->EndPrologContent();
$this->tabControl->BeginEpilogContent();
$this->showEpilog();
$this->tabControl->EndEpilogContent();
$query = $this->additionalUrlParams;
if (isset($_REQUEST[$this->pk()])) {
$query[$this->pk()] = $_REQUEST[$this->pk()];
} elseif (isset($_REQUEST['SECTION_ID']) && $_REQUEST['SECTION_ID']) {
$model = $this->getModel();
$this->data[$model::getSectionField()] = $_REQUEST['SECTION_ID'];
}
$this->tabControl->Begin(array('FORM_ACTION' => static::getUrl($query)));
foreach ($this->tabs as $tabSettings) {
if ($tabSettings['VISIBLE']) {
$this->showTabElements($tabSettings);
}
}
$this->showEditPageButtons();
$this->tabControl->ShowWarnings('editform', array());
//TODO: дописать
$this->tabControl->Show();
}
示例2: show
/**
* Выводит детальную страницу
* @internal
*/
public function show()
{
$this->fillMenu();
$context = new \CAdminContextMenu($this->menu);
$context->Show();
$this->tabControl->BeginPrologContent();
$this->showMessages();
$this->showProlog();
$this->tabControl->EndPrologContent();
$this->tabControl->BeginEpilogContent();
$this->showEpilog();
$this->tabControl->EndEpilogContent();
$query = $this->additionalUrlParams;
if (isset($_REQUEST[$this->pk()])) {
$query[$this->pk()] = $_REQUEST[$this->pk()];
}
$this->tabControl->Begin(array('FORM_ACTION' => static::getEditPageURL($query)));
foreach ($this->tabs as $tabSettings) {
if ($tabSettings['VISIBLE']) {
$this->showTabElements($tabSettings);
}
}
$this->showEditPageButtons();
$this->tabControl->ShowWarnings('editform', array());
//TODO: дописать
$this->tabControl->Show();
}
示例3: GetFilterHiddens
$tabControl->EndPrologContent();
$tabControl->BeginEpilogContent();
echo GetFilterHiddens("filter_");?>
<input type="hidden" name="Update" value="Y">
<input type="hidden" name="lang" value="<? echo LANGUAGE_ID; ?>">
<input type="hidden" name="ID" value="<? echo $ID; ?>">
<? echo bitrix_sessid_post();
if (!empty($return_url))
{
?><input type="hidden" name="return_url" value="<? echo htmlspecialcharsbx($return_url); ?>"><?
}
$tabControl->EndEpilogContent();
$tabControl->Begin(array(
"FORM_ACTION" => '/bitrix/admin/cat_discount_coupon_edit.php?lang='.LANGUAGE_ID,
));
$tabControl->BeginNextFormTab();
if ($ID > 0 && !$boolCopy)
$tabControl->AddViewField('ID','ID:',$ID,false);
if (!empty($arDiscountList))
{
if (0 < $ID)
{
$tabControl->BeginCustomField("DISCOUNT_ID", GetMessage('DSC_CPN_DISC').':', false);
?><tr id="tr_DISCOUNT_ID" class="adm-detail-required-field">
<td width="40%"><? echo $tabControl->GetCustomLabelHTML(); ?></td>
<td width="60%"><?
if (isset($arDiscountList[$arCoupon['DISCOUNT_ID']]))
{
示例4: GetMessage
<?else:?>
<?if($actionFailure):?>
<?CAdminMessage::ShowMessage(array('MESSAGE' => $actionFailureMessage, 'type' => 'ERROR'))?>
<?endif?>
<?
$topMenu->Show();
$args = array();
if($id)
$args['id'] = $id;
$tabControl->Begin(array(
"FORM_ACTION" => Helper::getEditUrl($args) // generally, it is not safe to leave action empty
));
$tabControl->BeginNextFormTab();
?>
<?$tabControl->BeginCustomField('LOCATIONS', Loc::getMessage('SALE_LOCATION_E_HEADING_LOCATIONS'));?>
<tr>
<tr class="heading">
<td colspan="2">
<?php
echo GetMessage('SALE_LOCATION_E_FLD_LOCATIONS');
?>
</td>
</tr>
示例5: bitrix_sessid_post
else
$str_NAME = $arIBlock["NAME"];
$APPLICATION->SetTitle(GetMessage("CAT_CEDIT_EDIT_TITLE", array("#IBLOCK_NAME#"=>$arIBlock["NAME"])));
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php");
if($strWarning)
CAdminMessage::ShowOldStyleError($strWarning."<br>");
$tabControl->BeginEpilogContent();
echo bitrix_sessid_post();
$tabControl->EndEpilogContent();
$tabControl->Begin(array(
"FORM_ACTION" => "/bitrix/admin/cat_catalog_edit.php?lang=".LANGUAGE_ID."&IBLOCK_ID=".$IBLOCK_ID,
));
$tabControl->BeginNextFormTab();
$tabControl->AddEditField("NAME", GetMessage("IBLOCK_FIELD_NAME").":", true, array("size" => 50, "maxlength" => 255), $str_NAME);
$tabControl->BeginNextFormTab();
$tabControl->BeginCustomField("SECTION_PROPERTY", GetMessage("CAT_CEDIT_SECTION_PROPERTY_FIELD"));
?>
<tr colspan="2"><td align="center">
<table class="internal" id="table_SECTION_PROPERTY">
<tr class="heading">
<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_NAME");?></td>
<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_TYPE");?></td>
<td><?echo GetMessage("CAT_CEDIT_PROP_TABLE_SMART_FILTER");?></td>
示例6: array
<?else:?>
<?if($actionFailure):?>
<?CAdminMessage::ShowMessage(array('MESSAGE' => $actionFailureMessage, 'type' => 'ERROR'))?>
<?endif?>
<?
$topMenu->Show();
$args = array();
if(intval($_REQUEST['parent_id']))
$args['parent_id'] = intval($_REQUEST['parent_id']);
$tabControl->Begin(array(
"FORM_ACTION" => Helper::getEditUrl(intval($_REQUEST[Helper::URL_PARAM_ID]) ? intval($_REQUEST[Helper::URL_PARAM_ID]) : false, $args) // generally, it is not safe to leave action empty
));
$tabControl->BeginNextFormTab();
?>
<?$requiredFld = ' class="adm-detail-required-field"';?>
<?$columns = Helper::getColumns('detail');?>
<?foreach($columns as $code => $field):?>
<?if($code == 'ID' && !$id) continue; // new node or copied ?>
<?if(Helper::checkIsNameField($code)) continue; // we`ll output names in a different manner ?>
<?$value = Helper::makeSafeDisplay($formData[$code], $code);?>
<?$tabControl->BeginCustomField($code, $field['title']);?>
示例7: GetMessage
{
$rsSites = CSite::GetList($by="id", $order="asc", array("ACTIVE" => "Y", "DEF" => "Y"));
$arSite = $rsSites->Fetch();
$LID = $arSite["ID"];
}
$urlForm = "";
if (isset($ID) AND $ID != "")
{
$urlForm = "&ID=".$ID."&LID=".CUtil::JSEscape($LID);
if (!$boolLocked)
CSaleOrder::Lock($ID);
}
$tabControl->Begin(array(
"FORM_ACTION" => $APPLICATION->GetCurPage()."?lang=".LANGUAGE_ID.$urlForm.GetFilterParams("filter_", false)
));
//order tabs
$tabControl->BeginNextFormTab();
$tabControl->AddSection("NEWO_TITLE_STATUS", GetMessage("NEWO_TITLE_STATUS"));
$tabControl->BeginCustomField("ORDER_STATUS", GetMessage("SOE_STATUS"), true);
?>
<tr class="adm-detail-required-field">
<td width="40%"><?php
echo GetMessage("SOE_STATUS");
?>
:</td>
<td width="60%">
示例8: bitrix_sessid_post
$tabControl->EndPrologContent();
$tabControl->BeginEpilogContent();
echo bitrix_sessid_post();
?>
<input type="hidden" name="update" value="Y">
<input type="hidden" name="lang" value="<?php
echo $lang;
?>
">
<input type="hidden" name="ID" value="<?php
echo $id;
?>
">
<?php
$tabControl->EndEpilogContent();
$tabControl->Begin(array("FORM_ACTION" => $APPLICATION->GetCurPage() . "?ID=" . $id . "&lang=" . $lang));
$tabControl->BeginNextFormTab();
$fields = $request->isPost() ? $_POST : $company;
$tabControl->AddViewField("ID", "ID", $company['ID']);
$tabControl->ShowUserFieldsWithReadyData(CompanyTable::getUfId(), $company, false, 'ID');
if ($id > 0) {
$createdBy = htmlspecialcharsbx($company['SALE_INTERNALS_COMPANY_CREATED_LAST_NAME']) . ' ' . htmlspecialcharsbx($company['SALE_INTERNALS_COMPANY_CREATED_NAME']);
$modifiedBy = htmlspecialcharsbx($company['SALE_INTERNALS_COMPANY_CREATED_LAST_NAME']) . ' ' . htmlspecialcharsbx($company['SALE_INTERNALS_COMPANY_CREATED_NAME']);
$tabControl->AddViewField('DATE_CREATE', GetMessage("COMPANY_DATE_CREATE"), $company['DATE_CREATE']);
$tabControl->AddViewField('DATE_MODIFY', GetMessage("COMPANY_DATE_MODIFY"), $company['DATE_MODIFY']);
$tabControl->AddViewField('CREATED_BY', GetMessage("COMPANY_CREATED_BY"), $createdBy);
if (strlen(trim($modifiedBy)) > 0) {
$tabControl->AddViewField('MODIFIED_BY', GetMessage("COMPANY_MODIFIED_BY"), $modifiedBy);
}
}
$tabControl->ShowUserFieldsWithReadyData(CompanyTable::getUfId(), $fields, false, 'ID');
示例9: IntVal
echo IntVal($IBLOCK_SECTION_ID);
?>
">
<input type="hidden" name="TMP_ID" value="<?php
echo IntVal($TMP_ID);
?>
">
<?php
$tabControl->EndEpilogContent();
$customTabber->SetErrorState($bVarsFromForm);
$tabControl->AddTabs($customTabber);
$strFormAction = "/bitrix/admin/" . CIBlock::GetAdminElementEditLink($IBLOCK_ID, null, array("find_section_section" => intval($find_section_section)));
if ($bAutocomplete) {
$strFormAction .= "&lookup=" . urlencode($strLookup);
}
$tabControl->Begin(array("FORM_ACTION" => $strFormAction));
$tabControl->BeginNextFormTab();
?>
<?php
if ($ID > 0 && !$bCopy) {
$p = CIblockElement::GetByID($ID);
$pr = $p->ExtractFields("prn_");
} else {
$pr = array();
}
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("IBLOCK_FIELD_ACTIVE") . ":", false, "Y", $str_ACTIVE == "Y");
$tabControl->BeginCustomField("ACTIVE_FROM", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_FROM"), $arIBlock["FIELDS"]["ACTIVE_FROM"]["IS_REQUIRED"] === "Y");
?>
<tr id="tr_ACTIVE_FROM">
<td><?php
echo $tabControl->GetCustomLabelHTML();
示例10: GetFilterHiddens
?><?echo GetFilterHiddens("filter_");?>
<input type="hidden" name="Update" value="Y">
<input type="hidden" name="lang" value="<?echo LANGUAGE_ID ?>">
<input type="hidden" name="ID" value="<?echo $ID ?>">
<? echo bitrix_sessid_post(); ?><?
if (!empty($return_url))
{
?><input type="hidden" name="return_url" value="<? echo htmlspecialcharsbx($return_url); ?>"><?
}
if ($boolCopy)
{
?><input type="hidden" name="action" value="copy"><?
}
$tabControl->EndEpilogContent();
$tabControl->Begin(array(
"FORM_ACTION" => '/bitrix/admin/cat_discount_edit.php?lang='.urlencode(LANGUAGE_ID),
));
$tabControl->BeginNextFormTab();
if ($ID > 0 && !$boolCopy)
$tabControl->AddViewField('ID','ID:',$ID,false);
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("DSC_ACTIVE").":", false, "Y", $arDiscount['ACTIVE'] == "Y");
$tabControl->AddEditField("NAME", GetMessage("DSC_NAME").":", true, array("size" => 50, "maxlength" => 255), htmlspecialcharsbx($arDiscount['NAME']));
$tabControl->AddDropDownField("SITE_ID", GetMessage('DSC_SITE').':', true, $arSiteList, $arDiscount['SITE_ID']);
$tabControl->BeginCustomField("PERIOD", GetMessage('DSC_PERIOD').":",false);
?><tr id="tr_PERIOD">
<td width="40%"><? echo $tabControl->GetCustomLabelHTML(); ?></td>
<td width="60%"><?
global $ACTIVE_FROM_FILTER_PERIOD;
$ACTIVE_FROM_FILTER_PERIOD = "";
if ('' != $arDiscount['ACTIVE_FROM'] || '' != $arDiscount['ACTIVE_TO'])
示例11: array
}
$jsParams['properties'] = array('name' => 'selectProperties', 'list' => $properties);
/** @var $localization \WS\Tools\Localization */
$localization;
?>
<form method="POST"
action="<?php
echo $APPLICATION->GetCurUri();
?>
"
ENCTYPE="multipart/form-data"
name="apply">
<?php
$form = new CAdminForm('ws_tools_conversion', array(array("DIV" => "edit1", "TAB" => $localization->getDataByPath('title'), "TITLE" => $localization->getDataByPath('title'))));
$form->Begin();
$form->BeginNextFormTab();
$form->BeginCustomField('form', '');
$form->AddSection('section-source', 'Источник');
$form->AddDropDownField('selectTypes', 'Тип Инфоблока', '', array());
$form->AddDropDownField('selectIblocks', 'Инфоблок', '', array());
$form->AddDropDownField('selectProperties', 'Свойство Инфоблока', '', array());
$form->AddSection('section-appointment', 'Назначение');
$form->AddDropDownField('new-type-property-info-block', 'Тип', '', array('L' => 'Список', 'E' => 'Привязка к эементам'));
?>
<div class="adm-info-message">
<span class="required">
Внимание! Пока доступна только конвертация свойств типа 'строка' в тип 'список' и 'привязка к элементу'
</span>
</div>
示例12: htmlspecialcharsbx
">
<input type="hidden" name="ENTITY_ID" value="<?php
echo htmlspecialcharsbx($hlblock['ID']);
?>
">
<input type="hidden" name="lang" value="<?php
echo LANGUAGE_ID;
?>
">
<?php
$tabControl->EndEpilogContent();
?>
<?php
$tabControl->Begin(array("FORM_ACTION" => $APPLICATION->GetCurPage() . "?ENTITY_ID=" . $hlblock['ID'] . "&ID=" . IntVal($ID) . "&lang=" . LANG));
?>
<?php
$tabControl->BeginNextFormTab();
?>
<?php
$tabControl->AddViewField("ID", "ID", !empty($row) ? $row['ID'] : '');
?>
<?php
echo $tabControl->ShowUserFieldsWithReadyData('HLBLOCK_' . $hlblock['ID'], $row, false, 'ID');
?>
<?php
示例13: bitrix_sessid_post
echo bitrix_sessid_post();
?>
<input type="hidden" name="Update" value="Y">
<input type="hidden" name="COPY_ID" value=<?echo $COPY_ID?>>
<?
$tabControl->EndEpilogContent();
$limitUsersCount = $users_cnt = 0;
if($ID <= 0)
{
$users_cnt = CUser::GetActiveUsersCount();
$limitUsersCount = intval(COption::GetOptionInt("main", "PARAM_MAX_USERS", 0));
}
$tabControl->Begin(array(
"FORM_ACTION" => $APPLICATION->GetCurPage()."?ID=".intval($ID)."&lang=".LANG,
"FORM_ATTRIBUTES" => ($ID <= 0 && $limitUsersCount > 0 && $limitUsersCount <= $users_cnt? 'onsubmit="alert(\''.GetMessage("USER_EDIT_WARNING_MAX").'\')"':''),
));
$tabControl->BeginNextFormTab();
$tabControl->AddViewField("LAST_UPDATE", GetMessage('LAST_UPDATE'), ($ID>0 && $COPY_ID<=0? $str_TIMESTAMP_X:''));
$tabControl->AddViewField("LAST_LOGIN", GetMessage('LAST_LOGIN'), ($ID>0 && $COPY_ID<=0? $str_LAST_LOGIN:''));
if(($ID!='1' || $COPY_ID>0) && ($USER->CanDoOperation('view_all_users') || $USER->CanDoOperation('view_own_profile'))):
$tabControl->BeginCustomField("ACTIVE", GetMessage('ACTIVE'));
?>
<tr>
<td><?echo $tabControl->GetCustomLabelHTML()?></td>
<td>
<?if($canSelfEdit):?>
<input type="checkbox" name="ACTIVE" value="Y"<?if($str_ACTIVE=="Y") echo " checked"?>>
示例14: bitrix_sessid_post
if(method_exists($USER_FIELD_MANAGER, 'showscript'))
echo $USER_FIELD_MANAGER->ShowScript();
CAdminCalendar::ShowScript();
$tabControl->EndPrologContent();
$tabControl->BeginEpilogContent();
?>
<?php
echo bitrix_sessid_post();
?>
<input type="hidden" name="Update" value="Y" />
<?
$tabControl->EndEpilogContent();
$tabControl->Begin(array(
"FORM_ACTION" => $APPLICATION->GetCurPage()."?ID=".intval($ID)."&lang=" . LANG
));
if(!function_exists("__drawRowFromField"))
{
function __drawRowFromField(&$tabControl, &$field, $name, $value)
{
if($field instanceof Bitrix\Main\Entity\BooleanField)
{
$tabControl->BeginCustomField($field->getName(), $field->getTitle() . ":", $field->isRequired());
?><tr>
<td width="40%"><? echo $tabControl->GetCustomLabelHTML(); ?></td>
<td><?
if(count(array_intersect($field->getValues(), array("Y", "N"))) == 2)
示例15: intval
<input type="hidden" name="TMP_ID" value="<?echo intval($TMP_ID)?>">
<?
$tabControl->EndEpilogContent();
$customTabber->SetErrorState($bVarsFromForm);
$arEditLinkParams = array(
"find_section_section" => intval($find_section_section)
);
if ($bAutocomplete)
{
$arEditLinkParams['lookup'] = $strLookup;
}
$tabControl->Begin(array(
"FORM_ACTION" => "/bitrix/admin/".CIBlock::GetAdminElementEditLink($IBLOCK_ID, null, $arEditLinkParams)
));
$tabControl->BeginNextFormTab();
if($ID > 0 && !$bCopy)
{
$p = CIblockElement::GetByID($ID);
$pr = $p->ExtractFields("prn_");
}
else
{
$pr = array();
}
$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");
?>