$tabControl->Begin(array(
	"FORM_ACTION" => $strFormAction,
));

$tabControl->BeginNextFormTab();
	if($ID > 0 && !$bSubCopy):
		$p = CIblockElement::GetByID($ID);
		$pr = $p->ExtractFields("prn_");
	endif;
$tabControl->AddCheckBoxField("SUB_ACTIVE", GetMessage("IBLOCK_FIELD_ACTIVE").":", false, "Y", $str_ACTIVE=="Y");

if ($arTranslit["TRANSLITERATION"] == "Y")
{
	$tabControl->BeginCustomField("SUB_NAME", GetMessage("IBLOCK_FIELD_NAME").":", true);
	?><tr id="tr_SUB_NAME">
	<td><?echo $tabControl->GetCustomLabelHTML()?></td>
	<td style="white-space: nowrap;">
		<input type="text" size="50" name="SUB_NAME" id="SUB_NAME" maxlength="255" value="<?echo $str_NAME?>"><image id="sub_name_link" title="<?echo GetMessage("IBEL_E_LINK_TIP")?>" class="linked" src="/bitrix/themes/.default/icons/iblock/<?if($bLinked) echo 'link.gif'; else echo 'unlink.gif';?>" onclick="set_linked()" />
	</td>
</tr><?
	$tabControl->EndCustomField("SUB_NAME", '<input type="hidden" name="SUB_NAME" id="SUB_NAME" value="'.$str_NAME.'">');

	$tabControl->BeginCustomField("SUB_CODE", GetMessage("IBLOCK_FIELD_CODE").":", $arIBlock["FIELDS"]["CODE"]["IS_REQUIRED"] === "Y");
	?><tr id="tr_SUB_CODE">
	<td><?echo $tabControl->GetCustomLabelHTML()?></td>
	<td style="white-space: nowrap;">
		<input type="text" size="50" name="SUB_CODE" id="SUB_CODE" maxlength="255" value="<?echo $str_CODE?>"><image id="sub_code_link" title="<?echo GetMessage("IBEL_E_LINK_TIP")?>" class="linked" src="/bitrix/themes/.default/icons/iblock/<?if($bLinked) echo 'link.gif'; else echo 'unlink.gif';?>" onclick="set_linked()" />
	</td>
</tr><?
	$tabControl->EndCustomField("SUB_CODE", '<input type="hidden" name="SUB_CODE" id="SUB_CODE" value="'.$str_CODE.'">');
}
Example #2
0
    $tabControl->EndEpilogContent();
    $customTabber->SetErrorState($bVarsFromForm);
    $tabControl->AddTabs($customTabber);
    $strFormAction = CIBlock::GetAdminSubElementEditLink($IBLOCK_ID, $intProductID, $ID > 0 && !$bSubCopy ? $ID : 0, array('WF' => $WF, 'find_section_section' => (int) $find_section_section), '', !BX_SUB_SETTINGS);
    $tabControl->Begin(array("FORM_ACTION" => $strFormAction));
    $tabControl->BeginNextFormTab();
    if ($ID > 0 && !$bSubCopy) {
        $p = CIblockElement::GetByID($ID);
        $pr = $p->ExtractFields("prn_");
    }
    $tabControl->AddCheckBoxField("SUB_ACTIVE", GetMessage("IBLOCK_FIELD_ACTIVE") . ":", false, "Y", $str_ACTIVE == "Y");
    $tabControl->BeginCustomField("SUB_ACTIVE_FROM", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_FROM"), $arIBlock["FIELDS"]["ACTIVE_FROM"]["IS_REQUIRED"] === "Y");
    ?>
<tr id="tr_SUB_ACTIVE_FROM">
	<td><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
:</td>
	<td><?php 
    echo CAdminCalendar::CalendarDate("SUB_ACTIVE_FROM", $str_ACTIVE_FROM, 19, true);
    ?>
</td>
</tr>
<?php 
    $tabControl->EndCustomField("SUB_ACTIVE_FROM", '<input type="hidden" id="SUB_ACTIVE_FROM" name="SUB_ACTIVE_FROM" value="' . $str_ACTIVE_FROM . '">');
    $tabControl->BeginCustomField("SUB_ACTIVE_TO", GetMessage("IBLOCK_FIELD_ACTIVE_PERIOD_TO"), $arIBlock["FIELDS"]["ACTIVE_TO"]["IS_REQUIRED"] === "Y");
    ?>
<tr id="tr_SUB_ACTIVE_TO">
	<td><?php 
    echo $tabControl->GetCustomLabelHTML();
    ?>
	?>
	<input type="hidden" name="DISCOUNT_ID" value="<? echo $intDiscountID; ?>">
	<input type="hidden" name="MULTI" value="<? echo ($boolMulti ? 'Y' : 'N');?>">
	<input type="hidden" name="TMP_ID" value="<?echo htmlspecialcharsbx($strSubTMP_ID)?>"><?
	$tabControl->EndEpilogContent();
	$tabControl->Begin(array(
		"FORM_ACTION" => '/bitrix/admin/cat_subcoupon_edit.php?lang='.LANGUAGE_ID,
	));

	$tabControl->BeginNextFormTab();
		if ($ID > 0)
			$tabControl->AddViewField('ID','ID:',$ID,false);
		$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',
			'<input type="hidden" name="ONE_TIME" value="'.htmlspecialcharsbx($arCoupon['ONE_TIME']).'">'
		);
		$tabControl->BeginCustomField('COUPON', GetMessage("DSC_CPN_CODE").':', true);