当前位置: 首页>>代码示例>>PHP>>正文


PHP CAdminForm::AddViewField方法代码示例

本文整理汇总了PHP中CAdminForm::AddViewField方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminForm::AddViewField方法的具体用法?PHP CAdminForm::AddViewField怎么用?PHP CAdminForm::AddViewField使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CAdminForm的用法示例。


在下文中一共展示了CAdminForm::AddViewField方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

if ($ID > 0) {
    $urlForm = "&id=" . $ID;
}
$tabControl->Begin(array("FORM_ACTION" => $APPLICATION->GetCurPage() . "?lang=" . LANG . $urlForm));
//TAB EDIT PROFILE
$tabControl->BeginNextFormTab();
if (!empty($arProfile) && !empty($arUser)) {
    $dbPersonType = CSalePersonType::GetList(array(), array("ACTIVE" => "Y", "ID" => $PERSON_TYPE));
    $arPersonType = $dbPersonType->GetNext();
    $LID = $arPersonType["LID"];
    $arFilterProps = array("PERSON_TYPE_ID" => $PERSON_TYPE, "ACTIVE" => "Y");
    if ($saleModulePermissions >= "U" && $saleModulePermissions < "W") {
        $arFilterProps["USER_PROPS"] = "Y";
        $arFilterProps["UTIL"] = "N";
    }
    $tabControl->AddViewField("CODE_USER", GetMessage("BUYER_PE_USER") . ":", "[<a href=\"/bitrix/admin/user_edit.php?ID=" . $arUser["ID"] . "&lang=" . LANGUAGE_ID . "\">" . $arUser["ID"] . "</a>] (" . $arUser["LOGIN"] . ") " . $userFIO);
    $tabControl->AddEditField("CODE_PROFILE_NAME", GetMessage("BUYER_PE_PROFILE_NAME") . ":", false, array("size" => 30, "maxlength" => 255), htmlspecialcharsEx($profileName));
    $propertyGroupID = "";
    $dbProperties = CSaleOrderProps::GetList(array("GROUP_SORT" => "ASC", "PROPS_GROUP_ID" => "ASC", "SORT" => "ASC", "NAME" => "ASC"), $arFilterProps, false, false, array("*"));
    $userProfile = CSaleOrderUserProps::DoLoadProfiles($USER_ID, $PERSON_TYPE);
    $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;
        }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:buyers_profile_edit.php

示例2: array

    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'];
        }
        $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'];
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:discount_coupon_edit.php

示例3: htmlspecialcharsbx

?>
<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');
$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"));
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:company_edit.php

示例4: bitrix_sessid_post

">
<input type="hidden" name="ID" value="<?php 
echo $discountID;
?>
">
<?php 
if ($copy) {
    ?>
<input type="hidden" name="action" value="copy"><?php 
}
echo bitrix_sessid_post();
$control->EndEpilogContent();
$control->Begin(array("FORM_ACTION" => '/bitrix/admin/sale_discount_edit.php?lang=' . LANGUAGE_ID));
$control->BeginNextFormTab();
if ($discountID > 0 && !$copy) {
    $control->AddViewField('ID', 'ID:', $discountID, false);
}
$control->AddCheckBoxField("ACTIVE", GetMessage("SDEN_ACTIVE") . ":", false, "Y", $arDiscount['ACTIVE'] == "Y");
$control->AddDropDownField("LID", GetMessage('SDEN_SITE') . ':', true, $arSiteList, $arDiscount['LID']);
$control->AddEditField("NAME", GetMessage("BT_SALE_DISCOUNT_EDIT_FIELDS_NAME") . ":", false, array("size" => 50, "maxlength" => 255), htmlspecialcharsbx($arDiscount['NAME']));
$control->BeginCustomField("PERIOD", GetMessage('SDEN_PERIOD') . ":", false);
?>
<tr id="tr_PERIOD">
		<td width="40%"><?php 
echo $control->GetCustomLabelHTML();
?>
</td>
		<td width="60%"><?php 
$periodValue = '';
if ('' != $arDiscount['ACTIVE_FROM'] || '' != $arDiscount['ACTIVE_TO']) {
    $periodValue = CAdminCalendar::PERIOD_INTERVAL;
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:discount_edit.php

示例5: bitrix_sessid_post

<input type="hidden" name="Update" value="Y">
<input type="hidden" name="lang" value="<?php 
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']) {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:discount_edit.php

示例6: IntVal

">

	<?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 
$ufields = $USER_FIELD_MANAGER->GetUserFields('HLBLOCK_' . $hlblock['ID']);
$hasSomeFields = !empty($ufields);
?>

	<?php 
$disable = true;
if ($isEditMode) {
    $disable = false;
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:highloadblock_row_edit.php

示例7: intval

$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"?>>
		<?else:?>
			<input type="checkbox" <?if($str_ACTIVE=="Y") echo " checked"?> disabled>
			<input type="hidden" name="ACTIVE" value="<?php 
echo $str_ACTIVE;
?>
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:30,代码来源:user_edit.php

示例8: IntVal

">

	<?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", $row['ID']);
?>

	<?php 
echo $tabControl->ShowUserFields('HLBLOCK_' . $hlblock['ID'], $ID, true);
?>

	<?php 
$ufields = $USER_FIELD_MANAGER->GetUserFields('HLBLOCK_' . $hlblock['ID'], $ID, LANGUAGE_ID);
$hasSomeFields = !empty($ufields);
?>

	<?php 
$disable = true;
if ($isEditMode) {
    $disable = false;
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:highloadblock_row_edit.php

示例9: array

			$tabControl->AddCalendarField($field->getName(), $field->getTitle() . ":", $GLOBALS["str_" . $field->getName()], $field->isRequired());
		}
		else
		{
			$tabControl->AddEditField($field->getName(), $field->getTitle() . ":", $field->isRequired(), array("size" => (in_array($field->getName(), array("SORT", "TIME_LIMIT")) ? 4 : 50), "maxlength" => 255), $GLOBALS["str_" . $field->getName()]);
		}

	}
}


$tabControl->BeginNextFormTab();

if($ID > 0)
{
	$tabControl->AddViewField("ID", "ID:", $ID);

	if(is_set($arEditFields, "TIMESTAMP_X"))
	{
		$field = $arEditFields["TIMESTAMP_X"];
		unset($arEditFields["TIMESTAMP_X"]);

		$tabControl->AddViewField($field->getName(), $field->getTitle() . ":", ${"str_" . $field->getName()});
	}
}

__drawRowFromField($tabControl, $arEditFields["NAME"]);
__drawRowFromField($tabControl, $arEditFields["ACTIVE"]);
__drawRowFromField($tabControl, $arEditFields["SORT"]);
__drawRowFromField($tabControl, $arEditFields["FULL_URL"]);
__drawRowFromField($tabControl, $arEditFields["TIME_LIMIT"]);
开发者ID:alexshipil,项目名称:bitrix.simple.module,代码行数:31,代码来源:settings_edit.php

示例10: intval

?>
<input type="hidden" name="Update" value="Y">
<input type="hidden" name="COPY_ID" value=<?php 
echo $COPY_ID;
?>
>
<?php 
$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("DATE_REGISTER", GetMessage("USER_EDIT_DATE_REGISTER"), $ID > 0 && $COPY_ID <= 0 ? $str_DATE_REGISTER : '');
$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><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
</td>
		<td>
		<?php 
    if ($canSelfEdit) {
        ?>
			<input type="checkbox" name="ACTIVE" value="Y"<?php 
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:user_edit.php


注:本文中的CAdminForm::AddViewField方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。