示例#1
0
        $tabControl->AddSection("IBLOCK_ELEMENT_PROP_VALUE", GetMessage("IBLOCK_ELEMENT_PROP_VALUE"));
        foreach ($PROP as $prop_code => $prop_fields) {
            $prop_values = $prop_fields["VALUE"];
            $tabControl->BeginCustomField("PROPERTY_" . $prop_fields["ID"], $prop_fields["NAME"], $prop_fields["IS_REQUIRED"] === "Y");
            if ($arSubCatalog['SKU_PROPERTY_ID'] != $prop_fields['ID']) {
                ?>
			<tr id="tr_PROPERTY_<?php 
                echo $prop_fields["ID"];
                ?>
">
				<td><?php 
                echo $tabControl->GetCustomLabelHTML();
                ?>
:</td>
				<td><?php 
                _ShowPropertyField('PROP[' . $prop_fields["ID"] . ']', $prop_fields, $prop_fields["VALUE"], $historyId <= 0 && !$bVarsFromForm && $ID <= 0, $bVarsFromForm, 50000, $tabControl->GetFormName());
                ?>
</td>
			</tr>
			<?php 
                $hidden = "";
                if (!is_array($prop_fields["~VALUE"])) {
                    $values = array();
                } else {
                    $values = $prop_fields["~VALUE"];
                }
                $start = 1;
                foreach ($values as $key => $val) {
                    if ($bSubCopy) {
                        $key = "n" . $start;
                        $start++;
	$tabControl->AddEditField("SUB_XML_ID", GetMessage("IBLOCK_FIELD_XML_ID").":", $arIBlock["FIELDS"]["XML_ID"]["IS_REQUIRED"] === "Y", array("size" => 20, "maxlength" => 255), $str_XML_ID);

$tabControl->AddEditField("SUB_SORT", GetMessage("IBLOCK_FIELD_SORT").":", $arIBlock["FIELDS"]["SORT"]["IS_REQUIRED"] === "Y", array("size" => 7, "maxlength" => 10), $str_SORT);

if(!empty($PROP)):
	$tabControl->AddSection("IBLOCK_ELEMENT_PROP_VALUE", GetMessage("IBLOCK_ELEMENT_PROP_VALUE"));
	foreach($PROP as $prop_code=>$prop_fields):
			$prop_values = $prop_fields["VALUE"];
			$tabControl->BeginCustomField("PROPERTY_".$prop_fields["ID"], $prop_fields["NAME"], $prop_fields["IS_REQUIRED"]==="Y");
		if ($arSubCatalog['SKU_PROPERTY_ID'] != $prop_fields['ID'])
		{

			?>
			<tr id="tr_PROPERTY_<?echo $prop_fields["ID"];?>">
				<td><?echo $tabControl->GetCustomLabelHTML();?>:</td>
				<td><?_ShowPropertyField('PROP['.$prop_fields["ID"].']', $prop_fields, $prop_fields["VALUE"], (($historyId <= 0) && (!$bVarsFromForm) && ($ID<=0)), $bVarsFromForm, 50000, $tabControl->GetFormName());?></td>
			</tr>
			<?
			$hidden = "";
			if(!is_array($prop_fields["~VALUE"]))
				$values = array();
			else
				$values = $prop_fields["~VALUE"];
			$start = 1;
			foreach($values as $key=>$val)
			{
				if($bSubCopy)
				{
					$key = "n".$start;
					$start++;
				}