Example #1
0
        $componentSettings['ENABLE_TAX'] = $productRowSettings['ENABLE_TAX'] ? 'Y' : 'N';
    }
}
ob_start();
$APPLICATION->IncludeComponent('bitrix:crm.product_row.list', '', $componentSettings, false, array('HIDE_ICONS' => 'Y', 'ACTIVE_COMPONENT' => 'Y'));
$sProductsHtml .= ob_get_contents();
ob_end_clean();
unset($componentSettings);
$arResult['FIELDS']['tab_1'][] = array('id' => 'PRODUCT_ROWS', 'name' => GetMessage('CRM_QUOTE_FIELD_PRODUCT_ROWS'), 'colspan' => true, 'type' => 'vertical_container', 'value' => $sProductsHtml);
$arResult['FIELDS']['tab_1'][] = array('id' => 'section_additional', 'name' => GetMessage('CRM_SECTION_ADDITIONAL'), 'type' => 'section');
$arResult['FIELDS']['tab_1'][] = array('id' => 'COMMENTS', 'name' => GetMessage('CRM_QUOTE_FIELD_COMMENTS'), 'params' => array(), 'type' => 'lhe', 'componentParams' => array('inputName' => 'COMMENTS', 'inputId' => 'COMMENTS', 'height' => '180', 'content' => isset($arResult['ELEMENT']['~COMMENTS']) ? $arResult['ELEMENT']['~COMMENTS'] : '', 'bUseFileDialogs' => false, 'bFloatingToolbar' => false, 'bArisingToolbar' => false, 'bResizable' => true, 'bSaveOnBlur' => true, 'toolbarConfig' => array('Bold', 'Italic', 'Underline', 'Strike', 'BackColor', 'ForeColor', 'CreateLink', 'DeleteLink', 'InsertOrderedList', 'InsertUnorderedList', 'Outdent', 'Indent')));
$icnt = count($arResult['FIELDS']['tab_1']);
$CCrmUserType->AddFields($arResult['FIELDS']['tab_1'], $arResult['ELEMENT']['ID'], $arResult['FORM_ID'], $bVarsFromForm, false, false, array('FILE_URL_TEMPLATE' => "/bitrix/components/bitrix/crm.quote.show/show_file.php?ownerId=#owner_id#&fieldName=#field_name#&fileId=#file_id#"));
if (count($arResult['FIELDS']['tab_1']) == $icnt) {
    unset($arResult['FIELDS']['tab_1'][$icnt - 1]);
}
if ($bCopy) {
    $arParams['ELEMENT_ID'] = 0;
    $arFields['ID'] = 0;
    $arResult['ELEMENT']['ID'] = 0;
}
if (!$arResult['ENABLE_WEBDAV']) {
    $arResult['WEBDAV_SELECT_URL'] = $arResult['WEBDAV_UPLOAD_URL'] = $arResult['WEBDAV_SHOW_URL'] = '';
} else {
    $webDavPaths = CCrmWebDavHelper::GetPaths();
    $arResult['WEBDAV_SELECT_URL'] = isset($webDavPaths['PATH_TO_FILES']) ? $webDavPaths['PATH_TO_FILES'] : '';
    $arResult['WEBDAV_UPLOAD_URL'] = isset($webDavPaths['ELEMENT_UPLOAD_URL']) ? $webDavPaths['ELEMENT_UPLOAD_URL'] : '';
    $arResult['WEBDAV_SHOW_URL'] = isset($webDavPaths['ELEMENT_SHOW_INLINE_URL']) ? $webDavPaths['ELEMENT_SHOW_INLINE_URL'] : '';
}
$this->IncludeComponentTemplate();
include_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/components/bitrix/crm.quote/include/nav.php';