Exemplo n.º 1
0
 public static function GetAllDescriptions()
 {
     if (!self::$ALL_DESCRIPTIONS) {
         self::$ALL_DESCRIPTIONS = array(self::None => '', self::Low => GetMessage('CRM_PRIORITY_LOW'), self::Medium => GetMessage('CRM_PRIORITY_MEDIUM'), self::High => GetMessage('CRM_PRIORITY_HIGH'));
     }
     return self::$ALL_DESCRIPTIONS;
 }
Exemplo n.º 2
0
 protected static function getActivityPriorityName($code, $htmlEncode = false)
 {
     $name = CCrmActivityPriority::ResolveDescription($code);
     return $htmlEncode ? htmlspecialcharsbx($name) : $name;
 }
Exemplo n.º 3
0
    ?>
</option>
			<?php 
}
?>
		</select>
	</span>

	<span name="report-filter-value-control-PRIORITY" class="report-filter-vcc">
		<select class="reports-filter-select-small" name="value">
			<option value=""><?php 
echo GetMessage('CRM_REPORT_INCLUDE_ALL');
?>
</option>
			<?php 
$arResult['enumValues']['DIRECTION'] = CCrmActivityPriority::PrepareFilterItems();
?>
			<?php 
foreach ($arResult['enumValues']['DIRECTION'] as $key => $val) {
    ?>
				<option value="<?php 
    echo htmlspecialcharsbx($key);
    ?>
"><?php 
    echo htmlspecialcharsbx($val);
    ?>
</option>
			<?php 
}
?>
		</select>
Exemplo n.º 4
0
 public function processMethodRequest($name, $nameDetails, $arParams, $nav, $server)
 {
     $descriptions = null;
     $name = strtoupper($name);
     if ($name === 'OWNERTYPE') {
         $descriptions = CCrmOwnerType::GetDescriptions(array(CCrmOwnerType::Lead, CCrmOwnerType::Deal, CCrmOwnerType::Contact, CCrmOwnerType::Company));
     } elseif ($name === 'CONTENTTYPE') {
         $descriptions = CCrmContentType::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYTYPE') {
         $descriptions = CCrmActivityType::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYPRIORITY') {
         $descriptions = CCrmActivityPriority::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYDIRECTION') {
         $descriptions = CCrmActivityDirection::GetAllDescriptions();
     } elseif ($name === 'ACTIVITYNOTIFYTYPE') {
         $descriptions = CCrmActivityNotifyType::GetAllDescriptions();
     }
     if (!is_array($descriptions)) {
         return parent::processMethodRequest($name, $nameDetails, $arParams, $nav, $server);
     }
     $result = array();
     foreach ($descriptions as $k => &$v) {
         $result[] = array('ID' => $k, 'NAME' => $v);
     }
     unset($v);
     return $result;
 }
Exemplo n.º 5
0
</option>
			<?php 
}
?>
		</select>
	</div>

	<div class="filter-field filter-field-type chfilter-field-PRIORITY" callback="RTFilter_chooseBoolean">
		<label for="%ID%" class="filter-field-title">%TITLE% "%COMPARE%"</label>
		<select id="%ID%" name="%NAME%" class="filter-dropdown" caller="true">
			<option value=""><?php 
echo GetMessage('CRM_REPORT_INCLUDE_ALL');
?>
</option>
			<?php 
$priorities = CCrmActivityPriority::PrepareFilterItems();
?>
			<?php 
foreach ($priorities as $key => $val) {
    ?>
			<option value="<?php 
    echo htmlspecialcharsbx($key);
    ?>
"><?php 
    echo htmlspecialcharsbx($val);
    ?>
</option>
			<?php 
}
?>
		</select>
