Search code cleanup - move variables into parent class
[civicrm-core.git] / CRM / Activity / Form / Search.php
index 444b4ec397bf0c3ee6be11a6ab3b63f91644b98e..b00e600880b50acd92a7879fea354a97bcaba780 100644 (file)
  */
 class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
 
-  /**
-   * Are we forced to run a search
-   *
-   * @var int
-   * @access protected
-   */
-  protected $_force;
-
-  /**
-   * name of search button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_searchButtonName;
-
-  /**
-   * name of action button
-   *
-   * @var string
-   * @access protected
-   */
-  protected $_actionButtonName;
-
-  /**
-   * form values that we will be using
-   *
-   * @var array
-   * @access protected
-   */
-  public $_formValues;
-
   /**
    * the params that are sent to the query
    *
@@ -81,14 +49,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
    */
   protected $_queryParams;
 
-  /**
-   * have we already done this search
-   *
-   * @access protected
-   * @var boolean
-   */
-  protected $_done;
-
   /**
    * are we restricting ourselves to a single contact
    *
@@ -105,14 +65,6 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
    */
   protected $_limit = NULL;
 
-  /**
-   * what context are we being invoked from
-   *
-   * @access protected
-   * @var string
-   */
-  protected $_context = NULL;
-
   /**
    * prefix for the controller
    *
@@ -249,16 +201,7 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
 
       $permission = CRM_Core_Permission::getPermission();
 
-      $tasks = array('' => ts('- actions -')) + CRM_Activity_Task::permissionedTaskTitles($permission);
-
-      $this->add('select', 'task', ts('Actions:') . ' ', $tasks);
-      $this->add('submit', $this->_actionButtonName, ts('Go'),
-        array(
-          'class' => 'form-submit',
-          'id' => 'Go',
-          'onclick' => "return checkPerformAction('mark_x', '" . $this->getName() . "', 0);",
-        )
-      );
+      $this->addTaskMenu(CRM_Activity_Task::permissionedTaskTitles($permission));
 
       // 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'));
@@ -472,6 +415,9 @@ class CRM_Activity_Form_Search extends CRM_Core_Form_Search {
     }
   }
 
+  /**
+   * @return null
+   */
   function getFormValues() {
     return NULL;
   }