if ($this->_id) {
$this->assign('participantId', $this->_id);
- $statusId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $this->_id, 'status_id', 'id');
$this->_paymentId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment',
$this->_id, 'id', 'participant_id'
}
$this->assign('participant_status_id', $defaults[$this->_id]['participant_status_id']);
- $roleID = $defaults[$this->_id]['participant_role_id'];
$eventID = $defaults[$this->_id]['event_id'];
$this->_eventTypeId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $eventID, 'event_type_id', 'id');
$this->assign('notificationStatusIds', $notificationStatusIds);
$this->_participantStatuses = CRM_Event_PseudoConstant::participantStatus(NULL, NULL, 'label');
- $this->addSelect('status_id', $checkCancelledJs, TRUE);
+ $this->addSelect('status_id', $checkCancelledJs + array('option_url' => 'civicrm/admin/participant_status'), TRUE);
$enableCart = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::EVENT_PREFERENCES_NAME,
'enable_cart'
$contactID = CRM_Contact_BAO_Contact::createProfileContact($params, $fields, $this->_contactId, NULL, NULL, $ctype);
}
- if ($this->_params['participant_role_id']) {
- foreach ($this->_params['participant_role_id'] as $rkey) {
+ if ($this->_params['role_id']) {
+ foreach ($this->_params['role_id'] as $rkey) {
$customFieldsRole = CRM_Core_BAO_CustomField::getFields('Participant', FALSE, FALSE, $rkey, $this->_roleCustomDataTypeID);
$customFieldsEvent = CRM_Core_BAO_CustomField::getFields('Participant',
FALSE,
}
if ($this->_mode) {
- // add all the additioanl payment params we need
+ // add all the additional payment params we need
$this->_params["state_province-{$this->_bltID}"] = $this->_params["billing_state_province-{$this->_bltID}"] = CRM_Core_PseudoConstant::stateProvinceAbbreviation($this->_params["billing_state_province_id-{$this->_bltID}"]);
$this->_params["country-{$this->_bltID}"] = $this->_params["billing_country-{$this->_bltID}"] = CRM_Core_PseudoConstant::countryIsoCode($this->_params["billing_country_id-{$this->_bltID}"]);
// add participant record
$participants = array();
- if (!empty($this->_params['participant_role_id']) && is_array($this->_params['participant_role_id'])) {
- $this->_params['participant_role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR,
- $this->_params['participant_role_id']
+ if (!empty($this->_params['role_id']) && is_array($this->_params['role_id'])) {
+ $this->_params['role_id'] = implode(CRM_Core_DAO::VALUE_SEPARATOR,
+ $this->_params['role_id']
);
}
$participants[] = CRM_Event_Form_Registration::addParticipant($this->_params, $contactID);
$commonParams = $params;
$commonParams['contact_id'] = $contactID;
if ($commonParams['role_id']) {
- $commonParams['participant_role_id'] = $commonParams['role_id'] = str_replace(',', CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']);
+ $commonParams['role_id'] = $commonParams['role_id'] = str_replace(',', CRM_Core_DAO::VALUE_SEPARATOR, $params['role_id']);
}
else {
$commonParams['role_id'] = 'NULL';