CRM-12872 - Remove print button from search results (except campaign)
authorColeman Watts <coleman@civicrm.org>
Fri, 10 Jan 2014 00:11:07 +0000 (16:11 -0800)
committerColeman Watts <coleman@civicrm.org>
Fri, 24 Jan 2014 06:24:06 +0000 (22:24 -0800)
24 files changed:
CRM/Activity/Form/Search.php
CRM/Activity/StateMachine/Search.php
CRM/Activity/Task.php
CRM/Case/Form/Search.php
CRM/Case/StateMachine/Search.php
CRM/Case/Task.php
CRM/Contact/Form/Search.php
CRM/Contact/StateMachine/Search.php
CRM/Contribute/Form/Search.php
CRM/Contribute/StateMachine/Search.php
CRM/Contribute/Task.php
CRM/Event/Form/Search.php
CRM/Event/StateMachine/Search.php
CRM/Event/Task.php
CRM/Grant/Form/Search.php
CRM/Grant/StateMachine/Search.php
CRM/Grant/Task.php
CRM/Member/Form/Search.php
CRM/Member/StateMachine/Search.php
CRM/Member/Task.php
CRM/Pledge/Form/Search.php
CRM/Pledge/StateMachine/Search.php
CRM/Pledge/Task.php
templates/CRM/common/searchResultTasks.tpl

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();
index 04366f8d7cf53937dae6bada3f04931b4d8dd861..695ad7ca5a1f8fdb0634fcfdbbedb8851d32a8cc 100644 (file)
@@ -77,13 +77,7 @@ class CRM_Activity_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Activity_Task::PRINT_ACTIVITIES;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 503d8bee90528b8adb444e5b3c01b00e613ea051..9d33d265521d11dc784f88aec4a26fc750c01156 100644 (file)
@@ -151,10 +151,7 @@ class CRM_Activity_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Activity task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index 9a1b2e764120583d5fe49f99b6a09952a7c21085..6ef0848616063e474a9fc98c91e229d23667ba17 100644 (file)
@@ -54,14 +54,6 @@ class CRM_Case_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -154,7 +146,6 @@ class CRM_Case_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;
@@ -292,13 +283,6 @@ class CRM_Case_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', array('onclick' => $this->getName() . ".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"));
@@ -368,7 +352,7 @@ class CRM_Case_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
index c9883ff9a6db637cee910dfb85fa2de90bbda303..0245a61ff17dd29f715ec555c9fc807e7b55f6e7 100644 (file)
@@ -81,13 +81,7 @@ class CRM_Case_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Case_Task::PRINT_CASES;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 916ca52dfd17fc18f6157b2d3d7fc41d413d8571..32f4eec0e1ccaecbb42ef3a5c15969bbc6270977 100644 (file)
@@ -110,10 +110,7 @@ class CRM_Case_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Cases task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index 23981363cc08d0a2e206582e04a721960c520112..6c0cf8e12c116cd54b22a19ebd0d72774eb84502 100644 (file)
@@ -116,14 +116,6 @@ class CRM_Contact_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-    /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -602,11 +594,8 @@ class CRM_Contact_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->assign('printButtonName', $this->_printButtonName);
-
     $this->assign('actionButtonName', $this->_actionButtonName);
 
     // reset from session, CRM-3526
