*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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',
$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();
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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 );"));
$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
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* 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
$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();
* @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');
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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 );"));
$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
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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->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
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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 );"));
$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
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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 );"));
$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
*/
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');
}
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;
}
*/
protected $_searchButtonName;
- /**
- * name of print button
- *
- * @var string
- * @access protected
- */
- protected $_printButtonName;
-
/**
* name of action button
*
* set the button names
*/
$this->_searchButtonName = $this->getButtonName('refresh');
- $this->_printButtonName = $this->getButtonName('next', 'print');
$this->_actionButtonName = $this->getButtonName('next', 'action');
$this->_done = FALSE;
)
);
- $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 );"));
$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
*/
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');
}
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;
}
</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}
- {else}
+ {elseif !empty($form._qf_Search_next_print)}
{$form._qf_Search_next_print.html}
{/if}