Skip to content
Snippets Groups Projects
Commit 62c10c94 authored by colemanw's avatar colemanw
Browse files

CRM-12872 - Remove print button from contact search results

parent 2a6af255
Branches
Tags
No related merge requests found
......@@ -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');
}
......
......@@ -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;
......
......@@ -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;
......
......@@ -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');
}
......
......@@ -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]);
......
......@@ -74,20 +74,8 @@
</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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment