Beispiel #1
0
}
$gridManagerID = $arResult['GRID_ID'] . '_MANAGER';
$gridManagerCfg = array('ownerType' => 'EVENT', 'gridId' => $arResult['GRID_ID'], 'formName' => "form_{$arResult['GRID_ID']}", 'allRowsCheckBoxId' => "actallrows_{$arResult['GRID_ID']}", 'activityEditorId' => '', 'serviceUrl' => '', 'filterFields' => array());
$prefix = $arResult['GRID_ID'];
for ($i = 0, $ic = sizeof($arResult['FILTER']); $i < $ic; $i++) {
    $filterID = $arResult['FILTER'][$i]['id'];
    if ($arResult['FILTER'][$i]['type'] === 'user') {
        $dbFilterID = $filterID;
        $filterFieldPrefix = $arResult['FILTER_FIELD_PREFIX'];
        if ($filterFieldPrefix !== '') {
            $dbFilterID = substr($dbFilterID, strlen($filterFieldPrefix));
        }
        $userID = isset($arResult['DB_FILTER'][$dbFilterID]) ? intval(is_array($arResult['DB_FILTER'][$dbFilterID]) ? $arResult['DB_FILTER'][$dbFilterID][0] : $arResult['DB_FILTER'][$dbFilterID]) : 0;
        $userName = $userID > 0 ? CCrmViewHelper::GetFormattedUserName($userID) : '';
        ob_start();
        CCrmViewHelper::RenderUserCustomSearch(array('ID' => "{$prefix}_{$filterID}_SEARCH", 'SEARCH_INPUT_ID' => "{$prefix}_{$filterID}_NAME", 'SEARCH_INPUT_NAME' => "{$filterID}_name", 'DATA_INPUT_ID' => "{$prefix}_{$filterID}", 'DATA_INPUT_NAME' => $filterID, 'COMPONENT_NAME' => "{$prefix}_{$filterID}_SEARCH", 'SITE_ID' => SITE_ID, 'NAME_FORMAT' => $arParams['NAME_TEMPLATE'], 'USER' => array('ID' => $userID, 'NAME' => $userName), 'DELAY' => 100));
        $val = ob_get_clean();
        $arResult['FILTER'][$i]['type'] = 'custom';
        $arResult['FILTER'][$i]['value'] = $val;
        $filterFieldInfo = array('typeName' => 'USER', 'id' => $filterID, 'params' => array('data' => array('paramName' => "{$filterID}", 'elementId' => "{$prefix}_{$filterID}"), 'search' => array('paramName' => "{$filterID}_name", 'elementId' => "{$prefix}_{$filterID}_NAME")));
        $gridManagerCfg['filterFields'][] = $filterFieldInfo;
    }
}
$arResult['GRID_DATA'] = array();
foreach ($arResult['EVENT'] as $arEvent) {
    $arEvent['FILE_HTML'] = "";
    if (!empty($arEvent['FILES'])) {
        $arEvent['FILE_HTML'] = '<div class="event-detail-files"><label class="event-detail-files-title">' . GetMessage('CRM_EVENT_TABLE_FILES') . ':</label><div class="event-detail-files-list">';
        foreach ($arEvent['FILES'] as $key => $value) {
            $arEvent['FILE_HTML'] .= '<div class="event-detail-file"><span class="event-detail-file-number">' . $key . '.</span><span class="event-detail-file-info"><a href="' . htmlspecialcharsbx($value['PATH']) . '" target="_blank" class="event-detail-file-link">' . htmlspecialcharsbx($value['NAME']) . '</a><span class="event-detail-file-size">(' . htmlspecialcharsbx($value['SIZE']) . ')</span></span></div>';
        }
Beispiel #2
0
// PASSWORD -->
$arResult['FIELDS']['tab_config'][] = array('id' => 'PASSWORD', 'name' => GetMessage('CRM_FIELD_MAILBOX_PASSWORD'), 'params' => array('size' => 50), 'type' => 'custom', 'value' => '<input autocomplete="off" type="password" name="PASSWORD" value="' . htmlspecialcharsbx($arSettings['PASSWORD']) . '"/>', 'required' => true);
// <-- PASSWORD
// PERIOD CHECK -->
$arResult['FIELDS']['tab_config'][] = array('id' => 'PERIOD_CHECK', 'name' => GetMessage('CRM_FIELD_MAILBOX_PERIOD_CHECK'), 'params' => array('size' => 5), 'type' => 'text', 'value' => $arSettings['PERIOD_CHECK']);
// <-- PERIOD CHECK
// DELETE_MESSAGES -->
$arResult['FIELDS']['tab_config'][] = array('id' => 'DELETE', 'name' => GetMessage('CRM_FIELD_MAILBOX_DELETE'), 'type' => 'checkbox', 'params' => array('onmouseover' => 'BX.hint(this, \'' . CUtil::JSEscape(GetMessage('CRM_FIELD_MAILBOX_DELETE_HINT')) . '\');', 'onchange' => 'if(!this.checked) return; if(!confirm(\'' . CUtil::JSEscape(GetMessage('CRM_FIELD_MAILBOX_DELETE_CONFIRM')) . '\')) this.checked = false;'), 'value' => $arSettings['DELETE_MESSAGES']);
// <-- DELETE_MESSAGES
$arResult['FIELDS']['tab_config'][] = array('id' => 'section_mail_processing', 'name' => GetMessage('CRM_SECTION_MAIL_PROCESSING'), 'type' => 'section');
// CREATE_LEAD_FOR_NEW_ADDRESSER -->
$arResult['FIELDS']['tab_config'][] = array('id' => 'CREATE_LEAD_FOR_NEW_ADDRESSER', 'name' => GetMessage('CRM_FIELD_CREATE_LEAD_FOR_NEW_ADDRESSER'), 'type' => 'checkbox', 'params' => array('onmouseover' => 'BX.hint(this, \'' . CUtil::JSEscape(GetMessage('CRM_FIELD_CREATE_LEAD_FOR_NEW_ADDRESSER_HINT')) . '\');'), 'value' => $arSettings['CREATE_LEAD_FOR_NEW_ADDRESSER']);
// <-- CREATE_LEAD_FOR_NEW_ADDRESSER
// LEAD_RESPONSIBLE_ID -->
ob_start();
CCrmViewHelper::RenderUserCustomSearch(array('ID' => 'LEAD_RESPONSIBLE', 'SEARCH_INPUT_ID' => 'LEAD_RESPONSIBLE_SEARCH', 'SEARCH_INPUT_HINT' => GetMessage('CRM_FIELD_LEAD_RESPONSIBLE_HINT'), 'DATA_INPUT_ID' => 'LEAD_RESPONSIBLE_ID', 'COMPONENT_NAME' => 'LEAD_RESPONSIBLE', 'NAME_FORMAT' => $arParams['NAME_TEMPLATE'], 'USER' => array('ID' => $arSettings['LEAD_RESPONSIBLE_ID'], 'NAME' => $arSettings['LEAD_RESPONSIBLE_NAME'])));
$userSelectorHtml = ob_get_contents();
ob_end_clean();
$arResult['FIELDS']['tab_config'][] = array('id' => 'LEAD_RESPONSIBLE_ID', 'name' => GetMessage('CRM_FIELD_LEAD_RESPONSIBLE'), 'type' => 'custom', 'value' => $userSelectorHtml);
// <-- LEAD_RESPONSIBLE_ID
$arResult['FIELDS']['tab_config'][] = array('id' => 'section_outgoing_mail_processing', 'name' => GetMessage('CRM_SECTION_OUTGOING_MAIL_PROCESSING'), 'type' => 'section');
// SERVICE_CODE_ALLOCATION -->
$arResult['FIELDS']['tab_config'][] = array('id' => 'SERVICE_CODE_ALLOCATION', 'name' => GetMessage('CRM_FIELD_SERVICE_CODE_ALLOCATION'), 'items' => CCrmEMailCodeAllocation::GetAllDescriptions(), 'type' => 'list', 'value' => CCrmEMailCodeAllocation::GetCurrent(), 'required' => false);
// <-- SERVICE_CODE_ALLOCATION
$arResult['FIELDS']['tab_config'][] = array('id' => 'section_mail_config', 'name' => GetMessage('CRM_SECTION_MAIL_RULES'), 'type' => 'section');
//$arResult['FIELDS']['tab_config'][] = array(
//	'id' => 'section_mail_config2',
//	'name' => GetMessage('CRM_SECTION_MAIL_CONFIG2'),
//	'type' => 'section'
//);
// LEAD REGEX-->