*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2013
- * $Id$
*
*/
* This method is used by on-behalf-of form to dynamically generate poulate the
* location field values for selected permissioned contact.
*/
- function getPermissionedLocation() {
+ static function getPermissionedLocation() {
$cid = CRM_Utils_Type::escape($_GET['cid'], 'Integer');
if ($_GET['ufId']) {
$ufId = CRM_Utils_Type::escape($_GET['ufId'], 'Integer');
CRM_Utils_System::civiExit();
}
- function jqState($config) {
- if (!isset($_GET['_value']) ||
+ static function jqState($config) {
+ if (
+ !isset($_GET['_value']) ||
empty($_GET['_value'])
) {
CRM_Utils_System::civiExit();
$result = CRM_Core_PseudoConstant::stateProvinceForCountry($_GET['_value']);
- $elements = array(array('name' => ts('- select a state -'),
+ $elements = array(
+ array('name' => ts('- select a state -'),
'value' => '',
- ));
+ )
+ );
foreach ($result as $id => $name) {
$elements[] = array(
'name' => $name,
CRM_Utils_System::civiExit();
}
- function jqCounty($config) {
+ static function jqCounty($config) {
if (CRM_Utils_System::isNull($_GET['_value'])) {
- $elements = array(array('name' => ts('- select state -'),
- 'value' => '',
- ));
+ $elements = array(
+ array('name' => ts('- select state -'), 'value' => '')
+ );
}
else {
-
$result = CRM_Core_PseudoConstant::countyForState($_GET['_value']);
- $elements = array(array('name' => ts('- select -'),
- 'value' => '',
- ));
+ $elements = array(
+ array('name' => ts('- select -'), 'value' => '')
+ );
foreach ($result as $id => $name) {
$elements[] = array(
'name' => $name,
if ($elements == array(
array('name' => ts('- select -'), 'value' => ''))) {
- $elements = array(array('name' => ts('- no counties -'),
- 'value' => '',
- ));
+ $elements = array(
+ array('name' => ts('- no counties -'), 'value' => '')
+ );
}
}
CRM_Utils_System::civiExit();
}
- function getLocBlock() {
+ static function getLocBlock() {
// i wish i could retrieve loc block info based on loc_block_id,
// Anyway, lets retrieve an event which has loc_block_id set to 'lbid'.
if ($_POST['lbid']) {
* @return None
* @access public
*/
- function buildFriendForm($form) {
+ static function buildFriendForm($form) {
$form->addElement('checkbox', 'tf_is_active', ts('Tell a Friend enabled?'), NULL, array('onclick' => "friendBlock(this)"));
// name
$form->add('text', 'tf_title', ts('Title'), CRM_Core_DAO::getAttribute('CRM_Friend_DAO_Friend', 'title'), TRUE);