CRM-12872 - Remove print button from contact search results
authorColeman Watts <coleman@civicrm.org>
Thu, 9 Jan 2014 03:21:58 +0000 (19:21 -0800)
committerColeman Watts <coleman@civicrm.org>
Thu, 9 Jan 2014 03:22:14 +0000 (19:22 -0800)
CRM/Contact/Form/Search.php
CRM/Contact/Form/Search/Advanced.php
CRM/Contact/Form/Search/Basic.php
CRM/Contact/StateMachine/Search.php
CRM/Contact/Task.php
templates/CRM/Contact/Form/Search/ResultTasks.tpl

index c0f2839b31899fca181e19a6ce0845ccd56ee0dd..0e3a69abcb37c7580b201fb514dd16253dbb85cd 100644 (file)
@@ -562,14 +562,6 @@ class CRM_Contact_Form_Search extends CRM_Core_Form {
       )
     );
 
-    $this->add('submit', $this->_printButtonName, ts('Print'),
-      array(
-        'class' => 'form-submit',
-        'id' => 'Print',
-        'onclick' => "return checkPerformAction('mark_x', '" . $this->getName() . "', 1, 1);",
-      )
-    );
-
     $this->setDefaultAction('refresh');
   }
 
index 0b6cc47d6147f7c7acec9560932c9e6a1d7fa8d7..a952ae4cae675ee7dc2647926b441e5871aedb04 100644 (file)
@@ -207,9 +207,6 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search {
     if ($this->_context === 'amtg') {
       $defaults['task'] = CRM_Contact_Task::GROUP_CONTACTS;
     }
-    else {
-      $defaults['task'] = CRM_Contact_Task::PRINT_CONTACTS;
-    }
 
     $defaults['privacy_toggle'] = 1;
 
index 7f8126d01685d550148813ec8e96ab58b698b755..46f55c10a4164492a7c81c01038eb3a1e9967a3d 100644 (file)
@@ -122,9 +122,6 @@ class CRM_Contact_Form_Search_Basic extends CRM_Contact_Form_Search {
     if ($this->_context === 'amtg') {
       $defaults['task'] = CRM_Contact_Task::GROUP_CONTACTS;
     }
-    else {
-      $defaults['task'] = CRM_Contact_Task::PRINT_CONTACTS;
-    }
 
     if ($this->_context === 'smog') {
       $defaults['group_contact_status[Added]'] = TRUE;
index 01ceeb8fdc25c93ef09fb2cb8582c67fefabafd8..6535e98e0a7c1b4f54a1634806e161ca608c7583 100644 (file)
@@ -92,14 +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
-    // fix value if print button is pressed
-    if (CRM_Utils_Array::value('_qf_' . $formName . '_next_print', $_POST)) {
-      $value = CRM_Contact_Task::PRINT_CONTACTS;
-    }
-    else {
-      $value = CRM_Utils_Array::value('task', $_POST);
-    }
+    $value = CRM_Utils_Array::value('task', $_POST);
     if (!isset($value)) {
       $value = $this->_controller->get('task');
     }
index 7b4f576cd19e284aa4aba0b93475bceaf6620bab..a99253ad253d78c55fcf2631ad7bb5fe92fbf6e0 100644 (file)
@@ -291,9 +291,8 @@ class CRM_Contact_Task {
       $titles[$id] = $value['title'];
     }
 
-    // hack unset update saved search and print contacts
+    // hack unset update saved search
     unset($titles[self::SAVE_SEARCH_UPDATE]);
-    unset($titles[self::PRINT_CONTACTS]);
 
     if (!CRM_Utils_Mail::validOutBoundMail()) {
       unset($titles[self::EMAIL_CONTACTS]);
index 9b280dafe4efa2dd3c82ebf37130f377afa9cd1a..61cec069e95576daf2f8a4d0edcdb1d7fbd4838f 100644 (file)
   </tr>
   <tr>
     <td colspan="2">
-     {* Hide export and print buttons in 'Add Members to Group' context. *}
+     {* Hide export button in 'Add Members to Group' context. *}
      {if $context NEQ 'amtg'}
-        {if $action eq 512}
-          <ul>   
-          {$form._qf_Advanced_next_print.html}&nbsp; &nbsp;
-        {elseif $action eq 8192}
-          {$form._qf_Builder_next_print.html}&nbsp; &nbsp;
-        {elseif $action eq 16384}
-          {* since this does not really work for a non standard search
-          {$form._qf_Custom_next_print.html}&nbsp; &nbsp;
-          *}
-        {else}
-            {$form._qf_Basic_next_print.html}&nbsp; &nbsp;
-        {/if}
         {$form.task.html}
      {/if}
      {if $action eq 512}