Exemplo n.º 6
0
            COption::RemoveOption('crm', '~CRM_ACTIVITY_LIST_CONVERTING_CALENDAR_EVENTS');
        } elseif ($conv === 'RESET_TASK') {
            COption::RemoveOption('crm', '~CRM_ACTIVITY_LIST_CONVERTING_OF_TASKS');
        }
    }
    LocalRedirect(CHTTP::urlDeleteParams($APPLICATION->GetCurPage(), array('conv')));
}
ob_start();
$GLOBALS['APPLICATION']->IncludeComponent('bitrix:crm.entity.selector', '', array('ENTITY_TYPE' => array('LEAD', 'DEAL'), 'INPUT_NAME' => 'REFERENCE', 'INPUT_VALUE' => isset($_REQUEST["{$filterFieldPrefix}REFERENCE"]) ? $_REQUEST["{$filterFieldPrefix}REFERENCE"] : '', 'FORM_NAME' => $arResult['UID'], 'MULTIPLE' => 'N', 'FILTER' => true), false, array('HIDE_ICONS' => 'Y'));
$referenceFilterHtml = ob_get_contents();
ob_end_clean();
ob_start();
$GLOBALS['APPLICATION']->IncludeComponent('bitrix:crm.entity.selector', '', array('ENTITY_TYPE' => array('COMPANY', 'CONTACT'), 'INPUT_NAME' => 'CLIENT', 'INPUT_VALUE' => isset($_REQUEST["{$filterFieldPrefix}CLIENT"]) ? $_REQUEST["{$filterFieldPrefix}CLIENT"] : '', 'FORM_NAME' => $arResult['UID'], 'MULTIPLE' => 'N', 'FILTER' => true), false, array('HIDE_ICONS' => 'Y'));
$clientFilterHtml = ob_get_contents();
ob_end_clean();
$arResult['FILTER'] = array(array('id' => "{$filterFieldPrefix}ID", 'name' => 'ID', 'default' => false), array('id' => "{$filterFieldPrefix}COMPLETED", 'name' => GetMessage('CRM_ACTIVITY_FILTER_COMPLETED'), 'type' => 'list', 'items' => array('Y' => GetMessage('CRM_ACTIVITY_FILTER_ITEM_COMPLETED'), 'N' => GetMessage('CRM_ACTIVITY_FILTER_ITEM_NOT_COMPLETED')), 'params' => array('multiple' => 'Y'), 'default' => true), array('id' => "{$filterFieldPrefix}TYPE_ID", 'name' => GetMessage('CRM_ACTIVITY_FILTER_TYPE_ID'), 'type' => 'list', 'items' => $typeListItems, 'params' => array('multiple' => 'Y'), 'default' => true), array('id' => "{$filterFieldPrefix}PRIORITY", 'name' => GetMessage('CRM_ACTIVITY_FILTER_PRIORITY'), 'type' => 'list', 'items' => CCrmActivityPriority::PrepareFilterItems(), 'params' => array('multiple' => 'Y'), 'default' => true), array('id' => "{$filterFieldPrefix}RESPONSIBLE_ID", 'name' => GetMessage('CRM_ACTIVITY_FILTER_RESPONSIBLE'), 'default' => true, 'enable_settings' => true, 'type' => 'user'), array('id' => "{$filterFieldPrefix}START", 'name' => GetMessage('CRM_ACTIVITY_FILTER_START'), 'default' => false, 'type' => 'date'), array('id' => "{$filterFieldPrefix}END", 'name' => GetMessage('CRM_ACTIVITY_FILTER_END_2'), 'default' => false, 'type' => 'date'), array('id' => "{$filterFieldPrefix}DEADLINE", 'name' => GetMessage('CRM_ACTIVITY_FILTER_DEADLINE'), 'default' => true, 'type' => 'date'), array('id' => "{$filterFieldPrefix}CREATED", 'name' => GetMessage('CRM_ACTIVITY_FILTER_CREATED'), 'default' => true, 'type' => 'date'));
if ($displayReference) {
    $arResult['FILTER'][] = array('id' => "{$filterFieldPrefix}REFERENCE", 'name' => GetMessage('CRM_ACTIVITY_COLUMN_REFERENCE'), 'default' => true, 'type' => 'custom', 'value' => $referenceFilterHtml);
}
if ($displayClient) {
    $arResult['FILTER'][] = array('id' => "{$filterFieldPrefix}CLIENT", 'name' => GetMessage('CRM_ACTIVITY_COLUMN_CLIENT'), 'default' => true, 'type' => 'custom', 'value' => $clientFilterHtml);
}
$arResult['FILTER_PRESETS'] = array('not_completed' => array('name' => GetMessage('CRM_PRESET_NOT_COMPLETED'), 'fields' => array("{$filterFieldPrefix}COMPLETED" => array('selN' => 'N'), "{$filterFieldPrefix}RESPONSIBLE_ID_name" => $currentUserName, "{$filterFieldPrefix}RESPONSIBLE_ID" => $currentUserID)), 'completed' => array('name' => GetMessage('CRM_PRESET_COMPLETED'), 'fields' => array("{$filterFieldPrefix}COMPLETED" => array('selY' => 'Y'), "{$filterFieldPrefix}RESPONSIBLE_ID_name" => $currentUserName, "{$filterFieldPrefix}RESPONSIBLE_ID" => $currentUserID)), 'not_completed_all' => array('name' => GetMessage('CRM_PRESET_NOT_COMPLETED_ALL'), 'fields' => array("{$filterFieldPrefix}COMPLETED" => array('selN' => 'N'))), 'completed_all' => array('name' => GetMessage('CRM_PRESET_COMPLETED_ALL'), 'fields' => array("{$filterFieldPrefix}COMPLETED" => array('selY' => 'Y'))));
// HACK: for clear filter by RESPONSIBLE_ID
if ($_SERVER['REQUEST_METHOD'] === 'GET') {
    $filterItemID = "{$filterFieldPrefix}RESPONSIBLE_ID";
    $filterItemName = "{$filterFieldPrefix}RESPONSIBLE_ID_name";
    if (isset($_REQUEST[$filterItemName]) && $_REQUEST[$filterItemName] === '') {
        $_REQUEST[$filterItemID] = $_GET[$filterItemID] = array();
    }
}