remove snippet refs now we have moved the payment form & custom data form out of...
authorEileen McNaughton <eileen@fuzion.co.nz>
Mon, 29 Jun 2015 06:15:56 +0000 (18:15 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Mon, 29 Jun 2015 06:15:56 +0000 (18:15 +1200)
CRM/Event/Form/Registration/Register.php

index 94450cce6eeb79933c8f698ec8068050e126d004..07ab16b89bc270885ac0738e6b7325afd1d17253 100644 (file)
@@ -66,7 +66,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
   public $_skipDupeRegistrationCheck = FALSE;
 
   public $_paymentProcessorID;
-  public $_snippet;
 
   /**
    * @var boolean determines if fee block should be shown or hidden
@@ -99,9 +98,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
     $this->_noFees = (($eventFull || $this->_requireApproval) && !$this->_allowConfirmation);
     $this->_paymentProcessors = $this->_noFees ? array() : $this->get('paymentProcessors');
     $this->preProcessPaymentOptions();
-    if ($this->_snippet) {
-      return;
-    }
 
     $this->_allowWaitlist = FALSE;
     if ($eventFull && !$this->_allowConfirmation && !empty($this->_values['event']['has_waitlist'])) {
@@ -140,11 +136,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
    * @return void
    */
   public function setDefaultValues() {
-    if ($this->_paymentProcessorID && $this->_snippet && !($this->_paymentProcessor['billing_mode'] & CRM_Core_Payment::BILLING_MODE_FORM)) {
-      // see function comment block for explanation of this. Note that CRM-15555 will require this to look at the billing form fields not the
-      // billing_mode which
-      return;
-    }
     $this->_defaults = array();
     $contactID = $this->getContactID();
     $billingDefaults = $this->getProfileDefaults('Billing', $contactID);
@@ -165,10 +156,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
       $this->_defaults["billing_state_province_id-{$this->_bltID}"] = $config->defaultContactStateProvince;
     }
 
-    if ($this->_snippet) {
-      return $this->_defaults;
-    }
-
     if ($contactID) {
       $fields = array();
 
@@ -335,10 +322,6 @@ class CRM_Event_Form_Registration_Register extends CRM_Event_Form_Registration {
     }
 
     CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
-    // Return if we are in an ajax callback
-    if ($this->_snippet) {
-      return;
-    }
 
     $contactID = $this->getContactID();
     if ($contactID) {