/** * Get the action links for this page. * * @return array * array of action links that we need to display for the browse screen */ public function &actionLinks() { if (!isset(self::$_actionLinks)) { self::$_actionLinks = array(CRM_Core_Action::UPDATE => array('name' => ts('Edit Field'), 'url' => 'civicrm/admin/custom/group/field/update', 'qs' => 'action=update&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Edit Custom Field')), CRM_Core_Action::BROWSE => array('name' => ts('Edit Multiple Choice Options'), 'url' => 'civicrm/admin/custom/group/field/option', 'qs' => 'reset=1&action=browse&gid=%%gid%%&fid=%%id%%', 'title' => ts('List Custom Options')), CRM_Core_Action::PREVIEW => array('name' => ts('Preview Field Display'), 'url' => 'civicrm/admin/custom/group/field', 'qs' => 'action=preview&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Preview Custom Field')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable Custom Field')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), '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')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/custom/group/field', 'qs' => 'action=delete&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Delete Custom Field'))); } return self::$_actionLinks; }
/** * Get the action links for this page. * * @param null * * @return array array of action links that we need to display for the browse screen * @access public */ function &actionLinks() { if (!isset(self::$_actionLinks)) { $deleteExtra = ts('Are you sure you want to delete this custom data field?'); self::$_actionLinks = array(CRM_Core_Action::UPDATE => array('name' => ts('Edit Field'), 'url' => 'civicrm/admin/custom/group/field', 'qs' => 'action=update&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Edit Custom Field')), CRM_Core_Action::BROWSE => array('name' => ts('Edit Multiple Choice Options'), 'url' => 'civicrm/admin/custom/group/field/option', 'qs' => 'reset=1&action=browse&gid=%%gid%%&fid=%%id%%', 'title' => ts('List Custom Options')), CRM_Core_Action::PREVIEW => array('name' => ts('Preview Field Display'), 'url' => 'civicrm/admin/custom/group/field', 'qs' => 'action=preview&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Preview Custom Field')), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomField' . '\',\'' . 'enable-disable' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable Custom Field')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_CustomField' . '\',\'' . 'disable-enable' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable Custom Field')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/custom/group/field', 'qs' => 'action=delete&reset=1&gid=%%gid%%&id=%%id%%', 'title' => ts('Delete Custom Field'), 'extra' => 'onclick = "return confirm(\'' . $deleteExtra . '\');"')); } return self::$_actionLinks; }