[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16304] property: default value on filter
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16304] property: default value on filter |
Date: |
Tue, 14 Feb 2017 04:59:58 -0500 (EST) |
Revision: 16304
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16304
Author: sigurdne
Date: 2017-02-14 04:59:58 -0500 (Tue, 14 Feb 2017)
Log Message:
-----------
property: default value on filter
Modified Paths:
--------------
trunk/property/inc/class.botts.inc.php
trunk/property/inc/class.uitts.inc.php
Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php 2017-02-14 09:59:13 UTC (rev
16303)
+++ trunk/property/inc/class.botts.inc.php 2017-02-14 09:59:58 UTC (rev
16304)
@@ -156,7 +156,9 @@
$this->reported_by = phpgw::get_var('reported_by',
'int');
$this->cat_id = phpgw::get_var('cat_id', 'int');
$this->part_of_town_id =
phpgw::get_var('part_of_town_id', 'int');
- $this->district_id = phpgw::get_var('district_id',
'int');
+ $default_district =
(isset($GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'])
?
$GLOBALS['phpgw_info']['user']['preferences']['property']['default_district'] :
'');
+ $district_id = phpgw::get_var('district_id', 'int');
+ $this->district_id = $district_id ? $district_id :
$default_district;
$this->allrows = phpgw::get_var('allrows', 'bool');
$this->start_date = phpgw::get_var('filter_start_date',
'string');
$this->end_date = phpgw::get_var('filter_end_date',
'string');
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2017-02-14 09:59:13 UTC (rev
16303)
+++ trunk/property/inc/class.uitts.inc.php 2017-02-14 09:59:58 UTC (rev
16304)
@@ -689,32 +689,6 @@
$values_combo_box = array();
$combos = array();
- $check_date_type = array('type' => 'filter',
- 'name' => 'check_date_type',
- 'extra' => '',
- 'text' => lang('check date type'),
- 'list' => array(
- array(
- 'id' => 1,
- 'name' => lang('modified date')
- ),
- array(
- 'id' => 2,
- 'name' => lang('entry date')
- )
- )
- );
-
- if($order_read)
- {
- $check_date_type['list'][] = array(
- 'id' => 3,
- 'name' => lang('no date')
- );
- }
-
- $combos[] = $check_date_type;
-
$values_combo_box[3] = $this->bo->filter(array('format'
=> $group_filters, 'filter' => $this->status_id,
'default' => 'O'));
@@ -921,6 +895,32 @@
}
}
+ $check_date_type = array('type' => 'filter',
+ 'name' => 'check_date_type',
+ 'extra' => '',
+ 'text' => lang('check date type'),
+ 'list' => array(
+ array(
+ 'id' => 1,
+ 'name' => lang('modified date')
+ ),
+ array(
+ 'id' => 2,
+ 'name' => lang('entry date')
+ )
+ )
+ );
+
+ if($order_read)
+ {
+ $check_date_type['list'][] = array(
+ 'id' => 3,
+ 'name' => lang('no date')
+ );
+ }
+
+ $combos[] = $check_date_type;
+
return $combos;
}
@@ -956,22 +956,6 @@
'form' => array(
'toolbar' => array(
'item' => array(
- array
- (
- 'type' =>
'date-picker',
- 'id' =>
'start_date',
- 'name' =>
'start_date',
- 'value' =>
$start_date,
- 'text' =>
lang('from')
- ),
- array
- (
- 'type' =>
'date-picker',
- 'id' =>
'end_date',
- 'name' =>
'end_date',
- 'value' =>
$end_date,
- 'text' =>
lang('to')
- )
)
)
),
@@ -995,9 +979,24 @@
foreach ($filters as $filter)
{
- array_unshift($data['form']['toolbar']['item'],
$filter);
+ $data['form']['toolbar']['item'][] = $filter;
}
+ $data['form']['toolbar']['item'][] = array(
+ 'type' =>
'date-picker',
+ 'id' =>
'start_date',
+ 'name' =>
'start_date',
+ 'value' =>
$start_date,
+ 'text' =>
lang('from')
+ );
+ $data['form']['toolbar']['item'][] = array(
+ 'type' =>
'date-picker',
+ 'id' =>
'end_date',
+ 'name' =>
'end_date',
+ 'value' =>
$end_date,
+ 'text' =>
lang('to')
+ );
+
$parameters = array
(
'parameter' => array(
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16304] property: default value on filter,
sigurdne <=