/**
  * Отрисовывает вкладку со всеми привязанными к ней полями.
  *
  * @param $tabSettings
  * @internal
  */
 private function showTabElements($tabSettings)
 {
     $this->setContext(AdminEditHelper::OP_SHOW_TAB_ELEMENTS);
     $this->tabControl->BeginNextFormTab();
     foreach ($this->getFields() as $code => $fieldSettings) {
         $widget = $this->createWidgetForField($code, $this->data);
         $fieldTab = $widget->getSettings('TAB');
         $fieldOnCurrentTab = ($fieldTab == $tabSettings['DIV'] or $tabSettings['DIV'] == 'DEFAULT_TAB');
         if (!$fieldOnCurrentTab) {
             continue;
         }
         $fieldSettings = $widget->getSettings();
         if (isset($fieldSettings['VISIBLE']) && $fieldSettings['VISIBLE'] === false) {
             continue;
         }
         $this->tabControl->BeginCustomField($code, $widget->getSettings('TITLE'));
         $pkField = $code == $this->pk();
         $widget->genBasicEditField($pkField);
         $this->tabControl->EndCustomField($code);
     }
 }
Exemple #2
0
    ?>
	<tr>
		<td width="40%"><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
</td>
		<td width="60%"><?php 
    echo $str_ID;
    ?>
</td>
	</tr>
<?php 
}
?>
	<?php 
$tabControl->EndCustomField("ID", '');
?>

	<?php 
