> </td>
		</tr>
		<?php 
    }
    $MAX_NEW_ID = 0;
    if (isset($arProperty['VALUES']) && is_array($arProperty['VALUES'])) {
        foreach ($arProperty['VALUES'] as $intKey => $arListValue) {
            $arPropInfo = array('ID' => $intKey, 'XML_ID' => $arListValue['XML_ID'], 'VALUE' => $arListValue['VALUE'], 'SORT' => 0 < intval($arListValue['SORT']) ? intval($arListValue['SORT']) : '500', 'DEF' => 'Y' == $arListValue['DEF'] ? 'Y' : 'N', 'MULTIPLE' => $arProperty['MULTIPLE']);
            echo __AddListValueRow($intKey, $arPropInfo);
        }
        $MAX_NEW_ID = sizeof($arProperty['VALUES']);
    }
    for ($i = $MAX_NEW_ID; $i < $MAX_NEW_ID + DEF_LIST_VALUE_COUNT; $i++) {
        $intKey = 'n' . $i;
        $arPropInfo = array('ID' => $intKey, 'XML_ID' => '', 'VALUE' => '', 'SORT' => '500', 'DEF' => 'N', 'MULTIPLE' => $arProperty['MULTIPLE']);
        echo __AddListValueRow($intKey, $arPropInfo);
    }
    ?>
		</table>
		<div style="width: 100%; text-align: center; margin: 10px 0;">
			<input class="adm-btn-big" type="button" id="propedit_add_btn" name="propedit_add" value="<?php 
    echo GetMessage("BT_ADM_IEP_PROP_LIST_MORE");
    ?>
">
		</div>
		<input type="hidden" name="PROPERTY_CNT" id="PROPERTY_CNT" value="<?php 
    echo $MAX_NEW_ID + DEF_LIST_VALUE_COUNT;
    ?>
">
		</td>
</tr><?php 
Exemple #2
0
        $customFieldHTML .= "\t\t" . '<tr>' . PHP_EOL . "\t\t\t" . '<td class="bx-left" colspan="4" style="text-align: center;">' . GetMessage("CRM_PRODUCT_PE_PROP_LIST_DEFAULT_NO") . '</td>' . PHP_EOL . "\t\t\t" . '<td class="bx-right" style="text-align:center"><input type="radio" name="PROPERTY_VALUES_DEF" value="0" ' . ($boolDef ? ' checked' : '') . '> </td>' . PHP_EOL . "\t\t" . '</tr>' . PHP_EOL;
    }
    $MAX_NEW_ID = 0;
    if (isset($arProperty['VALUES']) && is_array($arProperty['VALUES'])) {
        foreach ($arProperty['VALUES'] as $intKey => $arListValue) {
            $arPropInfo = array('ID' => $intKey, 'XML_ID' => $arListValue['XML_ID'], 'VALUE' => $arListValue['VALUE'], 'SORT' => 0 < intval($arListValue['SORT']) ? intval($arListValue['SORT']) : '500', 'DEF' => 'Y' == $arListValue['DEF'] ? 'Y' : 'N', 'MULTIPLE' => $arProperty['MULTIPLE']);
            $customFieldHTML .= __AddListValueRow($intKey, $arPropInfo);
        }
        $MAX_NEW_ID = sizeof($arProperty['VALUES']);
    }
    $arResult['MAX_NEW_ID'] = $MAX_NEW_ID;
    $lastRowNum = $MAX_NEW_ID + DEF_LIST_VALUE_COUNT - 1;
    for ($i = $MAX_NEW_ID; $i <= $lastRowNum; $i++) {
        $intKey = 'n' . $i;
        $arPropInfo = array('ID' => $intKey, 'XML_ID' => '', 'VALUE' => '', 'SORT' => '500', 'DEF' => 'N', 'MULTIPLE' => $arProperty['MULTIPLE']);
        $customFieldHTML .= __AddListValueRow($intKey, $arPropInfo);
    }
    $customFieldHTML .= "\t\t" . '</tbody>' . PHP_EOL . "\t" . '</table>' . PHP_EOL . "\t" . '<div style="width: 100%; text-align: center; margin: 10px 0;">' . PHP_EOL . "\t\t" . '<input class="adm-btn-big" type="button" id="propedit_add_btn" name="propedit_add" value="' . GetMessage('CRM_PRODUCT_PE_PROP_LIST_MORE') . '">' . PHP_EOL . "\t" . '</div>' . PHP_EOL . "\t" . '<input type="hidden" name="PROPERTY_CNT" id="PROPERTY_CNT" value="' . ($MAX_NEW_ID + DEF_LIST_VALUE_COUNT) . '">' . PHP_EOL . '</div>' . PHP_EOL;
    $arResult['FIELDS']['tab_params'][] = array('id' => 'PROPERTY_LIST_VALUES', 'name' => GetMessage('CRM_PRODUCT_PE_PROP_LIST_VALUES'), 'value' => $customFieldHTML, 'type' => 'custom');
} else {
    if ("F" == $arProperty['PROPERTY_TYPE']) {
        $bShow = false;
        if ($showKeyExist && in_array('COL_COUNT', $arPropertyFields['SHOW'])) {
            $bShow = true;
        } elseif ($hideKeyExist && in_array('COL_COUNT', $arPropertyFields['HIDE'])) {
            $bShow = false;
        }
        if ($bShow) {
            $arResult['FIELDS']['tab_params'][] = array('id' => 'PROPERTY_COL_COUNT', 'name' => GetMessage('CRM_PRODUCT_PE_PROP_FILE_TYPES_COL_CNT'), 'value' => intval($arProperty['COL_COUNT']), 'type' => 'text', 'params' => array('size' => '2', 'maxlength' => '10'));
        } else {
            if (isset($arPropertyFields["SET"]["COL_COUNT"])) {