$session = CRM_Core_Session::singleton();
$session->pushUserContext($url);
- $breadCrumb = array(array('title' => ts('CiviCRM Profile Fields'),
+ $breadCrumb = array(array(
+ 'title' => ts('CiviCRM Profile Fields'),
'url' => $url,
));
CRM_Utils_System::appendBreadCrumb($breadCrumb);
$ids['uf_field'] = $this->_id;
}
-
$name = NULL;
if (isset($params['field_name'][1]) && isset($this->_selectFields[$params['field_name'][1]])) {
// we dont get a name for a html formatting element
foreach ($groupFields as $groupField) {
// if it is a phone
- if ($groupField['where'] == $whereCheck && is_null($groupField['location_type_id']) && $groupField['field_id'] != $fieldID) {
+ if ($groupField['where'] == $whereCheck && is_null($groupField['location_type_id']) && $groupField['field_id'] != $fieldID) {
$primaryOfSameTypeFound = $groupField['title'];
break;
}
$this->add('text', 'title', ts('Profile Name'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'title'), TRUE);
$this->add('textarea', 'description', ts('Description'), CRM_Core_DAO::getAttribute('CRM_Core_DAO_UFGroup', 'description'));
-
//add checkboxes
$uf_group_type = array();
$UFGroupType = CRM_Core_SelectValues::ufGroupTypes();
$name = CRM_Utils_String::munge($title, '_', 56);
$name .= $self->_id ? '_' . $self->_id : '';
$query = 'select count(*) from civicrm_uf_group where ( name like %1 ) and id != %2';
- $pCnt = CRM_Core_DAO::singleValueQuery($query, array(1 => array($name, 'String'),
- 2 => array((int)$self->_id, 'Integer'),
+ $pCnt = CRM_Core_DAO::singleValueQuery($query, array(
+ 1 => array($name, 'String'),
+ 2 => array((int) $self->_id, 'Integer'),
));
if ($pCnt) {
$errors['title'] = ts('Profile \'%1\' already exists in Database.', array(1 => $title));
'url' => 'civicrm/profile/create',
'qs' => 'gid=%%id%%&reset=1',
'title' => ts('Use Profile-Create Mode'),
- 'fe' => true,
+ 'fe' => TRUE,
),
CRM_Core_Action::BASIC => array(
'name' => ts('Use Profile-Listings Mode'),
'url' => 'civicrm/profile',
'qs' => 'gid=%%id%%&reset=1',
'title' => ts('Use Profile-Listings Mode'),
- 'fe' => true,
+ 'fe' => TRUE,
),
CRM_Core_Action::DISABLE => array(
'name' => ts('Disable'),
$typeName = 'Activity';
$valueLabels = CRM_Core_PseudoConstant::ActivityType(TRUE, TRUE, FALSE, 'label', TRUE);
break;
+
case 'CaseType':
$typeName = 'Case';
$valueLabels = CRM_Case_PseudoConstant::caseType();
$availableFields
);
break;
+
case 'OrganizationModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Organization',
$availableFields
);
break;
+
case 'HouseholdModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Household',
$availableFields
);
break;
+
case 'ActivityModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Activity',
$availableFields
);
break;
+
case 'ContributionModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Contribution',
$availableFields
);
break;
+
case 'MembershipModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Membership',
$availableFields
);
break;
+
case 'ParticipantModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Participant',
$availableFields
);
break;
+
case 'CaseModel':
$civiSchema[$entityType] = self::convertCiviModelToBackboneModel(
'Case',
$availableFields
);
break;
+
default:
throw new CRM_Core_Exception("Unrecognized entity type: $entityType");
}
continue 2;
}
break;
+
default:
if ($field['field_type'] != $extends) {
continue 2;