<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.4 |
+ | CiviCRM version 4.5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2013 |
+ | Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2013
+ * @copyright CiviCRM LLC (c) 2004-2014
* $Id$
*
*/
*/
class CRM_Custom_Page_Field extends CRM_Core_Page {
+ public $useLivePageJS = TRUE;
+
/**
* The group id of the field
*
),
CRM_Core_Action::DISABLE => array(
'name' => ts('Disable'),
- 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomField' . '\',\'' . 'enable-disable' . '\',0,\'CustomField\' );"',
- 'ref' => 'disable-action',
+ 'ref' => 'crm-enable-disable',
'title' => ts('Disable Custom Field'),
),
CRM_Core_Action::ENABLE => array(
'name' => ts('Enable'),
- 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomField' . '\',\'' . 'disable-enable' . '\',0,\'CustomField\' );"',
- 'ref' => 'enable-action',
+ 'ref' => 'crm-enable-disable',
'title' => ts('Enable Custom Field'),
),
CRM_Core_Action::EXPORT => array(
'name' => ts('Move'),
'url' => 'civicrm/admin/custom/group/field/move',
+ 'class' => 'small-popup',
'qs' => 'reset=1&fid=%%id%%',
'title' => ts('Move Custom Field'),
),
$groupTitle = CRM_Core_BAO_CustomGroup::getTitle($this->_gid);
$this->assign('gid', $this->_gid);
$this->assign('groupTitle', $groupTitle);
- CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+ if ($action & CRM_Core_Action::BROWSE) {
+ CRM_Utils_System::setTitle(ts('%1 - Custom Fields', array(1 => $groupTitle)));
+ }
}
// assign vars to templates
$this->preview($id);
}
else {
- CRM_Core_Resources::singleton()->addScriptFile('civicrm', 'js/crm.livePage.js');
$this->browse();
}