$tabControl->BeginCustomField("DATE_CREATE", GetMessage("IBSEC_E_CREATED"));
if ($ID > 0) {
    ?>
		<?php 
    if (strlen($str_DATE_CREATE) > 0) {
        ?>
			<tr>
				<td width="40%"><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
</td>
				<td width="60%"><?php 
Exemple #3
0
				<?
			}
			else
			{
				$arStatusLand = CSaleStatus::GetLangByID($str_STATUS_ID, LANGUAGE_ID);
				echo htmlspecialcharsEx("[".$str_STATUS_ID."] ".$arStatusLand["NAME"]);
			}
			?>
			<input type="hidden" name="user_id" id="user_id" value="<?php 
echo $str_USER_ID;
?>
" onChange="fUserGetProfile(this);" >
		</td>
	</tr>
<?
$tabControl->EndCustomField("ORDER_STATUS");

if ($ID > 0)
{
	$arSitesShop = array();
	$rsSites = CSite::GetList($by="id", $order="asc", array("ACTIVE" => "Y"));
	while ($arSite = $rsSites->Fetch())
	{
		$site = COption::GetOptionString("sale", "SHOP_SITE_".$arSite["ID"], "");
		if ($arSite["ID"] == $site)
		{
			$arSitesShop[$arSite["ID"]] = array("ID" => $arSite["ID"], "NAME" => $arSite["NAME"]);
		}
	}

	if (count($arSitesShop) > 1)
Exemple #4
0
		<?
		$tabControl->EndEpilogContent();

		$tabControl->Begin();

		$tabControl->BeginNextFormTab();

			$tabControl->AddSection("order_id", GetMessage("P_ORDER_ID"));
				$tabControl->BeginCustomField("ORDER_ACCOUNT_NUMBER", GetMessage("SOD_ORDER_ACCOUNT_NUMBER"));
					?>
					<tr>
						<td width="40%"><?echo $tabControl->GetCustomLabelHTML()?>:</td>
						<td width="60%"><?echo $arOrder["ACCOUNT_NUMBER"]?></td>
					</tr>
					<?
				$tabControl->EndCustomField("ORDER_ACCOUNT_NUMBER", '');
				$tabControl->BeginCustomField("ORDER_DATE_CREATE", GetMessage("SOD_ORDER_DATE_CREATE"));
					?>
					<tr>
						<td width="40%"><?echo $tabControl->GetCustomLabelHTML()?>:</td>
						<td width="60%"><?echo $arOrder["DATE_INSERT"]?></td>
					</tr>
					<?
				$tabControl->EndCustomField("ORDER_DATE_CREATE", '');

				$tabControl->BeginCustomField("DATE_UPDATE", GetMessage("SOD_DATE_UPDATE"));
					?>
					<tr>
						<td width="40%"><?echo $tabControl->GetCustomLabelHTML()?>:</td>
						<td width="60%"><?echo $arOrder["DATE_UPDATE"]?></td>
					</tr>
Exemple #5
0
		<td>
			<select name="STATUS">
				<?foreach($status as $key=>$value):?>
					<option value="<?php 
echo $key;
?>
"<?if($block["STATUS"]==$key):?> selected<?endif;?>><?php 
echo $value;
?>
</option>
				<?endforeach;?>
			</select>
		</td>
	</tr>
<?
$tabControl->EndCustomField("field");

$tabControl->Buttons(
	array(
		//"disabled"=>($POST_RIGHT<"W"),
		"back_url"=>"softbalance_callback.php?lang=".LANG,
	)
);

$tabControl->Show();

// дополнительное уведомление об ошибках - вывод иконки около поля, в котором возникла ошибка
$tabControl->ShowWarnings("post_form", $message);
?>

<?php 
		$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']]))
				{
					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%">&nbsp;<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->BeginNextFormTab();
$tabControl->BeginCustomField("USER_NAME", GetMessage("LEARNING_ADMIN_STUDENT"), false);
?>
<tr>
	<td width="40%"><?php 
echo $tabControl->GetCustomLabelHTML();
?>
:</td>
	<td>
		<?php 
echo $arAttempt["USER_NAME"];
?>
	</td>
</tr>
<?php 
$tabControl->EndCustomField("USER_NAME");
$tabControl->BeginCustomField("ANSWERED", GetMessage("LEARNING_ADMIN_ANSWERED"), false);
?>
<tr>
	<td><?php 
echo $tabControl->GetCustomLabelHTML();
?>
:</td>
	<td>
		<input type="checkbox" name="ANSWERED" value="Y"<?php 
if ($str_ANSWERED == "Y") {
    echo " checked";
}
?>
 onclick="OnChangeAnswered(this.checked)">
	</td>
    $tabControl->BeginCustomField('ID', 'ID', false);
    if ($linkedLessonId > 0) {
        ?>
	<tr>
		<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
		<td><?php 
        echo $linkedLessonId;
        ?>
</td>
	</tr>
	<?php 
    }
    $tabControl->EndCustomField('ID');
    ?>
<!-- COURSE_ID -->
<?php 
    $tabControl->BeginCustomField("COURSE_ID", "COURSE_ID", false);
    ?>
	<?php 
    if ($COURSE_ID > 0) {
        ?>
		<tr>
			<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
			<td><?php 
        echo $COURSE_ID;
    ?>
				</select>
				<?php 
} else {
    $arStatusLand = CSaleStatus::GetLangByID($str_STATUS_ID, LANGUAGE_ID);
    echo htmlspecialcharsEx("[" . $str_STATUS_ID . "] " . $arStatusLand["NAME"]);
}
?>
			<input type="hidden" name="user_id" id="user_id" value="<?php 
echo $str_USER_ID;
?>
" onChange="fUserGetProfile(this);" >
		</td>
	</tr>
<?php 
$tabControl->EndCustomField("ORDER_STATUS");
if (IntVal($ID) > 0) {
    $arSitesShop = array();
    $rsSites = CSite::GetList($by = "id", $order = "asc", array("ACTIVE" => "Y"));
    while ($arSite = $rsSites->Fetch()) {
        $site = COption::GetOptionString("sale", "SHOP_SITE_" . $arSite["ID"], "");
        if ($arSite["ID"] == $site) {
            $arSitesShop[$arSite["ID"]] = array("ID" => $arSite["ID"], "NAME" => $arSite["NAME"]);
        }
    }
    if (count($arSitesShop) > 1) {
        $tabControl->BeginCustomField("ORDER_SITE", GetMessage("ORDER_SITE"), true);
        ?>
		<tr>
			<td width="40%">
				<?php 
        }
        $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();
        ?>
:</td>
		<td><?php 
        echo CAdminCalendar::CalendarDate("ACTIVE_FROM", $str_ACTIVE_FROM, 19, true);
        ?>
</td>
	</tr>
<?php 
        $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><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
		<td><?php 
        echo CAdminCalendar::CalendarDate("ACTIVE_TO", $str_ACTIVE_TO, 19, true);
        ?>
</td>
	</tr>

<?php 
        $tabControl->EndCustomField("ACTIVE_TO", '<input type="hidden" id="ACTIVE_TO" name="ACTIVE_TO" value="' . $str_ACTIVE_TO . '">');
$tabControl->BeginCustomField("TITLE", GetMessage("LEARNING_ADMIN_TITLE"), $required = true);
?>
<tr class="adm-detail-required-field">
	<td width="40%"><?php 
echo $tabControl->GetCustomLabelHTML();
?>
:</td>
	<td>
		<input type="text" name="TITLE" size="20" maxlength="255" value="<?php 
echo $str_TITLE;
?>
">
	</td>
</tr>
<?php 
$tabControl->EndCustomField("TITLE");
$tabControl->BeginCustomField("CODE", GetMessage("LEARNING_ADMIN_CODE"), false);
?>
<tr>
	<td width="40%"><?php 
echo $tabControl->GetCustomLabelHTML();
?>
:</td>
	<td>
		<input type="text" name="CODE" size="20" maxlength="50" value="<?php 
echo $str_CODE;
?>
">
	</td>
</tr>
<?php 
					);
					while ($arVariants = $dbVariants->Fetch())
					{
						$selected = "";
						if ($arVariants["VALUE"] == $fieldValue)
							$selected .= " selected";
					?>
						<option <?echo $selected;?> value="<?echo htmlspecialcharsbx($arVariants["VALUE"]);?>"><?echo htmlspecialcharsbx($arVariants["NAME"]);?></option>
					<?
					}
					?>
					</select>
				</td>
			</tr>
			<?
			$tabControl->EndCustomField("CODE_".$arProperties["ID"]);
		}
		elseif ($arProperties["TYPE"] == "MULTISELECT")
		{
			$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 multiple size="5" name="<?echo "CODE_".$arProperties["ID"];?>[]">
					<?
					if (strlen($fieldValue) > 0)
					{
						$curVal = explode(",", $fieldValue);
" <?php 
            if ($code == 'SORT') {
                ?>
size="7"<?php 
            }
            ?>
 />

					<?php 
        }
        ?>

				</td>
			</tr>
		<?php 
        $tabControl->EndCustomField($code, '');
        ?>

	<?php 
    }
    ?>

	<?php 
    $languages = Helper::getLanguageList();
    $nameMap = Helper::getNameMap();
    ?>
	<?php 
    $tabControl->BeginCustomField('NAME', Loc::getMessage('SALE_LOCATION_E_HEADING_NAME_ALL'));
    ?>
	<?php 
    foreach ($languages as $lang) {
	<?php 
if ($ID > 0) {
    ?>
		<tr>
			<td><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
:</td>
			<td><?php 
    echo $str_ID;
    ?>
</td>
		</tr>
	<?php 
}
$tabControl->EndCustomField("ID");
?>
<!-- Timestamp_X -->
<?php 
$tabControl->BeginCustomField("TIMESTAMP_X", GetMessage("LEARNING_LAST_UPDATE"), false);
?>
	<?php 
if ($ID > 0) {
    ?>
		<tr>
			<td><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
:</td>
			<td><?php 
    echo $str_TIMESTAMP_X;
	<?php 
    if ($LESSON_ID > 0) {
        ?>
		<tr>
			<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
			<td><?php 
        echo $str_LESSON_ID;
        ?>
</td>
		</tr>
	<?php 
    }
    $tabControl->EndCustomField("LESSON_ID");
    ?>

<!-- Timestamp_X -->
<?php 
    $tabControl->BeginCustomField("TIMESTAMP_X", GetMessage("LEARNING_LAST_UPDATE"), false);
    ?>
	<?php 
    if ($LESSON_ID > 0) {
        ?>
		<tr>
			<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
			<td><?php 
$form->Begin(array(
    'FORM_ACTION' => $APPLICATION->GetCurUri()
));
$form->BeginNextFormTab();
$form->BeginCustomField('version', 'vv');
?><tr>
    <td width="30%"><?php 
echo $localization->getDataByPath('version');
?>
:</td>
    <td width="60%"><b><?php 
echo \WS\Migrations\Module::getInstance()->getDbVersion();
?>
</b></td>
</tr><?
$form->EndCustomField('version');
$form->BeginCustomField('list', 'vv');
?>
<tr style="color: #1e90ff;">
    <td width="30%"><?php 
echo $localization->getDataByPath('list');
?>
:</td>
    <td width="60%">
<?if($fixes):?>
        <ul>
<?foreach ($fixes as $fixName => $fixCount):?>
            <li><b><?php 
echo $fixName;
?>
</b> [<b><?php 
Exemple #17
0
				?></td>
			</tr>
			<?endwhile?>
			<tr <?echo ($rows == 0)? '': 'style="display:none"';?>>
				<td align="center" colspan="4">
					<?echo GetMessage("CAT_CEDIT_PROP_TABLE_EMPTY")?>
				</td>
			</tr>
			</table>
			<br>
			<select id="shadow_SKU_SECTION_PROPERTY" style="display:none">
			<?foreach($arShadow as $key => $value):?>
				<option value="<?echo htmlspecialcharsex($key)?>"><?echo htmlspecialcharsbx($value)?></option>
			<?endforeach?>
			</select>
			<select id="select_SKU_SECTION_PROPERTY">
			<?foreach($arHidden as $key => $value):?>
				<option value="<?echo htmlspecialcharsex($key)?>"><?echo htmlspecialcharsbx($value)?></option>
			<?endforeach?>
			</select>
			<input type="button" value="<?echo GetMessage("CAT_CEDIT_PROP_TABLE_ACTION_ADD")?>" onclick="javascript:addSectionProperty(<?echo $arCatalog["IBLOCK_ID"];?>, 'select_SKU_SECTION_PROPERTY', 'shadow_SKU_SECTION_PROPERTY', 'table_SKU_SECTION_PROPERTY')">
		</td></tr>
			<?
		}
		?>
	<?
$tabControl->EndCustomField("SECTION_PROPERTY", '');
$tabControl->Buttons(array("disabled"=>false));
$tabControl->Show();
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin.php");
?>
		$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>

<?
$tabControl->EndCustomField("ACTIVE_TO", '<input type="hidden" id="ACTIVE_TO" name="ACTIVE_TO" value="'.$str_ACTIVE_TO.'">');

if($arTranslit["TRANSLITERATION"] == "Y")
{
	$tabControl->BeginCustomField("NAME", GetMessage("IBLOCK_FIELD_NAME").":", true);
	?>
		<tr id="tr_NAME">
		$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>

<?
$tabControl->EndCustomField("ACTIVE_TO", '<input type="hidden" id="ACTIVE_TO" name="ACTIVE_TO" value="'.$str_ACTIVE_TO.'">');

if($arTranslit["TRANSLITERATION"] == "Y")
{
	$tabControl->BeginCustomField("NAME", GetMessage("IBLOCK_FIELD_NAME").":", true);
	?>
		<tr id="tr_NAME">
" ENCTYPE="multipart/form-data" name="apply"><?
    $form = new CAdminForm('ws_maigrations_export', array(
        array(
            "DIV" => "edit1",
            "TAB" => $localization->getDataByPath('title'),
            "ICON" => "iblock",
            "TITLE" => $localization->getDataByPath('title'),
        ) ,
    ));

    $form->Begin(array(
        'FORM_ACTION' => $APPLICATION->GetCurUri()
    ));
    $form->BeginNextFormTab();
    $form->BeginCustomField('version', 'vv');
    ?><tr>
        <td width="30%"><?php 
echo $localization->getDataByPath('version');
?>
:</td>
        <td width="60%"><b><?php 
echo \WS\Migrations\Module::getInstance()->getDbVersion();
?>
</b></td>
    </tr><?
    $form->EndCustomField('version');
    $form->EndTab();
    $form->Buttons(array('btnSave' => false, 'btnÀpply' => true));
    $form->Show();
    ?></form><?
<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')));
?>
</td>
	</tr><?php 
$tabControl->EndCustomField("PERIOD", '<input type="hidden" name="ACTIVE_FROM" value="' . htmlspecialcharsbx($arDiscount['ACTIVE_FROM']) . '">' . '<input type="hidden" name="ACTIVE_TO" value="' . htmlspecialcharsbx($arDiscount['ACTIVE_FROM']) . '">');
$tabControl->AddEditField("PRIORITY", GetMessage("BT_SALE_DISCOUNT_EDIT_FIELDS_PRIORITY") . ":", false, array("size" => 20, "maxlength" => 20), intval($arDiscount['PRIORITY']));
$tabControl->AddEditField("SORT", GetMessage("BT_SALE_DISCOUNT_EDIT_FIELDS_SORT"), false, array('size' => 10, 'maxlength' => 20), intval($arDiscount['SORT']));
$tabControl->BeginCustomField("LAST_DISCOUNT", GetMessage('BT_SALE_DISCOUNT_EDIT_FIELDS_LAST_DISCOUNT') . ":", false);
?>
<tr id="tr_LAST_DISCOUNT">
		<td width="40%"><?php 
echo $tabControl->GetCustomLabelHTML();
?>
</td>
		<td width="60%">
			<input type="hidden" value="N" name="LAST_DISCOUNT">
			<input type="checkbox" value="Y" name="LAST_DISCOUNT" <?php 
echo 'Y' == $arDiscount['LAST_DISCOUNT'] ? 'checked' : '';
?>
>
    ?>
	<tr>
		<td width="40%"><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
</td>
		<td width="60%"><?php 
    echo $str_ID;
    ?>
</td>
	</tr>
<?php 
}
?>
	<?php 
$tabControl->EndCustomField("ID", '');
?>

	<?php 
$tabControl->BeginCustomField("DATE_CREATE", GetMessage("IBSEC_E_CREATED"));
if ($ID > 0) {
    ?>
		<?php 
    if (strlen($str_DATE_CREATE) > 0) {
        ?>
			<tr>
				<td width="40%"><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
</td>
				<td width="60%"><?php 
    ?>
</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'] !== '') {
?>
	<tr style="<?php 
echo count($arObjects) > 1 ? '' : 'display:none';
?>
" class="adm-detail-required-field">
		<td><?php 
echo GetMessage("RATING_EDIT_FRM_TYPE_ID");
?>
</td>
		<td><?php 
echo SelectBoxFromArray("ENTITY_ID", array('reference_id' => $arObjects, 'reference' => $arObjects), $str_ENTITY_ID, "", "onChange=\"jsTypeChanged('rating_form')\"");
?>
</td>
	</tr>
<?php 
$tabControl->EndCustomField("ENTITY_ID");
$tabControl->BeginCustomField("CALCULATION_METHOD", GetMessage('RATING_EDIT_FRM_CALC_METHOD'), true);
$arCalcMethod = array("reference" => array(GetMessage('RATING_EDIT_CALC_METHOD_SUM'), GetMessage('RATING_EDIT_CALC_METHOD_AVG')), "reference_id" => array("SUM", "AVG"));
?>
	<tr class="adm-detail-required-field">
		<td width="40%"><?php 
echo GetMessage("RATING_EDIT_FRM_CALC_METHOD");
?>
</td>
		<td width="60%"><?php 
echo SelectBoxFromArray("CALCULATION_METHOD", $arCalcMethod, $str_CALCULATION_METHOD);
?>
</td>
	</tr>
<?php 
$tabControl->EndCustomField("CALCULATION_METHOD");
Exemple #25
0
    while ($item = $res->fetch()) {
        $path[] = $item['CHAIN'];
    }
    $path = implode(', ', array_reverse($path));
    ?>
	<tr>
		<td><?php 
    echo GetMessage("COMPANY_LOCATION");
    ?>
</td>
		<td><?php 
    echo $path;
    ?>
</td>
	</tr>
<?php 
}
$tabControl->EndCustomField('LOCATIONS', '');
$tabControl->AddEditField("ADDRESS", GetMessage("COMPANY_LOCATION"), false, array(), htmlspecialcharsbx($fields['ADDRESS']));
$tabControl->AddEditField("CODE", GetMessage("COMPANY_CODE"), false, array(), htmlspecialcharsbx($fields['CODE']));
if ($id > 0) {
    $tabControl->AddViewField("XML_ID", GetMessage("COMPANY_XML_ID"), htmlspecialcharsbx($fields['XML_ID']));
} else {
    $tabControl->AddEditField("XML_ID", GetMessage("COMPANY_XML_ID"), false, array(), htmlspecialcharsbx($fields['XML_ID']));
}
$tabControl->Buttons(array("disabled" => $saleModulePermissions < 'W', "back_url" => "sale_company.php?lang=" . $lang));
$tabControl->Show();
?>

<?php 
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
Exemple #26
0
$tabControl->AddEditField("NAME", GetMessage('RATING_RULE_EDIT_FRM_NAME'), true, array("size"=>54, "maxlength"=>255), $str_NAME);

$tabControl->BeginCustomField("ACTIVE", GetMessage('RATING_RULE_EDIT_FRM_ACTIVE'), false);
?>
	<tr>
		<td><?php 
echo GetMessage("RATING_RULE_EDIT_FRM_ACTIVE");
?>
</td>
		<td><?php 
echo InputType("checkbox", "ACTIVE", "Y", $str_ACTIVE);
?>
</td>
	</tr>
<?
$tabControl->EndCustomField("ACTIVE");

$tabControl->BeginCustomField("ENTITY_TYPE_ID", GetMessage('RATING_RULE_EDIT_FRM_TYPE_ID'), true);
$arObjects = CRatingRule::GetRatingRuleObjects();
?>
	<tr style="<?php 
echo count($arObjects) > 1 ? '' : 'display:none';
?>
" class="adm-detail-required-field">
		<td><?php 
echo GetMessage("RATING_RULE_EDIT_FRM_TYPE_ID");
?>
</td>
		<td><?php 
echo SelectBoxFromArray("ENTITY_TYPE_ID", array('reference_id' => $arObjects, 'reference' => $arObjects), $str_ENTITY_TYPE_ID, "", "onChange=\"jsTypeChanged('rating_rule_form')\"");
?>
                ?>
 value="<?php 
                echo htmlspecialcharsbx($arVariants["VALUE"]);
                ?>
"><?php 
                echo htmlspecialcharsbx($arVariants["NAME"]);
                ?>
</option>
					<?php 
            }
            ?>
					</select>
				</td>
			</tr>
			<?php 
            $tabControl->EndCustomField("CODE_" . IntVal($arProperties["ID"]));
        } elseif ($arProperties["TYPE"] == "MULTISELECT") {
            $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 multiple size="5" name="<?php 
					<?else:?>

						<input type="text" name="element[<?php 
echo $code;
?>
]" value="<?php 
echo $value;
?>
" <?if($code == 'SORT'):?>size="7"<?endif?> />

					<?endif?>

				</td>
			</tr>
		<?$tabControl->EndCustomField($code, '');?>

	<?endforeach?>

	<?
	$tabControl->Buttons(array(
		"disabled" => !$userIsAdmin,
		"btnSaveAndAdd" => true,
		"btnApply" => true,
		"btnCancel" => true,
		"back_url" => $returnUrl,
	));

	$tabControl->Show();
	?>
	<?php 
    if ($ID > 0) {
        ?>
		<tr>
			<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
			<td><?php 
        echo $str_ID;
        ?>
</td>
		</tr>
	<?php 
    }
    $tabControl->EndCustomField("ID");
    ?>
<!-- Timestamp_X -->
<?php 
    $tabControl->BeginCustomField("TIMESTAMP_X", GetMessage("LEARNING_LAST_UPDATE"), false);
    ?>
	<?php 
    if ($ID > 0) {
        ?>
		<tr>
			<td><?php 
        echo $tabControl->GetCustomLabelHTML();
        ?>
:</td>
			<td><?php 
        echo $str_TIMESTAMP_X;
	?><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><?
	$tabControl->EndCustomField("PERIOD",
		'<input type="hidden" name="ACTIVE_FROM" value="'.htmlspecialcharsbx($arDiscount['ACTIVE_FROM']).'">'.
		'<input type="hidden" name="ACTIVE_TO" value="'.htmlspecialcharsbx($arDiscount['ACTIVE_FROM']).'">'
	);
	$tabControl->BeginCustomField("VALUE_TYPE", GetMessage('DSC_TYPE').":",true);
	?><tr id="tr_VALUE_TYPE" class="adm-detail-required-field">
		<td width="40%"><? echo $tabControl->GetCustomLabelHTML(); ?></td>
		<td width="60%">
			<select name="VALUE_TYPE" id="ob_value_type"><?
				foreach (CCatalogDiscount::GetDiscountTypes(true) as $key => $value)
				{
					?><option value="<? echo htmlspecialcharsbx($key); ?>"<?if ($arDiscount['VALUE_TYPE'] == $key) echo " selected";?>><? echo htmlspecialcharsex($value); ?></option><?
				}
			?></select>
		</td>
	</tr><?
	$tabControl->EndCustomField("VALUE_TYPE",
		'<input type="hidden" name="VALUE_TYPE" value="'.htmlspecialcharsbx($arDiscount['VALUE_TYPE']).'">'