forked from extern/egroupware
Fix bug that did not let you select All for relative date
This commit is contained in:
parent
685cc0ab26
commit
31eed45551
@ -24,6 +24,8 @@
|
|||||||
class filter_widget extends customfields_widget
|
class filter_widget extends customfields_widget
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// etemplate process_exec has trouble with the nulls, and returns the previous value
|
||||||
|
const ALL_DATES = '-all-';
|
||||||
public $prefix = '';
|
public $prefix = '';
|
||||||
public $human_name = array(
|
public $human_name = array(
|
||||||
'filter' => 'Import|Export filter'
|
'filter' => 'Import|Export filter'
|
||||||
@ -215,7 +217,7 @@ error_log('Trying to filter with unsupported field type: ' . $field['type']);
|
|||||||
'readonly' => $readonly,
|
'readonly' => $readonly,
|
||||||
'no_lang' => true,
|
'no_lang' => true,
|
||||||
'options' => $options,
|
'options' => $options,
|
||||||
'sel_options' => array('' => lang('all'))
|
'sel_options' => array(self::ALL_DATES => lang('all'))
|
||||||
));
|
));
|
||||||
foreach(importexport_helper_functions::$relative_dates as $label => $values)
|
foreach(importexport_helper_functions::$relative_dates as $label => $values)
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ class importexport_wizard_basic_export_csv
|
|||||||
unset($content['set_filter']['fields']);
|
unset($content['set_filter']['fields']);
|
||||||
foreach($content['set_filter'] as $key => $value)
|
foreach($content['set_filter'] as $key => $value)
|
||||||
{
|
{
|
||||||
if($value) {
|
if($value && $value != '-all-') {
|
||||||
$content['filter'][$key] = $value;
|
$content['filter'][$key] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -267,21 +267,14 @@ class importexport_wizard_basic_export_csv
|
|||||||
$content['msg'] = $this->steps['wizard_step80'];
|
$content['msg'] = $this->steps['wizard_step80'];
|
||||||
$content['step'] = 'wizard_step80';
|
$content['step'] = 'wizard_step80';
|
||||||
|
|
||||||
// Find filterable fields
|
|
||||||
if(!$content['set_filter'] && $content['filter']) {
|
|
||||||
$load = true;
|
|
||||||
}
|
|
||||||
$content['set_filter']['fields'] = importexport_helper_functions::get_filter_fields(
|
$content['set_filter']['fields'] = importexport_helper_functions::get_filter_fields(
|
||||||
$content['application'],$content['plugin'],$this
|
$content['application'],$content['plugin'],$this
|
||||||
);
|
);
|
||||||
// Load existing filter from either content or definition
|
// Load existing filter from either content or definition
|
||||||
if($load)
|
|
||||||
{
|
|
||||||
foreach($content['set_filter']['fields'] as $field => $settings)
|
foreach($content['set_filter']['fields'] as $field => $settings)
|
||||||
{
|
{
|
||||||
$content['set_filter'][$field] = $content['filter'][$field];
|
$content['set_filter'][$field] = $content['filter'][$field];
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(!$content['set_filter']['fields'])
|
if(!$content['set_filter']['fields'])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user