From: Coleman Watts Date: Thu, 28 Aug 2014 15:19:08 +0000 (+0100) Subject: Event participant form code cleanup X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=01bfdd10a74382a88c8ebd6792442effa03a1835;p=civicrm-core.git Event participant form code cleanup --- diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index ef44f13493..eaacc1b9a5 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -696,39 +696,9 @@ class CRM_Event_Form_Participant extends CRM_Contact_Form_Task { } - if ($this->_single) { - $urlPath = 'civicrm/contact/view/participant'; - $urlParams = "reset=1&cid={$this->_contactId}&context=participant"; - if ($this->_context == 'standalone') { - $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE), TRUE); - $urlParams = 'reset=1&context=standalone'; - $urlPath = 'civicrm/participant/add'; - } - - if ($this->_id) { - $urlParams .= "&action=update&id={$this->_id}"; - } - else { - $urlParams .= "&action=add"; - } - - if ($this->_mode) { - $urlParams .= "&mode={$this->_mode}"; - } - - $url = CRM_Utils_System::url($urlPath, $urlParams, - FALSE, NULL, FALSE - ); + if ($this->_single && $this->_context == 'standalone') { + $this->addEntityRef('contact_id', ts('Contact'), array('create' => TRUE, 'api' => array('extra' => array('email'))), TRUE); } - else { - $currentPath = CRM_Utils_System::currentPath(); - - $url = CRM_Utils_System::url($currentPath, '_qf_Participant_display=true', - FALSE, NULL, FALSE - ); - } - - $this->assign('refreshURL', $url); $eventFieldParams = array( 'entity' => 'event', diff --git a/templates/CRM/Event/Form/EventFees.tpl b/templates/CRM/Event/Form/EventFees.tpl index afff593cd7..a7cc20029a 100644 --- a/templates/CRM/Event/Form/EventFees.tpl +++ b/templates/CRM/Event/Form/EventFees.tpl @@ -204,33 +204,25 @@ {if $context eq 'standalone' and $outBound_option != 2 } {/if}