if (count($operations) <= 1) {
$element->freeze();
}
- $select = $this->addElement('select', "{$fieldName}_value", NULL,
- $field['options'], array(
- 'size' => 4,
- 'style' => 'min-width:250px',
- )
- );
- $select->setMultiple(TRUE);
+ $this->addElement('select', "{$fieldName}_value", NULL, $field['options'], array(
+ 'style' => 'min-width:250px',
+ 'class' => 'crm-select2',
+ 'multiple' => TRUE,
+ 'placeholder' => ts('- select -'),
+ ));
}
break;
}
}
}
+
+ $stateCountryMap[] = array(
+ 'country' => 'country_id_value',
+ 'state_province' => 'state_province_id_value',
+ 'county' => 'county_id_value'
+ );
+ CRM_Core_BAO_Address::addStateCountryMap($stateCountryMap);
+
$this->assign('filters', $filters);
}
if (CRM_Core_Permission::check('administer Reports') && $this->_add2groupSupported) {
$this->addElement('select', 'groups', ts('Group'),
- array('' => ts('- select group -')) + CRM_Core_PseudoConstant::staticGroup()
+ array('' => ts('Add Contacts to Group')) + CRM_Core_PseudoConstant::nestedGroup(),
+ array('class' => 'crm-select2 crm-action-menu action-icon-plus huge')
);
$this->assign('group', TRUE);
}
- $label = ts('Add These Contacts to Group');
- $this->addElement('submit', $this->_groupButtonName, $label, array('onclick' => 'return checkGroup();'));
+ $this->addElement('submit', $this->_groupButtonName, '', array('style' => 'display: none;'));
$this->addChartOptions();
$this->addButtons(array(
'title' => ts('Group'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'group' => TRUE,
- 'options' => CRM_Core_PseudoConstant::group(),
+ 'options' => CRM_Core_PseudoConstant::nestedGroup(),
),
);
if (empty($this->_columns['civicrm_group']['dao'])) {
if (!is_array($value)) {
$value = array($value);
}
-
+
$tmp_membership_org_sql_list = implode(', ', $value);
return " {$this->_aliases['civicrm_contact']}.id {$sqlOp} (
SELECT DISTINCT mem.contact_id
- FROM civicrm_membership mem
+ FROM civicrm_membership mem
LEFT JOIN civicrm_membership_status mem_status ON mem.status_id = mem_status.id
- LEFT JOIN civicrm_membership_type mt ON mem.membership_type_id = mt.id
+ LEFT JOIN civicrm_membership_type mt ON mem.membership_type_id = mt.id
WHERE mt.member_of_contact_id IN (".$tmp_membership_org_sql_list.")
AND mt.is_active = '1'
AND mem_status.is_current_member = '1'
AND mem_status.is_active = '1' ) ";
- }
+ }
function whereMembershipTypeClause($field, $value, $op) {
$sqlOp = $this->getSQLOperator($op);
if (!is_array($value)) {
$value = array($value);
}
-
+
$tmp_membership_sql_list = implode(', ', $value);
return " {$this->_aliases['civicrm_contact']}.id {$sqlOp} (
SELECT DISTINCT mem.contact_id
- FROM civicrm_membership mem
- LEFT JOIN civicrm_membership_status mem_status ON mem.status_id = mem_status.id
- LEFT JOIN civicrm_membership_type mt ON mem.membership_type_id = mt.id
+ FROM civicrm_membership mem
+ LEFT JOIN civicrm_membership_status mem_status ON mem.status_id = mem_status.id
+ LEFT JOIN civicrm_membership_type mt ON mem.membership_type_id = mt.id
WHERE mem.membership_type_id IN (".$tmp_membership_sql_list.")
AND mt.is_active = '1'
AND mem_status.is_current_member = '1'
AND mem_status.is_active = '1' ) ";
}
-
+
/**
* @param string $tableAlias
*/
array('title' => ts('Postal Code Suffix'),
'default' => CRM_Utils_Array::value('postal_code_suffix', $defaults, FALSE),
),
- 'county_id' =>
- array('title' => ts('County'),
- 'default' => CRM_Utils_Array::value('county_id', $defaults, FALSE),
- ),
+ 'country_id' =>
+ array('title' => ts('Country'),
+ 'default' => CRM_Utils_Array::value('country_id', $defaults, FALSE),
+ ),
'state_province_id' =>
array('title' => ts('State/Province'),
'default' => CRM_Utils_Array::value('state_province_id', $defaults, FALSE),
),
- 'country_id' =>
- array('title' => ts('Country'),
- 'default' => CRM_Utils_Array::value('country_id', $defaults, FALSE),
- ),
+ 'county_id' =>
+ array('title' => ts('County'),
+ 'default' => CRM_Utils_Array::value('county_id', $defaults, FALSE),
+ ),
),
'grouping' => 'location-fields',
),
'operator' => 'like',
'name' => 'city',
),
- 'county_id' => array(
- 'name' => 'county_id',
- 'title' => ts('County'),
+ 'country_id' => array(
+ 'name' => 'country_id',
+ 'title' => ts('Country'),
'type' => CRM_Utils_Type::T_INT,
'operatorType' =>
- CRM_Report_Form::OP_MULTISELECT,
+ CRM_Report_Form::OP_MULTISELECT,
'options' =>
- CRM_Core_PseudoConstant::county(),
+ CRM_Core_PseudoConstant::country(),
),
'state_province_id' => array(
'name' => 'state_province_id',
'title' => ts('State/Province'),
'type' => CRM_Utils_Type::T_INT,
'operatorType' =>
- CRM_Report_Form::OP_MULTISELECT,
+ CRM_Report_Form::OP_MULTISELECT,
'options' =>
- CRM_Core_PseudoConstant::stateProvince(),
+ CRM_Core_PseudoConstant::stateProvince(),
),
- 'country_id' => array(
- 'name' => 'country_id',
- 'title' => ts('Country'),
+ 'county_id' => array(
+ 'name' => 'county_id',
+ 'title' => ts('County'),
'type' => CRM_Utils_Type::T_INT,
'operatorType' =>
CRM_Report_Form::OP_MULTISELECT,
'options' =>
- CRM_Core_PseudoConstant::country(),
+ CRM_Core_PseudoConstant::county(),
),
);
}