phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] property inc/class.boadmin_entity.inc.php inc/c...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] property inc/class.boadmin_entity.inc.php inc/c...
Date: Fri, 06 Oct 2006 12:23:23 +0000

CVSROOT:        /sources/phpgroupware
Module name:    property
Changes by:     Sigurd Nes <sigurdne>   06/10/06 12:23:22

Modified files:
        inc            : class.boadmin_entity.inc.php 
                         class.bocommon.inc.php class.boentity.inc.php 
                         class.bolocation.inc.php 
                         class.soadmin_entity.inc.php 
                         class.soentity.inc.php 
                         class.uiadmin_entity.inc.php 
                         class.uientity.inc.php class.uilocation.inc.php 
        setup          : default_records.inc.php 
        templates/base : attributes_form.xsl 

Log message:
        fix

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bocommon.inc.php?cvsroot=phpgroupware&r1=1.43&r2=1.44
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.boentity.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.bolocation.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.soentity.inc.php?cvsroot=phpgroupware&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uiadmin_entity.inc.php?cvsroot=phpgroupware&r1=1.22&r2=1.23
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uientity.inc.php?cvsroot=phpgroupware&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/property/inc/class.uilocation.inc.php?cvsroot=phpgroupware&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/property/setup/default_records.inc.php?cvsroot=phpgroupware&r1=1.29&r2=1.30
http://cvs.savannah.gnu.org/viewcvs/property/templates/base/attributes_form.xsl?cvsroot=phpgroupware&r1=1.3&r2=1.4

Patches:
Index: inc/class.boadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boadmin_entity.inc.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- inc/class.boadmin_entity.inc.php    30 Jan 2006 22:14:19 -0000      1.10
+++ inc/class.boadmin_entity.inc.php    6 Oct 2006 12:23:22 -0000       1.11
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.boadmin_entity.inc.php,v 1.10 2006/01/30 22:14:19 
sigurdne Exp $
+       * @version $Id: class.boadmin_entity.inc.php,v 1.11 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -130,7 +130,7 @@
 
                        $this->start    = $data['start'];
                        $this->query    = $data['query'];
-                       $this->filter   = $data['filter'];
+               //      $this->filter   = $data['filter'];
                        $this->sort             = $data['sort'];
                        $this->order    = $data['order'];
                        $this->cat_id   = $data['cat_id'];

Index: inc/class.bocommon.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bocommon.inc.php,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -b -r1.43 -r1.44
--- inc/class.bocommon.inc.php  6 Oct 2006 08:33:11 -0000       1.43
+++ inc/class.bocommon.inc.php  6 Oct 2006 12:23:22 -0000       1.44
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage core
-       * @version $Id: class.bocommon.inc.php,v 1.43 2006/10/06 08:33:11 
sigurdne Exp $
+       * @version $Id: class.bocommon.inc.php,v 1.44 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -818,7 +818,7 @@
                                'link' => 255
                        );
 
-                       return $datatype_precision[$datatype];
+                       return 
(isset($datatype_precision[$datatype])?$datatype_precision[$datatype]:'');
                }
 
                function save_attributes($values_attribute,$type)

Index: inc/class.boentity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.boentity.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- inc/class.boentity.inc.php  27 Sep 2006 10:51:08 -0000      1.22
+++ inc/class.boentity.inc.php  6 Oct 2006 12:23:22 -0000       1.23
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.boentity.inc.php,v 1.22 2006/09/27 10:51:08 
sigurdne Exp $
+       * @version $Id: class.boentity.inc.php,v 1.23 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**

