Skip to content

Commit

Permalink
CRM-19745: Image URL field doesn't show up on CiviEvent Additional Pa…
Browse files Browse the repository at this point in the history
…rticipants Profile
  • Loading branch information
jitendrapurohit authored and Jitendra Purohit committed Jun 21, 2017
1 parent 0337418 commit e780f79
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CRM/Event/BAO/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1667,7 +1667,9 @@ public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$
$htmlType = $dao->html_type;

if ($htmlType == 'File') {
$values[$index] = $params[$index];
$path = CRM_Utils_Array::value('name', $params[$name]);
$fileType = CRM_Utils_Array::value('type', $params[$name]);
$values[$index] = CRM_Utils_File::getFileURL($path, $fileType);
}
else {
if ($dao->data_type == 'Int' ||
Expand Down
7 changes: 5 additions & 2 deletions CRM/Event/Form/Registration/AdditionalParticipant.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function buildQuickForm() {
'post',
) as $keys) {
if (isset($this->_values['additional_custom_' . $keys . '_id'])) {
$this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys), TRUE);
$this->buildCustom($this->_values['additional_custom_' . $keys . '_id'], 'additionalCustom' . ucfirst($keys));
$$keys = CRM_Core_BAO_UFGroup::getFields($this->_values['additional_custom_' . $keys . '_id']);
}
foreach (array(
Expand Down Expand Up @@ -356,7 +356,7 @@ public function buildQuickForm() {
if ($allowToProceed) {
$buttons = array_merge($buttons, array(
array(
'type' => 'next',
'type' => 'upload',
'name' => ts('Continue'),
'spacing' => '                  ',
'isDefault' => TRUE,
Expand Down Expand Up @@ -613,6 +613,9 @@ public function postProcess() {
$params['contact_id'] = CRM_Event_Form_Registration_Register::checkRegistration($params, $this, TRUE, TRUE);
}

if (!empty($params['image_URL'])) {
CRM_Contact_BAO_Contact::processImageParams($params);
}
//carry campaign to partcipants.
if (array_key_exists('participant_campaign_id', $params)) {
$params['campaign_id'] = $params['participant_campaign_id'];
Expand Down

0 comments on commit e780f79

Please sign in to comment.