$form->add('select', 'group_type', ts('Group Types'), $groupOptions, FALSE,
array('id' => 'group_type', 'multiple' => 'multiple', 'class' => 'crm-select2')
);
- $form->add('hidden','group_search_selected','group');
+ $form->add('hidden', 'group_search_selected', 'group');
}
}
$used_for = CRM_Core_OptionGroup::values('tag_used_for');
$tagsTypes = array();
- $showAllTagTypes = false;
+ $showAllTagTypes = FALSE;
foreach ($used_for as $key => $value) {
//check tags for every type and find if there are any defined
$tags = CRM_Core_BAO_Tag::getTagsUsedFor($key, FALSE, TRUE, NULL);
if (count($tags) && $key != 'civicrm_file' && $key != 'civicrm_contact') {
//if tags exists then add type to display in adv search form help text
$tagsTypes[] = ts($value);
- $showAllTagTypes = true;
+ $showAllTagTypes = TRUE;
}
}
$tagTypesText = implode(" or ", $tagsTypes);
if ($showAllTagTypes) {
$form->add('checkbox', 'all_tag_types', ts('Include tags used for %1', array(1 => $tagTypesText)));
- $form->add('hidden','tag_types_text', $tagTypesText);
+ $form->add('hidden', 'tag_types_text', $tagTypesText);
}
}
//added job title
$form->addElement('text', 'job_title', ts('Job Title'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'job_title'));
-
//added internal ID
$form->addElement('text', 'contact_id', ts('Contact ID'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'id'));
$form->addRule('contact_id', ts('Please enter valid Contact ID'), 'positiveInteger');
'uf_group_id',
ts('Search Views'),
array(
- '0' => ts('- default view -')) + $searchProfiles
+ '0' => ts('- default view -'),
+ ) + $searchProfiles
);
$componentModes = CRM_Contact_Form_Search::getModeSelect();
$form->addElement('select',
'operator',
ts('Search Operator'),
- array('AND' => ts('AND'),
+ array(
+ 'AND' => ts('AND'),
'OR' => ts('OR'),
)
);
$form->addElement('select',
'privacy_operator',
ts('Operator'),
- array('OR' => ts('OR'),
+ array(
+ 'OR' => ts('OR'),
'AND' => ts('AND'),
)
);
list($title, $attributes, $select, $multiSelect) = $v;
if (in_array($name,
- array('street_number', 'street_name', 'street_unit')
- )) {
+ array('street_number', 'street_name', 'street_unit')
+ )) {
if (!$parseStreetAddress) {
continue;
}
$form->addElement('text', 'prox_distance', ts('Find contacts within'), array('class' => 'six'));
$form->addElement('select', 'prox_distance_unit', NULL, array(
'miles' => ts('Miles'),
- 'kilos' => ts('Kilometers')
+ 'kilos' => ts('Kilometers'),
));
$form->addRule('prox_distance', ts('Please enter positive number as a distance'), 'numeric');
}
CRM_Core_Form_Date::buildDateRange($form, 'deceased_date', 1, '_low', '_high', ts('From'), FALSE, FALSE, 'birth');
-
// radio button for is_deceased
$form->addYesNo('is_deceased', ts('Deceased'), TRUE);
}