Index: inc/class.bolocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.bolocation.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.bolocation.inc.php        26 Sep 2006 13:46:01 -0000      1.20
+++ inc/class.bolocation.inc.php        6 Oct 2006 12:23:22 -0000       1.21
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage location
-       * @version $Id: class.bolocation.inc.php,v 1.20 2006/09/26 13:46:01 
sigurdne Exp $
+       * @version $Id: class.bolocation.inc.php,v 1.21 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -541,13 +541,13 @@
                {
                        $location_data = $this->so->read_single($location_code);
 
-                       if(!$extra['tenant_id']=='lookup')
+                       if( isset($extra['tenant_id']) && 
$extra['tenant_id']!='lookup')
                        {
                                if($extra['tenant_id']>0)
                                {
                                        
$tenant_data=$this->bocommon->read_single_tenant($extra['tenant_id']);
                                        $location_data['tenant_id']     = 
$extra['tenant_id'];
-                                       $location_data['contact_phone']= 
$extra['contact_phone'];
+                                       $location_data['contact_phone'] = 
$extra['contact_phone'];
                                        $location_data['last_name']     = 
$tenant_data['last_name'];
                                        $location_data['first_name']    = 
$tenant_data['first_name'];
                                }

Index: inc/class.soadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soadmin_entity.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- inc/class.soadmin_entity.inc.php    5 Oct 2006 11:33:53 -0000       1.22
+++ inc/class.soadmin_entity.inc.php    6 Oct 2006 12:23:22 -0000       1.23
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.soadmin_entity.inc.php,v 1.22 2006/10/05 11:33:53 
sigurdne Exp $
+       * @version $Id: class.soadmin_entity.inc.php,v 1.23 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -138,6 +138,7 @@
 
                        $table = 'fm_entity_category';
 
+                       $querymethod = '';
                        if($query)
                        {
                                $query = ereg_replace("'",'',$query);
@@ -505,7 +506,6 @@
                                {
                                        $this->db->query("DELETE FROM 
fm_entity_category WHERE id=" . $values['id'] . " AND entity_id=" . 
$values['entity_id'],__LINE__,__FILE__);
                                        unset($receipt['id']);
-
                                }
                        }
 
@@ -821,6 +821,7 @@
                                $ordermethod = ' order by attrib_sort asc';
                        }
 
+                       $querymethod = '';
                        if($query)
                        {
                                $query = ereg_replace("'",'',$query);
@@ -829,7 +830,7 @@
                                $querymethod = " AND (fm_entity_attribute.name 
$this->like '%$query%' or fm_entity_attribute.descr $this->like '%$query%')";
                        }
 
-                       $sql = "SELECT * FROM fm_entity_attribute WHERE 
entity_id=$entity_id AND cat_id = $cat_id $filtermethod $querymethod";
+                       $sql = "SELECT * FROM fm_entity_attribute WHERE 
entity_id=$entity_id AND cat_id = $cat_id $querymethod";
 
                        $this->db2->query($sql,__LINE__,__FILE__);
                        $this->total_records = $this->db2->num_rows();
@@ -1046,9 +1047,10 @@
                        $value_set=array(
                                'input_text'    => $attrib['input_text'],
                                'statustext'    => $attrib['statustext'],
-                               'search'        => $attrib['search'],
-                               'list'          => $attrib['list'],
-                               'history'       => $attrib['history'],
+                               'search'                => 
(isset($attrib['search'])?$attrib['search']:''),
+                               'list'                  => 
(isset($attrib['list'])?$attrib['list']:''),
+                               'history'               => 
(isset($attrib['history'])?$attrib['history']:''),
+                               'nullable'              => 
$attrib['column_info']['nullable'],
                                );
 
                        $value_set      = 
$this->bocommon->validate_db_update($value_set);
@@ -1109,7 +1111,7 @@
                                
$this->oProc->AlterColumn('fm_entity_'.$attrib['entity_id'] . '_' . 
$attrib['cat_id'],$attrib['column_name'],$attrib['column_info']);               
    
                        }
                        
-                       if($attrib['new_choice'])
+                       if(isset($attrib['new_choice']) && 
$attrib['new_choice'])
                        {
                                $choice_id = 
$this->bocommon->next_id($choice_table 
,array('entity_id'=>$attrib['entity_id'],'cat_id'=>$attrib['cat_id'],'attrib_id'=>$attrib['id']));
 
@@ -1127,7 +1129,7 @@
                                . "VALUES ($values)",__LINE__,__FILE__);
                        }
 
-                       if($attrib['delete_choice'])
+                       if(isset($attrib['delete_choice']) && 
is_array($attrib['delete_choice']))
                        {
                                for 
($i=0;$i<count($attrib['delete_choice']);$i++)
                                {

Index: inc/class.soentity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.soentity.inc.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- inc/class.soentity.inc.php  5 Oct 2006 11:33:53 -0000       1.20
+++ inc/class.soentity.inc.php  6 Oct 2006 12:23:22 -0000       1.21
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.soentity.inc.php,v 1.20 2006/10/05 11:33:53 
sigurdne Exp $
+       * @version $Id: class.soentity.inc.php,v 1.21 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -417,7 +417,8 @@
                                        'statustext'    => 
stripslashes($this->db->f('statustext')),
 //                                     'statustext'    => str_replace("\n"," 
",stripslashes($this->db->f('statustext'))),
                                        'datatype'              => 
$this->db->f('datatype'),
-                                       'history'               => 
$this->db->f('history')
+                                       'history'               => 
$this->db->f('history'),
+                                       'allow_null'    => 
$this->db->f('nullable')
                                );
                        }
 //_debug_array($entity);

