$element->freeze();
}
- $csElement = $form->addSelect('status_id', array(), TRUE);
+ $csElement = $form->add('select', 'status_id', ts('Case Status'),
+ CRM_Case_PseudoConstant::caseStatus(),
+ FALSE
+ );
+
if ($form->_caseStatusId) {
$csElement->freeze();
}
* @return array - array reference of all case statues
* @static
*/
- public static function caseStatus($column = 'label', $onlyActive = TRUE) {
+ public static function caseStatus($column = 'label', $onlyActive = TRUE, $condition = NULL) {
$cacheKey = "{$column}_" . (int)$onlyActive;
+ if (!$condition) {
+ $condition = 'AND filter = 0';
+ }
+
if (!isset(self::$caseStatus[$cacheKey])) {
self::$caseStatus[$cacheKey] = CRM_Core_OptionGroup::values('case_status',
- FALSE, FALSE, FALSE, NULL,
+ FALSE, FALSE, FALSE, $condition,
$column, $onlyActive
);
}