CRM-12872 - Remove print button from search results (except campaign)
[civicrm-core.git] / CRM / Activity / Form / Search.php
index fbc77f0ece2640c919dde6019a973dfe0ebee96e..fbd256f7b01b977a0cd56149a72d11ca3c0a1985 100644 (file)
@@ -57,14 +57,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -150,7 +142,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form {
      * set the button names
      */
     $this->_searchButtonName = $this->getButtonName('refresh');
-    $this->_printButtonName = $this->getButtonName('next', 'print');
     $this->_actionButtonName = $this->getButtonName('next', 'action');
 
     $this->_done = FALSE;
@@ -269,13 +260,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form {
         )
       );
 
-      $this->add('submit', $this->_printButtonName, ts('Print'),
-        array(
-          'class' => 'form-submit',
-          'onclick' => "return checkPerformAction('mark_x', '" . $this->getName() . "', 1);",
-        )
-      );
-
       // need to perform tasks on all or selected items ? using radio_ts(task selection) for it
       $this->addElement('radio', 'radio_ts', NULL, '', 'ts_sel', array('checked' => 'checked'));
       $this->addElement('radio', 'radio_ts', NULL, '', 'ts_all',
@@ -341,7 +325,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form {
     $this->set('queryParams', $this->_queryParams);
 
     $buttonName = $this->controller->getButtonName();
-    if ($buttonName == $this->_actionButtonName || $buttonName == $this->_printButtonName) {
+    if ($buttonName == $this->_actionButtonName) {
       // check actionName and if next, then do not repeat a search, since we are going to the next page
       // hack, make sure we reset the task values
       $stateMachine = $this->controller->getStateMachine();