$this->addElement('checkbox',
'is_online_registration',
- ts('Allow Online Registration?'),
+ ts('Allow Online Registration'),
NULL,
array(
'onclick' => "return showHideByValue('is_online_registration',
$form->addWysiwyg('footer_text', ts('Footer Text'), $footerAttribs);
extract( self::getProfileSelectorTypes() );
+ //CRM-15427
+ $form->addProfileSelector( 'custom_pre_id', ts('Include Profile') . '<br />' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
+ $form->addProfileSelector( 'custom_post_id', ts('Include Profile') . '<br />' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
- $form->addProfileSelector( 'custom_pre_id', ts('Include Profile') . '<br />' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities);
- $form->addProfileSelector( 'custom_post_id', ts('Include Profile') . '<br />' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities);
-
- $form->addProfileSelector( 'additional_custom_pre_id', ts('Profile for Additional Participants') . '<br />' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities);
- $form->addProfileSelector( 'additional_custom_post_id', ts('Profile for Additional Participants') . '<br />' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities);
+ $form->addProfileSelector( 'additional_custom_pre_id', ts('Profile for Additional Participants') . '<br />' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
+ $form->addProfileSelector( 'additional_custom_post_id', ts('Profile for Additional Participants') . '<br />' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
}
/**
extract( ( is_null($configs) ) ? self::getProfileSelectorTypes() : $configs );
$element = $prefix . "custom_post_id_multiple[$count]";
$label .= '<br />'.ts('(bottom of page)');
- $form->addProfileSelector( $element, $label, $allowCoreTypes, $allowSubTypes, $profileEntities);
+ $form->addProfileSelector( $element, $label, $allowCoreTypes, $allowSubTypes, $profileEntities, TRUE);
}
/**
$configs['allowCoreTypes'][] = 'Contact';
$configs['allowCoreTypes'][] = 'Individual';
$configs['allowCoreTypes'][] = 'Participant';
-
+ //CRM-15427
+ $id = CRM_Utils_Request::retrieve( 'id' , 'Integer' );
+ if ($id) {
+ $participantEventType = CRM_Core_DAO::getFieldValue("CRM_Event_DAO_Event", $id, 'event_type_id', 'id');
+ $participantRole = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_Event', $id, 'default_role_id');
+ $configs['allowSubTypes']['ParticipantEventName'] = array($id);
+ $configs['allowSubTypes']['ParticipantEventType'] = array($participantEventType);
+ $configs['allowSubTypes']['ParticipantRole'] = array($participantRole);
+ }
$configs['profileEntities'][] = array('entity_name' => 'contact_1', 'entity_type' => 'IndividualModel');
- $configs['profileEntities'][] = array('entity_name' => 'participant_1', 'entity_type' => 'ParticipantModel');
+ $configs['profileEntities'][] = array('entity_name' => 'participant_1', 'entity_type' => 'ParticipantModel', 'entity_sub_type' => '*');
return $configs;
}
if (!empty($params['additional_custom_post_id_multiple'])) {
$additionalPostMultiple = array();
foreach ($params['additional_custom_post_id_multiple'] as $key => $value) {
- if (!$value && !empty($params['custom_post_id'])) {
+ if (is_null($value) && !empty($params['custom_post_id'])) {
$additionalPostMultiple[$key] = $params['custom_post_id'];
}
elseif ($value == 'none') {