CRM-11864 - qa bug fix - change function to static and fix calls
authormzd <mzd@ginkgostreet.com>
Wed, 30 Apr 2014 19:33:31 +0000 (15:33 -0400)
committermzd <mzd@ginkgostreet.com>
Wed, 30 Apr 2014 19:33:31 +0000 (15:33 -0400)
----------------------------------------
* CRM-11864: Embed form-designer in event and contribution UIs
  https://issues.civicrm.org/jira/browse/CRM-11864

CRM/Event/Form/ManageEvent/Registration.php

index 48ebae2848b987858768a391863312775acb073e..dc7df5b96266a22a015d493dd37a81c7ad409d19 100644 (file)
@@ -323,13 +323,13 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
     // explicit height and width.
     $form->addWysiwyg('footer_text', ts('Footer Text'), array('rows' => 2, 'cols' => 40));
 
-    extract( $this->getProfileSelectorTypes() );
+    extract( self::getProfileSelectorTypes() );
 
     $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, $profileEntitites);
-    $form->addProfileSelector( 'additional_custom_post_id',  ts('Profile for Additional Participants') . '<br />' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntitites);
+    $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);
   }
 
   /**
@@ -343,7 +343,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
    * @param array $configs Optional, for addProfileSelector(), defaults to using getProfileSelectorTypes()
    **/
   function buildMultipleProfileBottom(&$form, $count, $prefix = '', $label = 'Include Profile', $configs = null) {
-    extract( ( is_null($configs) ) ? $this->getProfileSelectorTypes() : $configs ); 
+    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, $profileEntitites);
@@ -354,7 +354,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
    *
    * @return array( 'allowCoreTypes' => array(), 'allowSubTypes' => array(), 'profileEntities' => array() )
    **/
-  function getProfileSelectorTypes() {
+  static function getProfileSelectorTypes() {
     $configs = array(
       'allowCoreTypes' => array(),
       'allowSubTypes' => array(),