Index: inc/class.uiadmin_entity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uiadmin_entity.inc.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- inc/class.uiadmin_entity.inc.php    5 Oct 2006 11:33:53 -0000       1.22
+++ inc/class.uiadmin_entity.inc.php    6 Oct 2006 12:23:22 -0000       1.23
@@ -10,7 +10,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage admin
-       * @version $Id: class.uiadmin_entity.inc.php,v 1.22 2006/10/05 11:33:53 
sigurdne Exp $
+       * @version $Id: class.uiadmin_entity.inc.php,v 1.23 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -1098,7 +1098,7 @@
 
                        
$GLOBALS['phpgw']->xslttpl->add_file(array('admin_entity'));
 
-                       if ($values['save'])
+                       if (isset($values['save']) && $values['save'])
                        {
                                if($id)
                                {
@@ -1151,9 +1151,8 @@
                                }
 
 
-                               if (!$receipt['error'])
+                               if (!isset($receipt['error']))
                                {
-
                                        $receipt = 
$this->bo->save_attrib($values,$action);
 
                                        if(!$id)
@@ -1194,12 +1193,10 @@
                                $multiple_choice= True;
                        }
 
-//_debug_array($values);
-
                        $entity = $this->bo->read_single($entity_id,false);
                        $category = 
$this->bo->read_single_category($entity_id,$cat_id);
 
-                       $msgbox_data = $this->bocommon->msgbox_data($receipt);
+                       $msgbox_data = 
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
 
                        $data = array
                        (
@@ -1211,8 +1208,8 @@
                                'lang_choice'                                   
=> lang('Choice'),
                                'lang_new_value'                                
=> lang('New value'),
                                'lang_new_value_statustext'                     
=> lang('New value for multiple choice'),
-                               'multiple_choice'                               
=> $multiple_choice,
-                               'value_choice'                                  
=> $values['choice'],
+                               'multiple_choice'                               
        => (isset($multiple_choice)?$multiple_choice:''),
+                               'value_choice'                                  
        => (isset($values['choice'])?$values['choice']:''),
                                'lang_delete_value'                             
=> lang('Delete value'),
                                'lang_value'                                    
=> lang('value'),
                                'lang_delete_choice_statustext'                 
=> lang('Delete this value from the list of multiple choice'),

Index: inc/class.uientity.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uientity.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- inc/class.uientity.inc.php  5 Oct 2006 11:33:53 -0000       1.29
+++ inc/class.uientity.inc.php  6 Oct 2006 12:23:22 -0000       1.30
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage entity
-       * @version $Id: class.uientity.inc.php,v 1.29 2006/10/05 11:33:53 
sigurdne Exp $
+       * @version $Id: class.uientity.inc.php,v 1.30 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -682,6 +682,17 @@
                                        $error_id=true;
                                }
 
+                               if(isset($values_attribute) && 
is_array($values_attribute))
+                               {
+                                       foreach ($values_attribute as 
$attribute )
+                                       {
+                                               if($attribute['allow_null'] != 
'True' && !$attribute['value'])
+                                               {
+                                                       
$receipt['error'][]=array('msg'=>lang('Please enter value for attribute %1', 
$attribute['input_text']));
+                                               }
+                                       }
+                               }
+                               
                                if($id)
                                {
                                        $values['id']=$id;
@@ -703,7 +714,7 @@
                                        
$receipt['error'][]=array('msg'=>lang('This file already exists !'));
                                }
 
-                               if(!$receipt['error'])
+                               if(!isset($receipt['error']))
                                {
                                        $receipt        = 
$this->bo->create_home_dir($receipt);
                                        $receipt = 
$this->bo->save($values,$values_attribute,$action,$this->entity_id,$this->cat_id);
@@ -753,8 +764,33 @@
                                {
                                        $values = 
$this->bo->read_single(array('entity_id'=>$this->entity_id,'cat_id'=>$this->cat_id));
                                }
-                       }
 
+                               /* Preserve attribute values from post */
+                               if(isset($receipt['error']) && (isset( 
$values_attribute) && is_array( $values_attribute)))
+                               {
+                                       foreach ( $values_attribute as $key => 
$attribute )
+                                       {       
+                                               for 
($i=0;$i<count($values['attributes']);$i++)
+                                               {
+                                                       
if($values['attributes'][$i]['attrib_id'] == $attribute['attrib_id'])
+                                                       {
+                                                               
$values['attributes'][$i]['value'] = $attribute['value'];
+                                                               
+                                                               
if(isset($values['attributes'][$i]['choice']) && 
is_array($values['attributes'][$i]['choice']))
+                                                               {
+                                                                       for 
($j=0;$j<count($values['attributes'][$i]['choice']);$j++)
+                                                                       {
+                                                                               
if($values['attributes'][$i]['choice'][$j]['id'] == $attribute['value'])
+                                                                               
{
+                                                                               
        $values['attributes'][$i]['choice'][$j]['checked'] = 'checked'; 
+                                                                               
}
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
 
                        $lookup_type='form';
 

Index: inc/class.uilocation.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/inc/class.uilocation.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- inc/class.uilocation.inc.php        5 Oct 2006 11:33:53 -0000       1.36
+++ inc/class.uilocation.inc.php        6 Oct 2006 12:23:22 -0000       1.37
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage location
-       * @version $Id: class.uilocation.inc.php,v 1.36 2006/10/05 11:33:53 
sigurdne Exp $
+       * @version $Id: class.uilocation.inc.php,v 1.37 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
        /**
@@ -512,6 +512,7 @@
                        $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp);
                        
$GLOBALS['phpgw']->session->appsession('insert_record',$this->currentapp,'');
 
+
                        $values = false;
                        if(isset($_POST['save']))
                        {
@@ -539,9 +540,8 @@
                        {
                                for ($i=1; $i<($type_id+1); $i++)
                                {
-                                       if((!$values['loc' . $i]  && 
!$location[($i-1)]) || !$values['loc' . $i])
+                                       if((!$values['loc' . $i]  && 
(!isset($location[($i-1)])  || !$location[($i-1)])  ) || !$values['loc' . $i])
                                        {
-
                                                
$receipt['error'][]=array('msg'=>lang('Please select a location %1 ID !',$i));
                                                $error_id=true;
                                        }
@@ -592,6 +592,11 @@
                                        {
                                                
$location_code_parent=implode("-", $location_parent);
                                                $values = 
$this->bo->read_single($location_code_parent);
+                                               /* restore date from posting */
+                                               for ($i=0; 
$i<count($insert_record['extra']); $i++)
+                                               {
+                                                       
$values[$insert_record['extra'][$i]]= $_POST[$insert_record['extra'][$i]];
+                                               }
                                        }
                                }
                        }
@@ -644,6 +649,7 @@
                                unset($values['location_code']);
                        }
 
+
                        if ($values['cat_id'] > 0)
                        {
                                $this->cat_id = $values['cat_id'];
@@ -657,14 +663,7 @@
                                'lookup_tenant' => $lookup_tenant
                        );
 
-                       if($values['location_code'])
-                       {
                                $lookup_type='form';
-                       }
-                       else
-                       {
-                               $lookup_type='form';
-                       }
 
                        $location_data=$this->bo->initiate_ui_location(array(
                                                'values'                => 
$values,
@@ -702,7 +701,7 @@
                        $additional_fields[$j]['datatype']      = 'varchar';
                        $additional_fields[$j]['input_name']    = 'loc' . 
$type_id;
                        $additional_fields[$j]['name']          = 'loc' . 
$type_id;
-                       $additional_fields[$j]['value']         = 
$values[$additional_fields[$j]['input_name']];
+                       $additional_fields[$j]['value']                 = 
(isset($values[$additional_fields[$j]['input_name']])?$values[$additional_fields[$j]['input_name']]:'');
                        $additional_fields[$j]['class']         = 'th_text';
                        $insert_record['extra'][]               = 
$additional_fields[$j]['input_name'];
 
@@ -712,7 +711,7 @@
                        $additional_fields[$j]['datatype']      = 'varchar';
                        $additional_fields[$j]['input_name']    = 'loc' . 
$type_id . '_name';
                        $additional_fields[$j]['name']          = 'loc' . 
$type_id . '_name';
-                       $additional_fields[$j]['value']         = 
$values[$additional_fields[$j]['input_name']];
+                       $additional_fields[$j]['value']                 = 
(isset($values[$additional_fields[$j]['input_name']])?$values[$additional_fields[$j]['input_name']]:'');
                        $insert_record['extra'][]               = 
$additional_fields[$j]['input_name'];
                        $j++;
 
@@ -753,6 +752,7 @@
                                $attributes_values[$r]['name']          = 
$custom['column_name'];
                                $attributes_values[$r]['input_name']    = 
$custom['column_name'];
                                $attributes_values[$r]['value']         = 
$values[$custom['column_name']];
+                               
                                if($attributes_values[$r]['datatype']=='D' && 
$attributes_values[$r]['value'])
                                {
                                        $timestamp_date= 
mktime(0,0,0,date(m,strtotime($attributes_values[$r]['value'])),date(d,strtotime($attributes_values[$r]['value'])),date(y,strtotime($attributes_values[$r]['value'])));
@@ -1012,7 +1012,7 @@
 
                                'tenant_link'                                   
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
$this->currentapp.'.uilookup.tenant')),
                                'lang_tenant'                                   
=> lang('tenant'),
-                               'value_tenant_id'                               
=> $values['tenant_id'],
+                               'value_tenant_id'                               
=> (isset($values['tenant_id'])?$values['tenant_id']:''),
                                'value_last_name'                               
=> (isset($values['last_name'])?$values['last_name']:''),
                                'value_first_name'                              
=> (isset($values['first_name'])?$values['first_name']:''),
                                'lang_tenant_statustext'                        
=> lang('Select a tenant'),

Index: setup/default_records.inc.php
===================================================================
RCS file: /sources/phpgroupware/property/setup/default_records.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- setup/default_records.inc.php       5 Oct 2006 13:32:19 -0000       1.29
+++ setup/default_records.inc.php       6 Oct 2006 12:23:22 -0000       1.30
@@ -8,7 +8,7 @@
        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
        * @package property
        * @subpackage setup
-       * @version $Id: default_records.inc.php,v 1.29 2006/10/05 13:32:19 
sigurdne Exp $
+       * @version $Id: default_records.inc.php,v 1.30 2006/10/06 12:23:22 
sigurdne Exp $
        */
 
 
@@ -343,8 +343,8 @@
 #
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 1, 
'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL, NULL, NULL, 'True')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 2, 
'category', 'Category', 'Category statustext', 'LB', NULL, 2, NULL, NULL, NULL, 
NULL, 'True')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 3, 
'ext_system_id', 'Ext system id', 'External system id', 'V', NULL, 3, NULL, 12, 
NULL, NULL, 'True')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 4, 
'ext_meter_id', 'Ext meter id', 'External meter id', 'V', NULL, 4, NULL, 12, 
NULL, NULL, 'True')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 3, 
'ext_system_id', 'Ext system id', 'External system id', 'V', NULL, 3, NULL, 12, 
NULL, NULL, 'False')");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 4, 
'ext_meter_id', 'Ext meter id', 'External meter id', 'V', NULL, 4, NULL, 12, 
NULL, NULL, 'False')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 1, 5, 
'remark', 'Remark', 'Remark status text', 'T', NULL, 5, NULL, NULL, NULL, NULL, 
'True')");
 
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO fm_entity_attribute 
(entity_id, cat_id, id, column_name, input_text, statustext, datatype, list, 
attrib_sort, size, precision_, scale, default_value, nullable) VALUES (1, 2, 1, 
'status', 'Status', 'Status', 'LB', NULL, 1, NULL, NULL, NULL, NULL, 'True')");

