[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [13032] location level on entity
From: |
Sigurd Nes |
Subject: |
[Fmsystem-commits] [13032] location level on entity |
Date: |
Fri, 17 Apr 2015 12:18:51 +0000 |
Revision: 13032
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13032
Author: sigurdne
Date: 2015-04-17 12:18:50 +0000 (Fri, 17 Apr 2015)
Log Message:
-----------
location level on entity
Modified Paths:
--------------
branches/dev-syncromind/property/inc/class.bolocation.inc.php
branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
branches/dev-syncromind/property/inc/class.uientity.inc.php
Modified: branches/dev-syncromind/property/inc/class.bolocation.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.bolocation.inc.php
2015-04-17 11:00:25 UTC (rev 13031)
+++ branches/dev-syncromind/property/inc/class.bolocation.inc.php
2015-04-17 12:18:50 UTC (rev 13032)
@@ -287,10 +287,15 @@
$location_types =
$this->soadmin_location->select_location_type();
$this->location_types = $location_types;
- if(!$data['type_id'] === 0 || $data['type_id'] < 0)
+ if(!$data['type_id'] === 0 || $data['type_id'] == -1)
{
$data['type_id'] = count($location_types);
}
+ else if($data['type_id'] == -2)
+ {
+ $data['type_id'] = 0;
+ }
+
//_debug_array($data);die();
//_debug_array($location_types);
$fm_location_cols = array();
Modified: branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
2015-04-17 11:00:25 UTC (rev 13031)
+++ branches/dev-syncromind/property/inc/class.uiadmin_entity.inc.php
2015-04-17 12:18:50 UTC (rev 13032)
@@ -941,7 +941,15 @@
$msgbox_data = $this->bocommon->msgbox_data($receipt);
+ $location_level_list =
$this->bo->get_location_level_list();
+ array_unshift ($location_level_list,array ('id'=>
-2,'name'=>lang('no locations')));
+
+ foreach($location_level_list as &$entry)
+ {
+ $entry['selected'] = $entry['id'] ==
$values['location_level'];
+ }
+
$data = array
(
'td_count' => 3,
@@ -972,7 +980,7 @@
'lookup_tenant'
=> true,
'value_lookup_tenant'
=> $values['lookup_tenant'],
'lang_location_level'
=> lang('location level'),
- 'location_level_list'
=> array('options' =>
$this->bo->get_location_level_list($values['location_level'])),
+ 'location_level_list'
=> array('options' => $location_level_list),
'lang_location_level_statustext'
=> lang('select location level'),
'lang_no_location_level'
=> lang('None'),
'lang_location_link_level'
=> lang('location link level'),
Modified: branches/dev-syncromind/property/inc/class.uientity.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uientity.inc.php 2015-04-17
11:00:25 UTC (rev 13031)
+++ branches/dev-syncromind/property/inc/class.uientity.inc.php 2015-04-17
12:18:50 UTC (rev 13032)
@@ -1584,7 +1584,7 @@
$lookup_type = $mode == 'edit' ? 'form2' : 'view2';
- if($entity['location_form'] &&
$category['location_level'] > 0)
+ if($entity['location_form'] &&
$category['location_level'])
{
$location_data=$bolocation->initiate_ui_location(array
(
@@ -1710,7 +1710,7 @@
$active_tab = phpgw::get_var('active_tab');
- if($category['location_level'] > 0)
+ if($category['location_level'])
{
$tabs['location'] = array('label'
=> lang('location'), 'link' => '#location', 'disable' => 0);
$active_tab = $active_tab ? $active_tab
: 'location';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [13032] location level on entity,
Sigurd Nes <=