diff --git a/CRM/Case/Task.php b/CRM/Case/Task.php index 956ff16662ed..954786cde557 100644 --- a/CRM/Case/Task.php +++ b/CRM/Case/Task.php @@ -67,7 +67,7 @@ public static function tasks() { self::TASK_EXPORT => array( 'title' => ts('Export cases'), 'class' => array( - 'CRM_Export_Form_Select', + 'CRM_Export_Form_Select_Case', 'CRM_Export_Form_Map', ), 'result' => FALSE, diff --git a/CRM/Core/Form/Task.php b/CRM/Core/Form/Task.php index 41a8912ba2c8..ae212f72cbd6 100644 --- a/CRM/Core/Form/Task.php +++ b/CRM/Core/Form/Task.php @@ -56,6 +56,11 @@ abstract class CRM_Core_Form_Task extends CRM_Core_Form { */ protected $_componentIds; + /** + * @var int + */ + protected $queryMode; + /** * The array that holds all the case ids * @@ -210,7 +215,7 @@ public function addDefaultButtons($title, $nextType = 'next', $backType = 'back' * @return int */ public function getQueryMode() { - return CRM_Contact_BAO_Query::MODE_CONTACTS; + return $this->queryMode ? : CRM_Contact_BAO_Query::MODE_CONTACTS; } } diff --git a/CRM/Export/Form/Select.php b/CRM/Export/Form/Select.php index a44149c66649..7dcdbf6e05e7 100644 --- a/CRM/Export/Form/Select.php +++ b/CRM/Export/Form/Select.php @@ -526,7 +526,7 @@ public static function getGreetingOptions() { * @return int */ public function getQueryMode() { - return (int) $this->controller->get('component_mode'); + return (int) ($this->queryMode ? : $this->controller->get('component_mode')); } } diff --git a/CRM/Export/Form/Select/Case.php b/CRM/Export/Form/Select/Case.php new file mode 100644 index 000000000000..c95aba984ae8 --- /dev/null +++ b/CRM/Export/Form/Select/Case.php @@ -0,0 +1,53 @@ +