X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FEvent%2FForm%2FParticipantView.php;h=6ad31e9c9f0b6426ce0a5d211d32fad776a934e5;hb=77f9d243755c24497f3ccb9db886752575b968c3;hp=1d07f03e59cca0979bf2df98a880b83d4d6022fd;hpb=5fe22fa0c0431178becb18967f4c17bfcff694bb;p=civicrm-core.git diff --git a/CRM/Event/Form/ParticipantView.php b/CRM/Event/Form/ParticipantView.php index 1d07f03e59..6ad31e9c9f 100644 --- a/CRM/Event/Form/ParticipantView.php +++ b/CRM/Event/Form/ParticipantView.php @@ -100,6 +100,23 @@ class CRM_Event_Form_ParticipantView extends CRM_Core_Form { } $participantStatuses = CRM_Event_PseudoConstant::participantStatus(); + // CRM-20879: Show 'Transfer or Cancel' option beside 'Change fee selection' + // only if logged in user have 'edit event participants' permission and + // participant status is not Cancelled or Transferred + if (CRM_Core_Permission::check('edit event participants') && !in_array($status, array('Cancelled', 'Transferred'))) { + $this->assign('transferOrCancelLink', + CRM_Utils_System::url( + 'civicrm/event/selfsvcupdate', + array( + 'reset' => 1, + 'is_backoffice' => 1, + 'pid' => $participantID, + 'cs' => CRM_Contact_BAO_Contact_Utils::generateChecksum($contactID, NULL, 'inf'), + ) + ) + ); + } + if ($values[$participantID]['is_test']) { $values[$participantID]['status'] .= ' (test) '; }