mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-25 01:13:25 +01:00
- Move filter step later in wizard
- If user picks an end date in export dialog, set time to 23:59:59 to include that day
This commit is contained in:
parent
ee6834ca54
commit
880e55f9a2
@ -303,6 +303,12 @@ class importexport_export_ui {
|
|||||||
{
|
{
|
||||||
unset($filter[$key]);
|
unset($filter[$key]);
|
||||||
}
|
}
|
||||||
|
// If user selects an end date, they most likely want entries including that date
|
||||||
|
if(is_array($value) && array_key_exists('to',$value) && $value['to'] )
|
||||||
|
{
|
||||||
|
// Adjust time to 23:59:59
|
||||||
|
$filter[$key]['to'] = mktime(23,59,59,date('n',$value['to']),date('j',$value['to']),date('Y',$value['to']));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset($_content['filter']);
|
unset($_content['filter']);
|
||||||
$definition->filter = $filter;
|
$definition->filter = $filter;
|
||||||
|
@ -31,7 +31,7 @@ class importexport_wizard_basic_export_csv
|
|||||||
protected $step_templates = array(
|
protected $step_templates = array(
|
||||||
'wizard_step30' => 'importexport.wizard_basic_export_csv.choose_fields',
|
'wizard_step30' => 'importexport.wizard_basic_export_csv.choose_fields',
|
||||||
'wizard_step40' => 'importexport.wizard_basic_export_csv.choosesepncharset',
|
'wizard_step40' => 'importexport.wizard_basic_export_csv.choosesepncharset',
|
||||||
'wizard_step50' => 'importexport.wizard_basic_export_csv.filter',
|
'wizard_step80' => 'importexport.wizard_basic_export_csv.filter',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ class importexport_wizard_basic_export_csv
|
|||||||
$this->steps = array(
|
$this->steps = array(
|
||||||
'wizard_step30' => lang('Choose fields to export'),
|
'wizard_step30' => lang('Choose fields to export'),
|
||||||
'wizard_step40' => lang('Choose seperator and charset'),
|
'wizard_step40' => lang('Choose seperator and charset'),
|
||||||
'wizard_step50' => lang('Filters'),
|
'wizard_step80' => lang('Filters'),
|
||||||
);
|
);
|
||||||
list($appname, $part2) = explode('_', get_class($this));
|
list($appname, $part2) = explode('_', get_class($this));
|
||||||
if(!$GLOBALS['egw_info']['apps'][$appname]) $appname .= '_'.$part2; // Handle apps with _ in the name
|
if(!$GLOBALS['egw_info']['apps'][$appname]) $appname .= '_'.$part2; // Handle apps with _ in the name
|
||||||
@ -233,11 +233,11 @@ class importexport_wizard_basic_export_csv
|
|||||||
* @param array $preserv
|
* @param array $preserv
|
||||||
* @return string template name
|
* @return string template name
|
||||||
*/
|
*/
|
||||||
function wizard_step50(&$content, &$sel_options, &$readonlys, &$preserv)
|
function wizard_step80(&$content, &$sel_options, &$readonlys, &$preserv)
|
||||||
{
|
{
|
||||||
if($this->debug) error_log(get_class($this) . '::' . __METHOD__ .'->$content '.print_r($content,true));
|
if($this->debug) error_log(get_class($this) . '::' . __METHOD__ .'->$content '.print_r($content,true));
|
||||||
// return from submit
|
// return from submit
|
||||||
if ($content['step'] == 'wizard_step50') {
|
if ($content['step'] == 'wizard_step80') {
|
||||||
// Process submitted
|
// Process submitted
|
||||||
unset($content['filter']);
|
unset($content['filter']);
|
||||||
unset($content['set_filter']['fields']);
|
unset($content['set_filter']['fields']);
|
||||||
@ -259,13 +259,13 @@ class importexport_wizard_basic_export_csv
|
|||||||
case 'finish':
|
case 'finish':
|
||||||
return 'wizard_finish';
|
return 'wizard_finish';
|
||||||
default :
|
default :
|
||||||
return $this->wizard_step50($content,$sel_options,$readonlys,$preserv);
|
return $this->wizard_step80($content,$sel_options,$readonlys,$preserv);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Step 50 - filters
|
// Step 50 - filters
|
||||||
$content['msg'] = $this->steps['wizard_step50'];
|
$content['msg'] = $this->steps['wizard_step80'];
|
||||||
$content['step'] = 'wizard_step50';
|
$content['step'] = 'wizard_step80';
|
||||||
|
|
||||||
// Find filterable fields
|
// Find filterable fields
|
||||||
if(!$content['set_filter'] && $content['filter']) {
|
if(!$content['set_filter'] && $content['filter']) {
|
||||||
|
Loading…
Reference in New Issue
Block a user