Index: templates/base/attributes_form.xsl
===================================================================
RCS file: /sources/phpgroupware/property/templates/base/attributes_form.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- templates/base/attributes_form.xsl  6 Feb 2006 22:47:37 -0000       1.3
+++ templates/base/attributes_form.xsl  6 Oct 2006 12:23:22 -0000       1.4
@@ -1,4 +1,4 @@
-<!-- $Id: attributes_form.xsl,v 1.3 2006/02/06 22:47:37 sigurdne Exp $ -->
+<!-- $Id: attributes_form.xsl,v 1.4 2006/10/06 12:23:22 sigurdne Exp $ -->
 
        <xsl:template name="attributes_form">
                <xsl:apply-templates select="attributes_values"/>
@@ -36,6 +36,8 @@
                                                        <input type="hidden" 
name="values_attribute[{counter}][datatype]" value="{datatype}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][history]" value="{history}"></input>
                                                        <input type="hidden" 
name="values_attribute[{counter}][attrib_id]" value="{attrib_id}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][allow_null]" value="{allow_null}"></input>
+                                                       <input type="hidden" 
name="values_attribute[{counter}][input_text]" value="{input_text}"></input>
                                                        <xsl:choose>
                                                                <xsl:when 
test="datatype='R'">
                                                                        
<xsl:call-template name="choice"/>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]