Example #1
0
 /**
  * Get the action links for this page.
  *
  * @param
  *
  * @return array $_actionLinks
  *
  */
 function &actionLinks()
 {
     // check if variable _actionsLinks is populated
     if (!self::$_actionLinks) {
         // helper variable for nicer formatting
         $copyExtra = ts('Are you sure you want to make a copy of this Profile?');
         self::$_actionLinks = array(CRM_Core_Action::BROWSE => array('name' => ts('Fields'), 'url' => 'civicrm/admin/uf/group/field', 'qs' => 'reset=1&action=browse&gid=%%id%%', 'title' => ts('View and Edit Fields')), CRM_Core_Action::UPDATE => array('name' => ts('Settings'), 'url' => 'civicrm/admin/uf/group/update', 'qs' => 'action=update&id=%%id%%&context=group', 'title' => ts('Edit CiviCRM Profile Group')), CRM_Core_Action::PREVIEW => array('name' => ts('Preview'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=preview&id=%%id%%&field=0&context=group', 'title' => ts('Edit CiviCRM Profile Group')), CRM_Core_Action::ADD => array('name' => ts('Use Profile-Create Mode'), 'url' => 'civicrm/profile/create', 'qs' => 'gid=%%id%%&reset=1', 'title' => ts('Use Profile-Create Mode'), 'fe' => true), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFGroup' . '\',\'' . 'enable-disable\',0,\'UFGroup' . '\' );"', 'ref' => 'disable-action', 'title' => ts('Disable CiviCRM Profile Group')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'extra' => 'onclick = "enableDisable( %%id%%,\'' . 'CRM_Core_BAO_UFGroup' . '\',\'' . 'disable-enable\',0,\'UFGroup' . '\' );"', 'ref' => 'enable-action', 'title' => ts('Enable CiviCRM Profile Group')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=delete&id=%%id%%', 'title' => ts('Delete CiviCRM Profile Group')), CRM_Core_Action::PROFILE => array('name' => ts('HTML Form Snippet'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=profile&gid=%%id%%', 'title' => ts('HTML Form Snippet for this Profile')), CRM_Core_Action::COPY => array('name' => ts('Copy Profile'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=copy&gid=%%id%%', 'title' => ts('Make a Copy of CiviCRM Profile Group'), 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"'));
     }
     return self::$_actionLinks;
 }
Example #2
0
 /**
  * Get the action links for this page.
  *
  * @param
  *
  * @return array
  */
 public static function &actionLinks()
 {
     // check if variable _actionsLinks is populated
     if (!self::$_actionLinks) {
         // helper variable for nicer formatting
         $copyExtra = ts('Are you sure you want to make a copy of this Profile?');
         self::$_actionLinks = array(CRM_Core_Action::BROWSE => array('name' => ts('Fields'), 'url' => 'civicrm/admin/uf/group/field', 'qs' => 'reset=1&action=browse&gid=%%id%%', 'title' => ts('View and Edit Fields')), CRM_Core_Action::UPDATE => array('name' => ts('Settings'), 'url' => 'civicrm/admin/uf/group/update', 'qs' => 'action=update&id=%%id%%&context=group', 'title' => ts('Edit CiviCRM Profile Group')), CRM_Core_Action::PREVIEW => array('name' => ts('Preview'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=preview&id=%%id%%&field=0&context=group', 'title' => ts('Edit CiviCRM Profile Group')), CRM_Core_Action::ADD => array('name' => ts('Use - Create Mode'), 'url' => 'civicrm/profile/create', 'qs' => 'gid=%%id%%&reset=1', 'title' => ts('Use - Create Mode'), 'fe' => TRUE), CRM_Core_Action::ADVANCED => array('name' => ts('Use - Edit Mode'), 'url' => 'civicrm/profile/edit', 'qs' => 'gid=%%id%%&reset=1', 'title' => ts('Use - Edit Mode'), 'fe' => TRUE), CRM_Core_Action::BASIC => array('name' => ts('Use - Listings Mode'), 'url' => 'civicrm/profile', 'qs' => 'gid=%%id%%&reset=1', 'title' => ts('Use - Listings Mode'), 'fe' => TRUE), CRM_Core_Action::DISABLE => array('name' => ts('Disable'), 'ref' => 'crm-enable-disable', 'title' => ts('Disable CiviCRM Profile Group')), CRM_Core_Action::ENABLE => array('name' => ts('Enable'), 'ref' => 'crm-enable-disable', 'title' => ts('Enable CiviCRM Profile Group')), CRM_Core_Action::DELETE => array('name' => ts('Delete'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=delete&id=%%id%%', 'title' => ts('Delete CiviCRM Profile Group')), CRM_Core_Action::COPY => array('name' => ts('Copy'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=copy&gid=%%id%%', 'title' => ts('Make a Copy of CiviCRM Profile Group'), 'extra' => 'onclick = "return confirm(\'' . $copyExtra . '\');"'));
         $allowRemoteSubmit = Civi::settings()->get('remote_profile_submissions');
         if ($allowRemoteSubmit) {
             self::$_actionLinks[CRM_Core_Action::PROFILE] = array('name' => ts('HTML Form Snippet'), 'url' => 'civicrm/admin/uf/group', 'qs' => 'action=profile&gid=%%id%%', 'title' => ts('HTML Form Snippet for this Profile'));
         }
     }
     return self::$_actionLinks;
 }