From: mzd Date: Wed, 30 Apr 2014 19:33:31 +0000 (-0400) Subject: CRM-11864 - qa bug fix - change function to static and fix calls X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b9feacb88024427399d10000b8d45fdd24587df6;p=civicrm-core.git CRM-11864 - qa bug fix - change function to static and fix calls ---------------------------------------- * CRM-11864: Embed form-designer in event and contribution UIs https://issues.civicrm.org/jira/browse/CRM-11864 --- diff --git a/CRM/Event/Form/ManageEvent/Registration.php b/CRM/Event/Form/ManageEvent/Registration.php index 48ebae2848..dc7df5b962 100644 --- a/CRM/Event/Form/ManageEvent/Registration.php +++ b/CRM/Event/Form/ManageEvent/Registration.php @@ -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') . '
' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities); $form->addProfileSelector( 'custom_post_id', ts('Include Profile') . '
' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities); - $form->addProfileSelector( 'additional_custom_pre_id', ts('Profile for Additional Participants') . '
' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntitites); - $form->addProfileSelector( 'additional_custom_post_id', ts('Profile for Additional Participants') . '
' . ts('(bottom of page)'), $allowCoreTypes, $allowSubTypes, $profileEntitites); + $form->addProfileSelector( 'additional_custom_pre_id', ts('Profile for Additional Participants') . '
' . ts('(top of page)'), $allowCoreTypes, $allowSubTypes, $profileEntities); + $form->addProfileSelector( 'additional_custom_post_id', ts('Profile for Additional Participants') . '
' . 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 .= '
'.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(),