@@ -876,7 +865,7 @@ class CRM_Contact_Form_Search extends CRM_Core_Form {
     $this->set('queryParams', $this->_params);
     $this->set('returnProperties', $this->_returnProperties);
 
-    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();
index 6535e98e0a7c1b4f54a1634806e161ca608c7583..d4075b87222e3efbe13748372a60e7065c170f6c 100644 (file)
@@ -92,6 +92,7 @@ class CRM_Contact_StateMachine_Search extends CRM_Core_StateMachine {
    * @access protected
    */
   function taskName($controller, $formName = 'Search') {
+    // total hack, check POST vars and then session to determine stuff
     $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
index 64a36d293bcaa429d4f22b90775f52698653ab1a..981d57af4391a4c65f5ca94a4af291513d317883 100644 (file)
@@ -58,14 +58,6 @@ class CRM_Contribute_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -142,7 +134,6 @@ class CRM_Contribute_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;
@@ -304,13 +295,6 @@ class CRM_Contribute_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', array('onclick' => $this->getName() . ".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"));
@@ -417,7 +401,7 @@ class CRM_Contribute_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
index 7801d0bfa5621423d45bf016433670efb3f9be1d..520d6117172caadf7978c47477c9e4b2b925a96e 100644 (file)
@@ -79,13 +79,7 @@ class CRM_Contribute_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Contribute_Task::PRINT_CONTRIBUTIONS;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 06feed0f20a8f00aa90f51777b0132d7569ef2b8..729e077470778377b7e36a43a40927327bc85094 100644 (file)
@@ -132,10 +132,7 @@ class CRM_Contribute_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Contribution task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index b1c213f9b6d6fe1586ec23e5cc5d2b5877255519..aa72ef59c46a5a4b726f441e56970398645d1ec0 100644 (file)
@@ -58,14 +58,6 @@ class CRM_Event_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -151,7 +143,6 @@ class CRM_Event_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;
@@ -321,13 +312,6 @@ class CRM_Event_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')
@@ -399,7 +383,7 @@ class CRM_Event_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
index 66f2fb3efaca1622298114a5f07f6a99508c3e96..44d1186557c3011175ab4da63726208974b514c9 100644 (file)
@@ -82,13 +82,7 @@ class CRM_Event_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Event_Task::PRINT_EVENTS;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 5ec703b638f0b0ed36123b25f407fa519c582671..ff89176a4ba0661546847f339a4cf9a08ec850c2 100644 (file)
@@ -142,14 +142,10 @@ class CRM_Event_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Participants and Update Smart Group task
-      if (!in_array($id, array(
-        2, 14))) {
+      // skip Update Smart Group task
+      if ($id != self::SAVE_SEARCH_UPDATE) {
         $titles[$id] = $value['title'];
       }
-      else {
-        continue;
-      }
     }
     return $titles;
   }
index 6e207fea2bccb9ce5ccd3321ad34edd59aff5c16..ae60d6ea9a2a44520e1341e6416050aa60fc1c74 100644 (file)
@@ -58,14 +58,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -142,7 +134,6 @@ class CRM_Grant_Form_Search extends CRM_Core_Form {
      */
 
     $this->_searchButtonName = $this->getButtonName('refresh');
-    $this->_printButtonName = $this->getButtonName('next', 'print');
     $this->_actionButtonName = $this->getButtonName('next', 'action');
 
     $this->_done = FALSE;
@@ -267,13 +258,6 @@ class CRM_Grant_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', array('onchange' => $this->getName() . ".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"));
@@ -327,7 +311,7 @@ class CRM_Grant_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
index a2df38f200d73a6529894f93b92a72a0c84bf09b..df5aaee5a87d844f5911dde4751500f98ec01b59 100644 (file)
@@ -81,13 +81,7 @@ class CRM_Grant_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Grant_Task::PRINT_GRANTS;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 01164d2d9956f55c6cafd01f22ae5e1a4a33fd43..1fb7b17b81c66099242fa47d749ae0b26f038deb 100644 (file)
@@ -107,10 +107,7 @@ class CRM_Grant_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Grant task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index e0bfebc3f521e780a7824ce3e5fa82fca8c6995a..4dd4f5c7284f262e453c1d75ada28399829daf95 100644 (file)
@@ -58,14 +58,6 @@ class CRM_Member_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -143,7 +135,6 @@ class CRM_Member_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;
@@ -258,14 +249,6 @@ class CRM_Member_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', array('onclick' => $this->getName() . ".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"));
@@ -323,7 +306,7 @@ class CRM_Member_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
index 6d7a132d7a3d0308a11cd4bdb01a540f9fada4a2..939b2bdd7948ec2a77d39e24362ae0a780f57826 100644 (file)
@@ -79,13 +79,7 @@ class CRM_Member_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Member_Task::PRINT_MEMBERS;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index d41c0487e22f977ceee47db5cf0fcdbca8dd728e..6af9cf2466196ed08163a8efc802d436d6eb947d 100644 (file)
@@ -129,10 +129,7 @@ class CRM_Member_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Membership task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index d81bf2f98ce039023aadf9887c8589dfed46df93..db824860080acefc1b737a5448184aa9bab30d92 100644 (file)
@@ -54,14 +54,6 @@ class CRM_Pledge_Form_Search extends CRM_Core_Form {
    */
   protected $_searchButtonName;
 
-  /**
-   * name of print button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_printButtonName;
-
   /**
    * name of action button
    *
@@ -138,7 +130,6 @@ class CRM_Pledge_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;
@@ -258,13 +249,6 @@ class CRM_Pledge_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', array('onclick' => $this->getName() . ".toggleSelect.checked = false; toggleCheckboxVals('mark_x_',this); toggleTaskAction( true );"));
@@ -332,7 +316,7 @@ class CRM_Pledge_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
index 1d4fc16ba4762dcb74989d25daac31440d32e9ee..c8c32ddb49571ea901caa420cf38d86980959837 100644 (file)
@@ -81,13 +81,7 @@ class CRM_Pledge_StateMachine_Search extends CRM_Core_StateMachine {
    */
   function taskName($controller, $formName = 'Search') {
     // total hack, check POST vars and then session to determine stuff
-    // fix value if print button is pressed
-    if (!empty($_POST['_qf_' . $formName . '_next_print'])) {
-      $value = CRM_Pledge_Task::PRINT_PLEDGES;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 411983f6592f43e68b170a98040dc237586c9586..6a829bc4416edf282cafa74f2907a148bd8cbd83 100644 (file)
@@ -105,10 +105,7 @@ class CRM_Pledge_Task {
     self::tasks();
     $titles = array();
     foreach (self::$_tasks as $id => $value) {
-      // skip Print Pledges task
-      if ($id != 2) {
-        $titles[$id] = $value['title'];
-      }
+      $titles[$id] = $value['title'];
     }
     return $titles;
   }
index 5c22ff479faca1fe16e8927c922dea8b304744a1..f217c9c5719d7ccbe5c6bb1ea8f71fa0a1bb96ec 100644 (file)
   </tr>
   <tr>
     <td colspan="2">
-    {if $printButtonName}
+    {* Note print buttons were mostly removed except for Campaign search - the following lines can be removed soon CRM-12872 *}
+    {if !empty($printButtonName)}
        {$form.$printButtonName.html} &nbsp; &nbsp;
-    {else}
+    {elseif !empty($form._qf_Search_next_print)}
        {$form._qf_Search_next_print.html} &nbsp; &nbsp;
      {/if}