本文整理汇总了PHP中CAdminForm::AddDropDownField方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminForm::AddDropDownField方法的具体用法?PHP CAdminForm::AddDropDownField怎么用?PHP CAdminForm::AddDropDownField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminForm
的用法示例。
在下文中一共展示了CAdminForm::AddDropDownField方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CAdminCalendar
</td>
<td width="60%"><?php
$periodValue = '';
$activeFrom = $coupon['COUPON']['ACTIVE_FROM'] instanceof Main\Type\DateTime ? $coupon['COUPON']['ACTIVE_FROM']->toString() : '';
$activeTo = $coupon['COUPON']['ACTIVE_TO'] instanceof Main\Type\DateTime ? $coupon['COUPON']['ACTIVE_TO']->toString() : '';
if ($activeFrom != '' || $activeTo != '') {
$periodValue = CAdminCalendar::PERIOD_INTERVAL;
}
$calendar = new CAdminCalendar();
echo $calendar->CalendarPeriodCustom($prefix . 'ACTIVE_FROM', $prefix . 'ACTIVE_TO', $activeFrom, $activeTo, true, 19, true, array(CAdminCalendar::PERIOD_EMPTY => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_PERIOD_EMPTY'), CAdminCalendar::PERIOD_INTERVAL => Loc::getMessage('BX_SALE_DISCOUNT_COUPON_PERIOD_INTERVAL')), $periodValue);
unset($calendar, $activeTo, $activeFrom, $periodValue);
?>
</td>
</tr><?php
$control->EndCustomField($prefix . 'PERIOD');
$control->AddDropDownField($prefix . 'TYPE', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_TYPE'), true, $couponTypes, $coupon['COUPON']['TYPE']);
$control->AddEditField($prefix . 'MAX_USE', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_MAX_USE'), false, array(), $coupon['COUPON']['MAX_USE'] > 0 ? $coupon['COUPON']['MAX_USE'] : '');
$control->Buttons(false, '');
$control->Show();
?>
<script type="text/javascript">top.BX.WindowManager.Get().adjustSizeEx();</script>
<?php
} else {
if ($couponID > 0 && !$copy) {
$control->AddViewField($prefix . 'ID', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_ID'), $couponID, false);
}
$control->AddCheckBoxField($prefix . 'ACTIVE', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_ACTIVE'), true, array('Y', 'N'), $coupon['ACTIVE'] == 'Y');
if ($couponID > 0) {
$discountName = '<a href="sale_discount_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $coupon['DISCOUNT_ID'] . '">[' . $coupon['DISCOUNT_ID'] . ']</a>';
if ($coupon['DISCOUNT_NAME'] !== '') {
$discountName .= ' ' . $coupon['DISCOUNT_NAME'];
示例2: GetMessage
{
$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']]))
{
echo htmlspecialcharsex($arDiscountList[$arCoupon['DISCOUNT_ID']]);
}
?></td>
</tr><?
$tabControl->EndCustomField('DISCOUNT_ID');
}
else
{
$tabControl->AddDropDownField("DISCOUNT_ID", GetMessage('DSC_CPN_DISC').':', true, $arDiscountList, $arCoupon['DISCOUNT_ID']);
}
}
else
{
$tabControl->BeginCustomField("DISCOUNT_ID", GetMessage('DSC_CPN_DISC').':', true);
?><tr id="tr_DISCOUNT_ID" class="adm-detail-required-field">
<td width="40%"><? echo $tabControl->GetCustomLabelHTML(); ?></td>
<td width="60%"> <a href="/bitrix/admin/cat_discount_edit.php?lang=<? echo LANGUAGE_ID; ?>&return_url=<? echo urlencode($APPLICATION->GetCurPage()."?lang=".LANGUAGE_ID); ?>"><? echo GetMessage('DSC_ADD_DISCOUNT'); ?></a></td>
</tr><?
$tabControl->EndCustomField('DISCOUNT_ID');
}
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("DSC_ACTIVE").":", false, "Y", $arCoupon['ACTIVE'] == "Y");
$tabControl->BeginCustomField('ONE_TIME', GetMessage('DSC_COUPON_TYPE').':', true);
?><tr id="tr_ONE_TIME" class="adm-detail-required-field">
<td width="40%" style="vertical-align: top;"><? echo $tabControl->GetCustomLabelHTML(); ?> <span class="required" style="vertical-align: super; font-size: smaller;">1</span></td>
示例3: bitrix_sessid_post
?>
">
<input type="hidden" name="ID" value="<?php
echo $ID;
?>
">
<?php
echo bitrix_sessid_post();
$tabControl->EndEpilogContent();
$tabControl->Begin(array("FORM_ACTION" => '/bitrix/admin/sale_discount_edit.php?lang=' . LANGUAGE_ID));
$tabControl->BeginNextFormTab();
if ($ID > 0) {
$tabControl->AddViewField('ID', 'ID:', $ID, false);
}
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("SDEN_ACTIVE") . ":", false, "Y", $arDiscount['ACTIVE'] == "Y");
$tabControl->AddDropDownField("LID", GetMessage('SDEN_SITE') . ':', true, $arSiteList, $arDiscount['LID']);
$tabControl->AddEditField("NAME", GetMessage("BT_SALE_DISCOUNT_EDIT_FIELDS_NAME") . ":", false, array("size" => 50, "maxlength" => 255), htmlspecialcharsbx($arDiscount['NAME']));
$tabControl->BeginCustomField("PERIOD", GetMessage('SDEN_PERIOD') . ":", false);
?>
<tr id="tr_PERIOD">
<td width="40%"><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td width="60%"><?php
global $ACTIVE_FROM_FILTER_PERIOD;
$ACTIVE_FROM_FILTER_PERIOD = "";
if ('' != $arDiscount['ACTIVE_FROM'] || '' != $arDiscount['ACTIVE_TO']) {
$ACTIVE_FROM_FILTER_PERIOD = CAdminCalendar::PERIOD_INTERVAL;
}
echo CAdminCalendar::CalendarPeriodCustom("ACTIVE_FROM", "ACTIVE_TO", $arDiscount['ACTIVE_FROM'], $arDiscount['ACTIVE_TO'], true, 19, true, array(CAdminCalendar::PERIOD_EMPTY => GetMessage('BT_SALE_DISCOUNT_EDIT_CALENDARE_PERIOD_EMPTY'), CAdminCalendar::PERIOD_INTERVAL => GetMessage('BT_SALE_DISCOUNT_EDIT_CALENDARE_PERIOD_INTERVAL')));
示例4: GetMessage
}
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'])
$ACTIVE_FROM_FILTER_PERIOD = CAdminCalendar::PERIOD_INTERVAL;
echo CAdminCalendar::CalendarPeriodCustom("ACTIVE_FROM", "ACTIVE_TO", $arDiscount['ACTIVE_FROM'], $arDiscount['ACTIVE_TO'], true, 19, true, array(
CAdminCalendar::PERIOD_EMPTY => GetMessage('BT_CAT_DISCOUNT_EDIT_CALENDARE_PERIOD_EMPTY'),
CAdminCalendar::PERIOD_INTERVAL => GetMessage('BT_CAT_DISCOUNT_EDIT_CALENDARE_PERIOD_INTERVAL')
));
?></td>
</tr><?
示例5: CAdminForm
?>
<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>
<?php
$form->Buttons(array('btnSave' => false));
$form->EndCustomField('form');
$form->Show();
示例6: GetMessage
</tr>
<?
$tabControl->EndCustomField("LID", '<input type="hidden" name="LID" value="'.$str_LID.'">');
$params = array('id="bx_user_info_event"');
if(!$canSelfEdit || $str_EXTERNAL_AUTH_ID <> '')
{
$params[] = "disabled";
}
$tabControl->AddCheckBoxField("user_info_event", GetMessage('INFO_FOR_USER'), false, "Y", ($_REQUEST["user_info_event"]=="Y"), $params);
endif;
if(CTimeZone::Enabled())
{
$tabControl->AddSection("USER_TIME_ZONE", GetMessage("user_edit_time_zones"));
$tabControl->AddDropDownField("AUTO_TIME_ZONE", GetMessage("user_edit_time_zones_auto"), false, array(""=>GetMessage("user_edit_time_zones_auto_def"), "Y"=>GetMessage("user_edit_time_zones_auto_yes"), "N"=>GetMessage("user_edit_time_zones_auto_no")), $str_AUTO_TIME_ZONE, array('onchange="this.form.TIME_ZONE.disabled=(this.value != \'N\')"'));
$tabControl->AddDropDownField("TIME_ZONE", GetMessage("user_edit_time_zones_zones"), false, CTimeZone::GetZones(), $str_TIME_ZONE, ($str_AUTO_TIME_ZONE<>"N"? array('disabled') : array()));
}
?>
<?
if($showGroupTabs):
$tabControl->BeginNextFormTab();
$tabControl->BeginCustomField("GROUP_ID", GetMessage("user_edit_form_groups"));
?>
<tr>
<td colspan="2" align="center">
<table border="0" cellpadding="0" cellspacing="0" class="internal" style="width:80%;">
<tr class="heading">
<td colspan="2"><?echo GetMessage("TBL_GROUP")?></td>
<td><?php
echo GetMessage('TBL_GROUP_DATE');
示例7: htmlspecialcharsex
?>
"><?php
}
if ($boolCopy) {
?>
<input type="hidden" name="action" value="copy"><?php
}
$tabControl->EndEpilogContent();
$tabControl->Begin(array("FORM_ACTION" => '/bitrix/admin/cat_discsave_edit.php?lang=' . urlencode(LANGUAGE_ID)));
$tabControl->BeginNextFormTab();
if ($ID > 0 && !$boolCopy) {
$tabControl->AddViewField('ID', 'ID:', $ID, false);
}
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("BT_CAT_DISC_SAVE_EDIT_FIELDS_ACTIVE") . ":", false, "Y", $str_ACTIVE == "Y");
$tabControl->AddEditField("NAME", GetMessage("BT_CAT_DISC_SAVE_EDIT_FIELDS_NAME") . ":", true, array("size" => 50, "maxlength" => 255), $str_NAME);
$tabControl->AddDropDownField("SITE_ID", GetMessage('BT_CAT_DISC_SAVE_EDIT_FIELDS_SITE_ID') . ':', true, $arSiteList, $str_SITE_ID);
$tabControl->BeginNextFormTab();
$tabControl->AddSection("BT_CAT_DISC_SAVE_EDIT_FIELDS_COUNT", GetMessage("BT_CAT_DISC_SAVE_EDIT_SECTIONS_COUNT"));
$tabControl->BeginCustomField("COUNT", GetMessage('BT_CAT_DISC_SAVE_EDIT_FIELDS_COUNT') . ":", true);
?>
<tr id="tr_COUNT_PERIOD" class="adm-detail-required-field">
<td width="40%"><?php
echo htmlspecialcharsex(GetMessage('BT_CAT_DISC_SAVE_COUNT_TYPE'));
?>
:</td>
<td width="60%"><select name="COUNT_PERIOD" id="COUNT_PERIOD"><?php
foreach ($arCountPeriod as $key => $value) {
?>
<option value="<?php
echo htmlspecialcharsbx($key);
?>
示例8: bitrix_sessid_post
echo bitrix_sessid_post();
if (!empty($return_url)) {
?>
<input type="hidden" name="return_url" value="<?php
echo htmlspecialcharsbx($return_url);
?>
"><?php
}
$tabControl->EndEpilogContent();
$tabControl->Begin(array("FORM_ACTION" => '/bitrix/admin/cat_discount_coupon_edit.php?lang=' . urlencode(LANGUAGE_ID)));
$tabControl->BeginNextFormTab();
if ($ID > 0 && !$boolCopy) {
$tabControl->AddViewField('ID', 'ID:', $ID, false);
}
if (!empty($arDiscountList)) {
$tabControl->AddDropDownField("DISCOUNT_ID", GetMessage('DSC_CPN_DISC') . ':', true, $arDiscountList, $arCoupon['DISCOUNT_ID']);
} else {
$tabControl->BeginCustomField("DISCOUNT_ID", GetMessage('DSC_CPN_DISC') . ':', true);
?>
<tr id="tr_DISCOUNT_ID" class="adm-detail-required-field">
<td width="40%"><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td width="60%"> <a href="/bitrix/admin/cat_discount_edit.php?lang=<?php
echo LANGUAGE_ID;
?>
&return_url=<?php
echo urlencode($APPLICATION->GetCurPage() . "?lang=" . LANGUAGE_ID);
?>
"><?php