本文整理汇总了PHP中CAdminForm::AddCheckBoxField方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminForm::AddCheckBoxField方法的具体用法?PHP CAdminForm::AddCheckBoxField怎么用?PHP CAdminForm::AddCheckBoxField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminForm
的用法示例。
在下文中一共展示了CAdminForm::AddCheckBoxField方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialcharsbx
$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');
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("COMPANY_ACTIVE"), false, 'Y', $fields['ACTIVE'] == 'Y');
$tabControl->AddEditField("NAME", GetMessage("COMPANY_NAME"), true, array(), htmlspecialcharsbx($fields['NAME']));
$tabControl->BeginCustomField('LOCATIONS', GetMessage("COMPANY_LOCATION_ID"));
if ($saleModulePermissions >= 'W') {
?>
<tr>
<td><strong><?php
echo GetMessage("COMPANY_LOCATION_ID");
?>
</strong></td>
<td>
<?php
$APPLICATION->IncludeComponent("bitrix:sale.location.selector." . \Bitrix\Sale\Location\Admin\LocationHelper::getWidgetAppearance(), "", array("ID" => "", "CODE" => $fields['LOCATION_ID'], "INPUT_NAME" => "LOCATION_ID", "PROVIDE_LINK_BY" => "code", "SHOW_ADMIN_CONTROLS" => 'Y', "SELECT_WHEN_SINGLE" => 'N', "FILTER_BY_SITE" => 'Y', "FILTER_SITE_ID" => Application::getInstance()->getContext()->getSite(), "SHOW_DEFAULT_LOCATIONS" => 'N', "SEARCH_BY_PRIMARY" => 'Y'), false);
?>
</td>
</tr>
示例2: while
$curVal = "";
while ($arProperties = $dbProperties->Fetch()) {
$curVal = $userProfile[$ID]["VALUES"][IntVal($arProperties["ID"])];
$fieldValue = $curVal != "" ? $curVal : $arProperties["DEFAULT_VALUE"];
if (IntVal($arProperties["PROPS_GROUP_ID"]) != $propertyGroupID) {
$tabControl->AddSection("SECTION_" . $arProperties["PROPS_GROUP_ID"], $arProperties["GROUP_NAME"]);
}
$shure = false;
if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y") {
$shure = true;
}
/*fields*/
if ($arProperties["TYPE"] == "TEXT") {
$tabControl->AddEditField("CODE_" . IntVal($arProperties["ID"]), $arProperties["NAME"] . ":", $shure, array("size" => 30, "maxlength" => 255), $fieldValue);
} elseif ($arProperties["TYPE"] == "CHECKBOX") {
$tabControl->AddCheckBoxField("CODE_" . IntVal($arProperties["ID"]), $arProperties["NAME"] . ":", $shure, "Y", $fieldValue);
} elseif ($arProperties["TYPE"] == "SELECT") {
$tabControl->BeginCustomField("CODE_" . IntVal($arProperties["ID"]), $arProperties["NAME"], $shure);
?>
<tr<?php
$shure ? " class=\"adm-detail-required-field\"" : "";
?>
>
<td width="40%">
<?php
echo htmlspecialcharsbx($arProperties["NAME"]);
?>
:
</td>
<td width="60%">
<select name="<?php
示例3: bitrix_sessid_post
echo LANGUAGE_ID;
?>
">
<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;
}
示例4: array
?>
</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'];
}
$discountName .= '<input type="hidden" name="DISCOUNT_ID" value="' . $coupon['DISCOUNT_ID'] . '">';
$control->AddViewField('DISCOUNT_ID', Loc::getMessage('BX_SALE_DISCOUNT_COUPON_FIELD_DISCOUNT'), $discountName, true);
} elseif (!$subWindow) {
$discountList = array();
$discountIterator = Internals\DiscountTable::getList(array('select' => array('ID', 'NAME'), 'filter' => array('=ACTIVE' => 'Y'), 'order' => array('SORT' => 'ASC', 'NAME' => 'ASC')));
while ($discount = $discountIterator->fetch()) {
$discount['ID'] = (int) $discount['ID'];
$discount['NAME'] = (string) $discount['NAME'];
$discountList[$discount['ID']] = '[' . $discount['ID'] . ']' . ($discount['NAME'] !== '' ? ' ' . $discount['NAME'] : '');
}
示例5: GetMessage
}
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>
<td width="60%" id="td_ONE_TIME_VALUE">
<select name="ONE_TIME" size="3">
<?
foreach ($arTypeList as $typeID => $typeName)
{
?><option value="<? echo $typeID; ?>"<? echo ($typeID == $arCoupon['ONE_TIME'] ? ' selected' : ''); ?>><? echo $typeName; ?></option><?
}
?>
</select>
</td>
</tr><?
$tabControl->EndCustomField('ONE_TIME',
示例6: array
$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");
?>
<tr id="tr_ACTIVE_FROM">
<td><?echo $tabControl->GetCustomLabelHTML()?>:</td>
<td><?echo CAdminCalendar::CalendarDate("ACTIVE_FROM", $str_ACTIVE_FROM, 19, true)?></td>
</tr>
<?
$tabControl->EndCustomField("ACTIVE_FROM", '<input type="hidden" id="ACTIVE_FROM" name="ACTIVE_FROM" value="'.$str_ACTIVE_FROM.'">');
$tabControl->BeginCustomField("ACTIVE_TO", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_TO"), $arIBlock["FIELDS"]["ACTIVE_TO"]["IS_REQUIRED"] === "Y");
?>
<tr id="tr_ACTIVE_TO">
<td><?echo $tabControl->GetCustomLabelHTML()?>:</td>
<td><?echo CAdminCalendar::CalendarDate("ACTIVE_TO", $str_ACTIVE_TO, 19, true)?></td>
</tr>
示例7: GetMessage
if ($arUser) {
echo " (" . $arUser["LOGIN"] . ") " . $arUser["NAME"] . " " . $arUser["LAST_NAME"];
}
}
?>
</td>
</tr>
<?php
}
?>
<?php
$tabControl->EndCustomField("TIMESTAMP_X", '');
?>
<?php
$tabControl->AddCheckBoxField("ACTIVE", GetMessage("IBSEC_E_ACTIVE"), false, "Y", $str_ACTIVE == "Y");
$tabControl->BeginCustomField("IBLOCK_SECTION_ID", GetMessage("IBSEC_E_PARENT_SECTION") . ":");
?>
<tr>
<td><?php
echo $tabControl->GetCustomLabelHTML();
?>
</td>
<td>
<?php
$l = CIBlockSection::GetTreeList(array("IBLOCK_ID" => $IBLOCK_ID), array("ID", "NAME", "DEPTH_LEVEL"));
?>
<select name="IBLOCK_SECTION_ID" >
<option value="0"><?php
echo GetMessage("IBLOCK_UPPER_LEVEL");
?>
示例8: jsTypeChanged
</tr>
<tr><td colspan="2" class="rating-table-td rating-component-gap"></td></tr>
</table>
<?php
}
}
}
}
$tabControl2->End();
?>
</td>
</tr>
<?php
$tabControl->EndCustomField("CAT_WHAT_CNT_FORM");
$tabControl->AddSection("CAT_WHAT_NEW_CALC", GetMessage("RATING_EDIT_CAT_WHAT_NEW_CALC"));
$tabControl->AddCheckBoxField("POSITION", GetMessage('RATING_EDIT_FRM_POSITION'), false, "Y", $str_POSITION == 'Y' ? true : false, array());
if ($str_ENTITY_ID == 'USER') {
$tabControl->AddCheckBoxField("AUTHORITY", GetMessage('RATING_EDIT_FRM_AUTHORITY'), false, "Y", $str_AUTHORITY == 'Y' ? true : false, array());
}
if ($ID > 0) {
$tabControl->AddCheckBoxField("NEW_CALC", GetMessage('RATING_EDIT_FRM_NEW_CALC'), false, "Y", false, array());
}
$tabControl->Buttons(array("disabled" => false, "back_url" => $_REQUEST["addurl"] != "" ? $_REQUEST["addurl"] : "rating_list.php?lang=" . LANG));
$tabControl->Show();
$tabControl->ShowWarnings($tabControl->GetName(), $message);
?>
<script language="javascript">
function jsTypeChanged(form_id)
{
var _form = document.forms[form_id];
var _flag = document.getElementById('action');
示例9: array
$tabControl->AddSection("SECTION_".$arProperties["PROPS_GROUP_ID"], $arProperties["GROUP_NAME"]);
$shure = false;
if ($arProperties["REQUIED"] == "Y" || $arProperties["IS_PROFILE_NAME"] == "Y" || $arProperties["IS_LOCATION"] == "Y" || $arProperties["IS_LOCATION4TAX"] == "Y" || $arProperties["IS_PAYER"] == "Y" || $arProperties["IS_ZIP"] == "Y")
$shure = true;
/*fields*/
if ($arProperties["TYPE"] == "TEXT")
{
$tabControl->AddEditField("CODE_".$arProperties["ID"], $arProperties["NAME"].":", $shure, array("size"=>30, "maxlength"=>255), $fieldValue);
}
elseif ($arProperties["TYPE"] == "CHECKBOX")
{
$checked = ($fieldValue == "Y") ? true : false;
$tabControl->AddCheckBoxField("CODE_".$arProperties["ID"], $arProperties["NAME"].":", $shure, "Y", $checked);
}
elseif ($arProperties["TYPE"] == "SELECT")
{
$tabControl->BeginCustomField("CODE_".$arProperties["ID"], $arProperties["NAME"], $shure);
?>
<tr<? ($shure) ? " class=\"adm-detail-required-field\"" : "" ?>>
<td width="40%">
<?echo htmlspecialcharsbx($arProperties["NAME"]);?>:
</td>
<td width="60%">
<select name="<?echo "CODE_".$arProperties["ID"];?>">
<?
$dbVariants = CSaleOrderPropsVariant::GetList(
array("SORT" => "ASC"),
array("ORDER_PROPS_ID" => $arProperties["ID"]),
示例10: htmlspecialcharsbx
{
?><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'])
$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')
));
示例11: array
<td><?echo $tabControl->GetCustomLabelHTML()?></td>
<?if(!$canSelfEdit) $dis = " disabled"?>
<td><?php
echo CSite::SelectBox("LID", $str_LID, "", "", "style=\"width:220px\"" . $dis);
?>
</td>
</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>
示例12: htmlspecialcharsex
<input type="hidden" name="ID" value="<?php
echo $ID;
?>
"><?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