fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [6689] property: custom fields at request


From: Sigurd Nes
Subject: [Fmsystem-commits] [6689] property: custom fields at request
Date: Tue, 21 Dec 2010 14:23:40 +0000

Revision: 6689
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6689
Author:   sigurdne
Date:     2010-12-21 14:23:40 +0000 (Tue, 21 Dec 2010)
Log Message:
-----------
property: custom fields at request

Modified Paths:
--------------
    trunk/property/inc/class.boproject.inc.php
    trunk/property/inc/class.borequest.inc.php
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.sorequest.inc.php
    trunk/property/inc/class.uirequest.inc.php
    trunk/property/setup/default_records.inc.php
    trunk/property/setup/setup.inc.php
    trunk/property/setup/tables_update.inc.php
    trunk/property/templates/base/attributes_form.xsl
    trunk/property/templates/base/request.xsl

Modified: trunk/property/inc/class.boproject.inc.php
===================================================================
--- trunk/property/inc/class.boproject.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/inc/class.boproject.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -629,12 +629,9 @@
 
                        $project['location_code']=implode("-", $location);
 
-                       $start_date     = 
phpgwapi_datetime::date_array($project['start_date']);
-                       $end_date       = 
phpgwapi_datetime::date_array($project['end_date']);
+                       $project['start_date']  =  
phpgwapi_datetime::date_to_timestamp($project['start_date']);
+                       $project['end_date']    =  
phpgwapi_datetime::date_to_timestamp($project['end_date']);
 
-                       $project['start_date']  = mktime 
(2,0,0,$start_date['month'],$start_date['day'],$start_date['year']);
-                       $project['end_date']    = $end_date ? mktime 
(2,0,0,$end_date['month'],$end_date['day'],$end_date['year']) : '';
-
                        if(is_array($values_attribute))
                        {
                                $values_attribute = 
$this->custom->convert_attribute_save($values_attribute);

Modified: trunk/property/inc/class.borequest.inc.php
===================================================================
--- trunk/property/inc/class.borequest.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/inc/class.borequest.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -27,6 +27,7 @@
        * @version $Id$
        */
 
+       phpgw::import_class('phpgwapi.datetime');
        /**
         * Description
         * @package property
@@ -59,6 +60,7 @@
                        $this->historylog       = 
CreateObject('property.historylog','request');
                        $this->cats                                     = 
CreateObject('phpgwapi.categories', -1,  'property', '.project');
                        $this->cats->supress_info       = true;
+                       $this->custom                           = & 
$this->so->custom;
 
                        if ($session)
                        {
@@ -158,7 +160,7 @@
                        $degree_comment[3]=' - '.lang('Serious');
                        for ($i=0; $i<=3; $i++)
                        {
-                               $degree_list[$i][id] = $i;
+                               $degree_list[$i]['id'] = $i;
                                $degree_list[$i]['name'] = $i . 
$degree_comment[$i];
                                if ($i==$selected)
                                {
@@ -178,7 +180,7 @@
                        $probability_comment[3]=' - '.lang('Large');
                        for ($i=1; $i<=3; $i++)
                        {
-                               $probability_list[$i][id] = $i;
+                               $probability_list[$i]['id'] = $i;
                                $probability_list[$i]['name'] = $i . 
$probability_comment[$i];
                                if ($i==$selected)
                                {
@@ -297,64 +299,77 @@
                        return $request;
                }
 
-               function read_single($request_id)
+               function read_single($request_id = 0, $values = array(),$view = 
false)
                {
-                       $request                                                
= $this->so->read_single($request_id);
-                       $dateformat                                             
= $GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
-                       $request['start_date']                  = 
$GLOBALS['phpgw']->common->show_date($request['start_date'],$dateformat);
-                       $request['end_date']                    = 
$GLOBALS['phpgw']->common->show_date($request['end_date'],$dateformat);
+                       $values['attributes'] = $this->custom->find('property', 
'.project.request', 0, '', 'ASC', 'attrib_sort', true, true);
 
-                       if($request['location_code'])
+                       if($request_id)
                        {
-                               $request['location_data'] 
=$this->solocation->read_single($request['location_code']);
+                               $values = $this->so->read_single($request_id, 
$values);
                        }
 
-                       if($request['tenant_id']>0)
+                       $values = $this->custom->prepare($values, 'property', 
'.project.request', $view);
+
+                       if(!$request_id)
                        {
-                               
$tenant_data=$this->bocommon->read_single_tenant($request['tenant_id']);
-                               $request['location_data']['tenant_id']= 
$request['tenant_id'];
-                               $request['location_data']['contact_phone']= 
$tenant_data['contact_phone'];
-                               $request['location_data']['last_name']  = 
$tenant_data['last_name'];
-                               $request['location_data']['first_name'] = 
$tenant_data['first_name'];
+                               return $values;
                        }
+
+                       $dateformat                                     = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       $values['start_date']           = 
$GLOBALS['phpgw']->common->show_date($values['start_date'],$dateformat);
+                       $values['end_date']                     = 
$GLOBALS['phpgw']->common->show_date($values['end_date'],$dateformat);
+
+                       if($values['location_code'])
+                       {
+                               $values['location_data'] 
=$this->solocation->read_single($values['location_code']);
+                       }
+
+                       if($values['tenant_id']>0)
+                       {
+                               
$tenant_data=$this->bocommon->read_single_tenant($values['tenant_id']);
+                               $values['location_data']['tenant_id']= 
$values['tenant_id'];
+                               $values['location_data']['contact_phone']= 
$tenant_data['contact_phone'];
+                               $values['location_data']['last_name']   = 
$tenant_data['last_name'];
+                               $values['location_data']['first_name']  = 
$tenant_data['first_name'];
+                       }
                        else
                        {
-                               unset($request['location_data']['tenant_id']);
-                               
unset($request['location_data']['contact_phone']);
-                               unset($request['location_data']['last_name']);
-                               unset($request['location_data']['first_name']);
+                               unset($values['location_data']['tenant_id']);
+                               
unset($values['location_data']['contact_phone']);
+                               unset($values['location_data']['last_name']);
+                               unset($values['location_data']['first_name']);
                        }
 
-                       if($request['p_num'])
+                       if($values['p_num'])
                        {
                                $soadmin_entity = 
CreateObject('property.soadmin_entity');
-                               $category = 
$soadmin_entity->read_single_category($request['p_entity_id'],$request['p_cat_id']);
+                               $category = 
$soadmin_entity->read_single_category($values['p_entity_id'],$values['p_cat_id']);
 
-                               
$request['p'][$request['p_entity_id']]['p_num']=$request['p_num'];
-                               
$request['p'][$request['p_entity_id']]['p_entity_id']=$request['p_entity_id'];
-                               
$request['p'][$request['p_entity_id']]['p_cat_id']=$request['p_cat_id'];
-                               
$request['p'][$request['p_entity_id']]['p_cat_name'] = $category['name'];
+                               
$values['p'][$values['p_entity_id']]['p_num']=$values['p_num'];
+                               
$values['p'][$values['p_entity_id']]['p_entity_id']=$values['p_entity_id'];
+                               
$values['p'][$values['p_entity_id']]['p_cat_id']=$values['p_cat_id'];
+                               
$values['p'][$values['p_entity_id']]['p_cat_name'] = $category['name'];
                        }
 
                        $vfs = CreateObject('phpgwapi.vfs');
                        $vfs->override_acl = 1;
 
-                       $request['files'] = $vfs->ls (array(
+                       $values['files'] = $vfs->ls (array(
                             'string' => "/property/request/$request_id",
                             'relatives' => array(RELATIVE_NONE)));
 
                        $vfs->override_acl = 0;
 
-                       if(!$request['files'][0]['file_id'])
+                       if(!isset($values['files'][0]['file_id']))
                        {
-                               unset($request['files']);
+                               $values['files'] = array();
                        }
 
                        $interlink      = CreateObject('property.interlink');
-                       $request['origin'] = 
$interlink->get_relation('property', '.project.request', $request_id, 'origin');
-                       $request['target'] = 
$interlink->get_relation('property', '.project.request', $request_id, 'target');
+                       $values['origin'] = 
$interlink->get_relation('property', '.project.request', $request_id, 'origin');
+                       $values['target'] = 
$interlink->get_relation('property', '.project.request', $request_id, 'target');
 
-                       return $request;
+                       return $values;
                }
 
 
@@ -432,7 +447,7 @@
                        return $this->so->next_id();
                }
 
-               function save($request,$action='')
+               function save($request,$action='',$values_attribute = array())
                {
                        while (is_array($request['location']) && list(,$value) 
= each($request['location']))
                        {
@@ -443,16 +458,21 @@
                        }
 
                        $request['location_code']=implode("-", $location);
-                       $request['start_date']  = 
$this->bocommon->date_to_timestamp($request['start_date']);
-                       $request['end_date']    = 
$this->bocommon->date_to_timestamp($request['end_date']);
+                       $request['start_date']  =  
phpgwapi_datetime::date_to_timestamp($request['start_date']);
+                       $request['end_date']    =  
phpgwapi_datetime::date_to_timestamp($request['end_date']);
 
+                       if(is_array($values_attribute))
+                       {
+                               $values_attribute = 
$this->custom->convert_attribute_save($values_attribute);
+                       }
+
                        if ($action=='edit')
                        {
-                               $receipt = $this->so->edit($request);
+                               $receipt = 
$this->so->edit($request,$values_attribute);
                        }
                        else
                        {
-                               $receipt = $this->so->add($request);
+                               $receipt = 
$this->so->add($request,$values_attribute);
                        }
                        return $receipt;
                }

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/inc/class.soproject.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -914,7 +914,7 @@
                                'contact_id'            => 
$project['contact_id']
                                );
 
-                       $data_attribute = 
$this->custom->prepare_for_db('fm_project', $values_attribute, $data['id']);
+                       $data_attribute = 
$this->custom->prepare_for_db('fm_project', $values_attribute, $project['id']);
 
                        if(isset($data_attribute['value_set']))
                        {

Modified: trunk/property/inc/class.sorequest.inc.php
===================================================================
--- trunk/property/inc/class.sorequest.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/inc/class.sorequest.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -40,6 +40,7 @@
                        $this->soproject        = 
CreateObject('property.soproject');
                        $this->historylog       = 
CreateObject('property.historylog','request');
                        $this->bocommon         = 
CreateObject('property.bocommon');
+                       $this->custom           = 
createObject('property.custom_fields');
                        $this->db           = & $GLOBALS['phpgw']->db;
                        $this->join                     = & $this->db->join;
                        $this->like                     = & $this->db->like;
@@ -359,7 +360,7 @@
                        return $request_list;
                }
 
-               function read_single($request_id)
+               function read_single($request_id, $values = array())
                {
                        $request_id = (int) $request_id;
                        $sql = "SELECT * FROM fm_request WHERE 
id={$request_id}";
@@ -394,6 +395,16 @@
                                        'contact_phone'                 => 
$this->db->f('contact_phone', true),
                                        'building_part'                 => 
$this->db->f('building_part'),
                                );
+
+                               if ( isset($values['attributes']) && 
is_array($values['attributes']) )
+                               {
+                                       $request['attributes'] = 
$values['attributes'];
+                                       foreach ( $request['attributes'] as 
&$attr )
+                                       {
+                                               $attr['value']  = 
$this->db->f($attr['column_name']);
+                                       }
+                               }
+
                                $location_code = $this->db->f('location_code');
                                $request['power_meter']         = 
$this->soproject->get_power_meter($location_code);
                        }
@@ -432,16 +443,18 @@
                        return $id;
                }
 
-               function add($request)
+               function add($request, $values_attribute = array())
                {
 //_debug_array($request);
                        $receipt = array();
+
+                       $value_set = array();
+
                        while (is_array($request['location']) && 
list($input_name,$value) = each($request['location']))
                        {
                                if($value)
                                {
-                                       $cols[] = $input_name;
-                                       $vals[] = $value;
+                                       $value_set[$input_name] = $value;
                                }
                        }
 
@@ -449,15 +462,20 @@
                        {
                                if($value)
                                {
-                                       $cols[] = $input_name;
-                                       $vals[] = $value;
+                                       $value_set[$input_name] = $value;
                                }
                        }
 
-                       if($cols)
+                       $data_attribute = 
$this->custom->prepare_for_db('fm_request', $values_attribute);
+                       if(isset($data_attribute['value_set']))
                        {
-                               $cols   = "," . implode(",", $cols);
-                               $vals   = ",'" . implode("','", $vals) . "'";
+                               foreach($data_attribute['value_set'] as 
$input_name => $value)
+                               {
+                                       if(isset($value) && $value)
+                                       {
+                                               $value_set[$input_name] = 
$value;
+                                       }
+                               }
                        }
 
                        if($request['street_name'])
@@ -472,37 +490,30 @@
                                $address = 
$this->db->db_addslashes($request['location_name']);
                        }
 
-                       $request['descr'] = 
$this->db->db_addslashes($request['descr']);
-                       $request['name'] = 
$this->db->db_addslashes($request['name']);
-                       $request['title'] = 
$this->db->db_addslashes($request['title']);
+                       $this->db->transaction_begin();
 
-                       $this->db->transaction_begin();
                        $id = $this->next_id();
-                       $values= array
-                       (
-                               $id,
-                               $request['title'],
-                               $this->account,
-                               $request['cat_id'],
-                               $request['descr'],
-                               $request['location_code'],
-                               $address,
-                               time(),
-                               $request['budget'],
-                               $request['status'],
-                               $request['branch_id'],
-                               $request['coordinator'],
-                               $request['authorities_demands'],
-                               $request['building_part']
-                       );
 
-                       $values = $this->bocommon->validate_db_insert($values);
+                       $value_set['id']                                        
= $id;
+                       $value_set['title']                                     
= $this->db->db_addslashes($request['title']);
+                       $value_set['owner']                                     
= $this->account;
+                       $value_set['category']                          = 
$request['cat_id'];
+                       $value_set['descr']                                     
= $this->db->db_addslashes($request['descr']);
+                       $value_set['location_code']                     = 
$request['location_code'];
+                       $value_set['address']                           = 
$address;
+                       $value_set['entry_date']                        = 
time();
+                       $value_set['budget']                            = 
$request['budget'];
+                       $value_set['status']                            = 
$request['status'];
+                       $value_set['branch_id']                         = 
$request['branch_id'];
+                       $value_set['coordinator']                       = 
$request['coordinator'];
+                       $value_set['authorities_demands']       = 
$request['authorities_demands'];
+                       $value_set['building_part']                     =       
$request['building_part'];
 
-                       $this->db->query("insert into fm_request 
(id,title,owner,category,descr,location_code,"
-                               . 
"address,entry_date,budget,status,branch_id,coordinator,"
-                               . "authorities_demands,building_part  $cols) "
-                               . "VALUES ($values $vals )",__LINE__,__FILE__);
+                       $cols = implode(',', array_keys($value_set));
+                       $values = 
$this->bocommon->validate_db_insert(array_values($value_set));
 
+                       $this->db->query("INSERT INTO fm_request ({$cols}) 
VALUES ({$values})",__LINE__,__FILE__);
+
                        while (is_array($request['condition']) && 
list($condition_type,$value_type) = each($request['condition']))
                        {
                                $this->db->query("INSERT INTO 
fm_request_condition 
(request_id,condition_type,degree,probability,consequence,user_id,entry_date) "
@@ -559,7 +570,7 @@
                        return $receipt;
                }
 
-               function edit($request)
+               function edit($request, $values_attribute = array())
                {
                        $receipt = array();
 
@@ -575,7 +586,6 @@
                                $address = 
$this->db->db_addslashes($request['location_name']);
                        }
 
-//                     $request['name'] = 
$this->db->db_addslashes($request['name']);
 
                        $value_set = array
                        (
@@ -603,6 +613,13 @@
                                $value_set[$input_name] = $value;
                        }
 
+                       $data_attribute = 
$this->custom->prepare_for_db('fm_request', $values_attribute, $request['id']);
+
+                       if(isset($data_attribute['value_set']))
+                       {
+                               $value_set = array_merge($value_set, 
$data_attribute['value_set']);
+                       }
+
                        $value_set      = 
$this->db->validate_update($value_set);
 
                        $this->db->transaction_begin();

Modified: trunk/property/inc/class.uirequest.inc.php
===================================================================
--- trunk/property/inc/class.uirequest.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/inc/class.uirequest.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -748,14 +748,15 @@
                                
$GLOBALS['phpgw']->redirect_link('/index.php',array('menuaction'=> 
'property.uirequest.view', 'id'=> $id));
                        }
 
-                       $values = phpgw::get_var('values');
+                       $values                         = 
phpgw::get_var('values');
+                       $values_attribute       = 
phpgw::get_var('values_attribute');
 
                        $bypass                         = 
phpgw::get_var('bypass', 'bool');
 
                        if($_POST && !$bypass)
                        {
                                $insert_record = 
$GLOBALS['phpgw']->session->appsession('insert_record','property');
-                               $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession('insert_record_entity','property');
+                               $insert_record_entity = 
$GLOBALS['phpgw']->session->appsession("insert_record_values{$this->acl_location}",'property');
 
                                for ($j=0;$j<count($insert_record_entity);$j++)
                                {
@@ -863,6 +864,17 @@
                                        $error_id=true;
                                }
 
+                               if(is_array($values_attribute))
+                               {
+                                       foreach ($values_attribute as 
$attribute )
+                                       {
+                                               if($attribute['nullable'] != 1 
&& (!$attribute['value'] && !$values['extra'][$attribute['name']]))
+                                               {
+                                                       
$receipt['error'][]=array('msg'=>lang('Please enter value for attribute %1', 
$attribute['input_text']));
+                                               }
+                                       }
+                               }
+
                                if($id)
                                {
                                        $values['id']=$id;
@@ -875,7 +887,7 @@
                                        {
                                                $action='add';
                                        }
-                                       $receipt = 
$this->bo->save($values,$action);
+                                       $receipt = 
$this->bo->save($values,$action,$values_attribute);
                                        if (! $receipt['error'])
                                        {
                                                $id = $receipt['id'];
@@ -990,6 +1002,7 @@
                        else
                        {
                                $function_msg = lang('Add request');
+                               $values = $this->bo->read_single(0, $values);
                        }
 
                        if ($values['cat_id'])
@@ -1094,20 +1107,23 @@
                        $myColumnDefs[0] = array
                        (
                                'name'          => "0",
-                               'values'        =>      json_encode(array(      
array(key => value_date,label=>lang('Date'),sortable=>true,resizeable=>true),
-                                                                               
                array(key => 
value_user,label=>lang('User'),sortable=>true,resizeable=>true),
-                                                                               
                array(key => 
value_action,label=>lang('Action'),sortable=>true,resizeable=>true),
-                                                                               
        array(key => value_new_value,label=>lang('New 
Value'),sortable=>true,resizeable=>true)))
+                               'values'        =>      json_encode(array(      
array('key' => 
'value_date','label'=>lang('Date'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                array('key' => 
'value_user','label'=>lang('User'),'sortable'=>true,'resizeable'=>true),
+                                                                               
                array('key' => 
'value_action','label'=>lang('Action'),'sortable'=>true,'resizeable'=>true),
+                                                                               
        array('key' => 'value_new_value','label'=>lang('New 
Value'),'sortable'=>true,'resizeable'=>true)))
                        );
+
        
                        $link_view_file = 
$GLOBALS['phpgw']->link('/index.php',$link_file_data);
                        
                        for($z=0; $z<count($values['files']); $z++)
                        {
-                               if ($link_to_files != '') {
+                               if ($link_to_files != '')
+                               {
                                        $content_files[$z]['file_name'] = '<a 
href="'.$link_to_files.'/'.$values['files'][$z]['directory'].'/'.$values['files'][$z]['file_name'].'"
 target="_blank" title="'.lang('click to view file').'" 
style="cursor:help">'.$values['files'][$z]['name'].'</a>';
                                }
-                               else {
+                               else
+                               {
                                        $content_files[$z]['file_name'] = '<a 
href="'.$link_view_file.'&amp;file_name='.$values['files'][$z]['file_name'].'" 
target="_blank" title="'.lang('click to view file').'" 
style="cursor:help">'.$values['files'][$z]['name'].'</a>';
                                }                               
                                $content_files[$z]['delete_file'] = '<input 
type="checkbox" name="values[file_action][]" 
value="'.$values['files'][$z]['name'].'" title="'.lang('Check to delete 
file').'" style="cursor:help">';
@@ -1126,137 +1142,157 @@
                        $myColumnDefs[1] = array
                        (
                                'name'          => "1",
-                               'values'        =>      json_encode(array(      
array(key => 
file_name,label=>lang('Filename'),sortable=>false,resizeable=>true),
-                                                                               
                array(key => delete_file,label=>lang('Delete 
file'),sortable=>false,resizeable=>true,formatter=>FormatterCenter)))
+                               'values'        =>      json_encode(array(      
array('key' => 
'file_name','label'=>lang('Filename'),'sortable'=>false,'resizeable'=>true),
+                                                                               
                array('key' => 'delete_file','label'=>lang('Delete 
file'),'sortable'=>false,'resizeable'=>true,'formatter'=>'FormatterCenter')))
                        );
-                                                                       
+
+                       if (isset($values['attributes']) && 
is_array($values['attributes']))
+                       {
+                               foreach ($values['attributes'] as & $attribute)
+                               {
+                                       if($attribute['history'] == true)
+                                       {
+                                               $link_history_data = array
+                                               (
+                                                       'menuaction'    => 
'property.uirequest.attrib_history',
+                                                       'attrib_id'     => 
$attribute['id'],
+                                                       'id'            => $id,
+                                                       'edit'          => true
+                                               );
+
+                                               $attribute['link_history'] = 
$GLOBALS['phpgw']->link('/index.php',$link_history_data);
+                                       }
+                               }
+                       }
+
                        $data = array
                        (
+                               'attributes'                                    
        => $values['attributes'],
                                'property_js'                                   
        => 
json_encode($GLOBALS['phpgw_info']['server']['webserver_url']."/property/js/yahoo/property2.js"),
                                'datatable'                                     
                => $datavalues,
                                'myColumnDefs'                                  
        => $myColumnDefs,
-                               'tabs'                                          
        => self::_generate_tabs(),
-                               'fileupload'                            => true,
-                               'link_view_file'                        => 
$GLOBALS['phpgw']->link('/index.php',$link_file_data),
-                               'link_to_files'                         => 
$link_to_files,
-                               'files'                                 => 
$values['files'],
-                               'lang_files'                            => 
lang('files'),
-                               'lang_filename'                         => 
lang('Filename'),
-                               'lang_file_action'                      => 
lang('Delete file'),
-                               'lang_view_file_statustext'             => 
lang('click to view file'),
+                               'tabs'                                          
                => self::_generate_tabs(),
+                               'fileupload'                                    
        => true,
+                               'link_view_file'                                
        => $GLOBALS['phpgw']->link('/index.php',$link_file_data),
+                               'link_to_files'                                 
        => $link_to_files,
+                               'files'                                         
                => $values['files'],
+                               'lang_files'                                    
        => lang('files'),
+                               'lang_filename'                                 
        => lang('Filename'),
+                               'lang_file_action'                              
        => lang('Delete file'),
+                               'lang_view_file_statustext'                     
=> lang('click to view file'),
                                'lang_file_action_statustext'           => 
lang('Check to delete file'),
-                               'lang_upload_file'                      => 
lang('Upload file'),
-                               'lang_file_statustext'                  => 
lang('Select file to upload'),
+                               'lang_upload_file'                              
        => lang('Upload file'),
+                               'lang_file_statustext'                          
=> lang('Select file to upload'),
 
-                               'msgbox_data'                           => 
$GLOBALS['phpgw']->common->msgbox($msgbox_data),
+                               'msgbox_data'                                   
        => $GLOBALS['phpgw']->common->msgbox($msgbox_data),
 
-                               'value_acl_location'            => 
$this->acl_location,
-                               'value_target'                          => 
$values['target'],
-                               'value_origin'                          => 
$values['origin'],
-                               'value_origin_type'                     => 
$origin,
-                               'value_origin_id'                       => 
$origin_id,
-                               'lang_origin_statustext'                => 
lang('Link to the origin for this request'),
+                               'value_acl_location'                            
=> $this->acl_location,
+                               'value_target'                                  
        => $values['target'],
+                               'value_origin'                                  
        => $values['origin'],
+                               'value_origin_type'                             
        => $origin,
+                               'value_origin_id'                               
        => $origin_id,
+                               'lang_origin_statustext'                        
=> lang('Link to the origin for this request'),
 
-                               'generate_project_action'               => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.edit')),
-                               'lang_generate_project'                 => 
lang('Generate project'),
+                               'generate_project_action'                       
=> $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiproject.edit')),
+                               'lang_generate_project'                         
=> lang('Generate project'),
                                'lang_generate_project_statustext'      => 
lang('Generate a project from this request'),
-                               'location_code'                         => 
$values['location_code'],
-                               'p_num'                                 => 
$values['p_num'],
-                               'p_entity_id'                           => 
$values['p_entity_id'],
-                               'p_cat_id'                              => 
$values['p_cat_id'],
-                               'tenant_id'                             => 
$values['tenant_id'],
+                               'location_code'                                 
        => $values['location_code'],
+                               'p_num'                                         
                => $values['p_num'],
+                               'p_entity_id'                                   
        => $values['p_entity_id'],
+                               'p_cat_id'                                      
                => $values['p_cat_id'],
+                               'tenant_id'                                     
                => $values['tenant_id'],
 
-                               'lang_importance'                       => 
lang('Importance'),
-                               'table_header_importance'               => 
$table_header_importance,
-                               'importance_weight'                     => 
$importance_weight,
+                               'lang_importance'                               
        => lang('Importance'),
+                               'table_header_importance'                       
=> $table_header_importance,
+                               'importance_weight'                             
        => $importance_weight,
 
-                               'lang_no_workorders'                    => 
lang('No workorder budget'),
-                               'workorder_link'                        => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit')),
-                               'record_history'                        => 
$record_history,
-                               'table_header_history'                  => 
$table_header_history,
-                               'lang_history'                          => 
lang('History'),
-                               'lang_no_history'                       => 
lang('No history'),
+                               'lang_no_workorders'                            
=> lang('No workorder budget'),
+                               'workorder_link'                                
        => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit')),
+                               'record_history'                                
        => $record_history,
+                               'table_header_history'                          
=> $table_header_history,
+                               'lang_history'                                  
        => lang('History'),
+                               'lang_no_history'                               
        => lang('No history'),
 
-                               'img_cal'                                       
=> $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
-                               'lang_datetitle'                        => 
lang('Select date'),
+                               'img_cal'                                       
                => $GLOBALS['phpgw']->common->image('phpgwapi','cal'),
+                               'lang_datetitle'                                
        => lang('Select date'),
 
                                'lang_start_date_statustext'            => 
lang('Select the estimated end date for the request'),
-                               'lang_start_date'                       => 
lang('request start date'),
-                               'value_start_date'                      => 
$values['start_date'],
+                               'lang_start_date'                               
        => lang('request start date'),
+                               'value_start_date'                              
        => $values['start_date'],
 
-                               'lang_end_date_statustext'              => 
lang('Select the estimated end date for the request'),
-                               'lang_end_date'                         => 
lang('request end date'),
-                               'value_end_date'                        => 
$values['end_date'],
+                               'lang_end_date_statustext'                      
=> lang('Select the estimated end date for the request'),
+                               'lang_end_date'                                 
        => lang('request end date'),
+                               'value_end_date'                                
        => $values['end_date'],
 
-                               'lang_copy_request'                     => 
lang('Copy request ?'),
+                               'lang_copy_request'                             
        => lang('Copy request ?'),
                                'lang_copy_request_statustext'          => 
lang('Choose Copy request to copy this request to a new request'),
 
-                               'lang_power_meter'                      => 
lang('Power meter'),
+                               'lang_power_meter'                              
        => lang('Power meter'),
                                'lang_power_meter_statustext'           => 
lang('Enter the power meter'),
-                               'value_power_meter'                     => 
$values['power_meter'],
+                               'value_power_meter'                             
        => $values['power_meter'],
 
-                               'lang_budget'                           => 
lang('Budget'),
-                               'value_budget'                          => 
$values['budget'],
-                               'lang_budget_statustext'                => 
lang('Enter the budget'),
+                               'lang_budget'                                   
        => lang('Budget'),
+                               'value_budget'                                  
        => $values['budget'],
+                               'lang_budget_statustext'                        
=> lang('Enter the budget'),
 
-                               'location_data'                         => 
$location_data,
-                               'location_type'                         => 
'form',
-                               'form_action'                           => 
$GLOBALS['phpgw']->link('/index.php',$link_data),
-                               'done_action'                           => 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uirequest.index')),
-                               'lang_category'                         => 
lang('category'),
-                               'lang_save'                             => 
lang('save'),
-                               'lang_done'                             => 
lang('done'),
+                               'location_data'                                 
        => $location_data,
+                               'location_type'                                 
        => 'form',
+                               'form_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',$link_data),
+                               'done_action'                                   
        => $GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uirequest.index')),
+                               'lang_category'                                 
        => lang('category'),
+                               'lang_save'                                     
                => lang('save'),
+                               'lang_done'                                     
                => lang('done'),
 
-                               'lang_request_id'                       => 
lang('request ID'),
-                               'value_request_id'                      => $id,
+                               'lang_request_id'                               
        => lang('request ID'),
+                               'value_request_id'                              
        => $id,
 
-                               'lang_title'                            => 
lang('Title'),
-                               'value_title'                           => 
$values['title'],
-                               'lang_title_statustext'                 => 
lang('Enter request Title'),
+                               'lang_title'                                    
        => lang('Title'),
+                               'value_title'                                   
        => $values['title'],
+                               'lang_title_statustext'                         
=> lang('Enter request Title'),
 
-                               'lang_descr_statustext'                 => 
lang('Enter a description of the request'),
-                               'lang_descr'                            => 
lang('Description'),
-                               'value_descr'                           => 
$values['descr'],
-                               'lang_score'                            => 
lang('Score'),
-                               'value_score'                           => 
$values['score'],
-                               'lang_done_statustext'                  => 
lang('Back to the list'),
-                               'lang_save_statustext'                  => 
lang('Save the request'),
-                               'lang_no_cat'                           => 
lang('Select category'),
-                               'lang_cat_statustext'                   => 
lang('Select the category the request belongs to. To do not use a category 
select NO CATEGORY'),
-                               'value_cat_id'                          => 
$values['cat_id'],
+                               'lang_descr_statustext'                         
=> lang('Enter a description of the request'),
+                               'lang_descr'                                    
        => lang('Description'),
+                               'value_descr'                                   
        => $values['descr'],
+                               'lang_score'                                    
        => lang('Score'),
+                               'value_score'                                   
        => $values['score'],
+                               'lang_done_statustext'                          
=> lang('Back to the list'),
+                               'lang_save_statustext'                          
=> lang('Save the request'),
+                               'lang_no_cat'                                   
        => lang('Select category'),
+                               'lang_cat_statustext'                           
=> lang('Select the category the request belongs to. To do not use a category 
select NO CATEGORY'),
+                               'value_cat_id'                                  
        => $values['cat_id'],
 
-                               'cat_select'                            => 
$this->cats->formatted_xslt_list(array('select_name' => 
'values[cat_id]','selected' => $values['cat_id'])),
+                               'cat_select'                                    
        => $this->cats->formatted_xslt_list(array('select_name' => 
'values[cat_id]','selected' => $values['cat_id'])),
 
-                               'lang_coordinator'                      => 
lang('Coordinator'),
-                               'lang_user_statustext'                  => 
lang('Select the coordinator the request belongs to. To do not use a category 
select NO USER'),
-                               'select_user_name'                      => 
'values[coordinator]',
-                               'lang_no_user'                          => 
lang('Select coordinator'),
-                               'user_list'                             => 
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl_location),
+                               'lang_coordinator'                              
        => lang('Coordinator'),
+                               'lang_user_statustext'                          
=> lang('Select the coordinator the request belongs to. To do not use a 
category select NO USER'),
+                               'select_user_name'                              
        => 'values[coordinator]',
+                               'lang_no_user'                                  
        => lang('Select coordinator'),
+                               'user_list'                                     
                => 
$this->bocommon->get_user_list_right2('select',4,$values['coordinator'],$this->acl_location),
 
-                               'status_list'                           => 
$this->bo->select_status_list('select',$values['status']),
-                               'status_name'                           => 
'values[status]',
-                               'lang_no_status'                        => 
lang('Select status'),
-                               'lang_status'                           => 
lang('Status'),
-                               'lang_status_statustext'                => 
lang('What is the current status of this request ?'),
+                               'status_list'                                   
        => $this->bo->select_status_list('select',$values['status']),
+                               'status_name'                                   
        => 'values[status]',
+                               'lang_no_status'                                
        => lang('Select status'),
+                               'lang_status'                                   
        => lang('Status'),
+                               'lang_status_statustext'                        
=> lang('What is the current status of this request ?'),
 
-                               'branch_list'                           => 
$this->boproject->select_branch_list($values['branch_id']),
-                               'lang_branch'                           => 
lang('branch'),
-                               'lang_no_branch'                        => 
lang('Select branch'),
-                               'lang_branch_statustext'                => 
lang('Select the branches for this request'),
+                               'branch_list'                                   
        => $this->boproject->select_branch_list($values['branch_id']),
+                               'lang_branch'                                   
        => lang('branch'),
+                               'lang_no_branch'                                
        => lang('Select branch'),
+                               'lang_branch_statustext'                        
=> lang('Select the branches for this request'),
 
-                               'notify'                                => 
$notify,
-                               'lang_notify'                           => 
lang('Notify'),
-                               'lang_notify_statustext'                => 
lang('Check this to notify your supervisor by email'),
-                               'value_notify_mail_address'             => 
$supervisor_email,
+                               'notify'                                        
                => $notify,
+                               'lang_notify'                                   
        => lang('Notify'),
+                               'lang_notify_statustext'                        
=> lang('Check this to notify your supervisor by email'),
+                               'value_notify_mail_address'                     
=> $supervisor_email,
 
-                               'currency'                              => 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
+                               'currency'                                      
                => 
$GLOBALS['phpgw_info']['user']['preferences']['common']['currency'],
 
-                               'lang_authorities_demands'              => 
lang('Authorities Demands'),
+                               'lang_authorities_demands'                      
=> lang('Authorities Demands'),
                                'lang_authorities_demands_statustext'   => 
lang('Is there a demand from the authorities to correct this condition?'),
-                               'authorities_demands'                   => 
$values['authorities_demands'],
+                               'authorities_demands'                           
=> $values['authorities_demands'],
 
-                               'condition_list'                        => 
$this->bo->select_conditions($id),
-                               'building_part_list'                    => 
array('status_list' => $this->bocommon->select_category_list(array('type'=> 
'building_part','selected' =>$values['building_part'], 'order' => 'id', 
'id_in_name' => 'num' ))),
+                               'condition_list'                                
        => $this->bo->select_conditions($id),
+                               'building_part_list'                            
=> array('status_list' => $this->bocommon->select_category_list(array('type'=> 
'building_part','selected' =>$values['building_part'], 'order' => 'id', 
'id_in_name' => 'num' ))),
                        );
 
                        phpgwapi_yui::load_widget('dragdrop');
@@ -1272,7 +1308,7 @@
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
 
-                       $GLOBALS['phpgw']->xslttpl->add_file(array('request', 
'files'));
+                       $GLOBALS['phpgw']->xslttpl->add_file(array('request', 
'files','attributes_form'));
                        
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('edit' => $data));
                        $GLOBALS['phpgw']->css->validate_file('datatable');
                        $GLOBALS['phpgw']->css->validate_file('property');

Modified: trunk/property/setup/default_records.inc.php
===================================================================
--- trunk/property/setup/default_records.inc.php        2010-12-21 10:33:02 UTC 
(rev 6688)
+++ trunk/property/setup/default_records.inc.php        2010-12-21 14:23:40 UTC 
(rev 6689)
@@ -39,7 +39,7 @@
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.custom', 'custom queries')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function, allow_c_attrib, c_attrib_table) 
VALUES ({$app_id}, '.project', 'Demand -> Workorder', 1, 1, 1, 'fm_project')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function, allow_c_attrib, c_attrib_table) 
VALUES ({$app_id}, '.project.workorder', 'Workorder', 1, 1 ,1, 
'fm_workorder')");
-$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function) VALUES ({$app_id}, 
'.project.request', 'Request', 1, 1)");
+$GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function, allow_c_attrib, c_attrib_table) 
VALUES ({$app_id}, '.project.request', 'Request', 1, 1 ,1, 'fm_request')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr, allow_grant, allow_c_function, allow_c_attrib, c_attrib_table) 
VALUES ({$app_id}, '.ticket', 'Helpdesk', 1, 1, 1, 'fm_tts_tickets')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.ticket.external', 'Helpdesk External user')");
 $GLOBALS['phpgw_setup']->oProc->query("INSERT INTO phpgw_locations (app_id, 
name, descr) VALUES ({$app_id}, '.ticket.order', 'Helpdesk ad hock order')");

Modified: trunk/property/setup/setup.inc.php
===================================================================
--- trunk/property/setup/setup.inc.php  2010-12-21 10:33:02 UTC (rev 6688)
+++ trunk/property/setup/setup.inc.php  2010-12-21 14:23:40 UTC (rev 6689)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.600';
+       $setup_info['property']['version']              = '0.9.17.601';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: trunk/property/setup/tables_update.inc.php
===================================================================
--- trunk/property/setup/tables_update.inc.php  2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/setup/tables_update.inc.php  2010-12-21 14:23:40 UTC (rev 
6689)
@@ -4741,3 +4741,24 @@
                }
        }
 
+       /**
+       * Update property version from 0.9.17.600 to 0.9.17.601
+       * Add custom fields to request
+       * 
+       */
+
+       $test[] = '0.9.17.600';
+       function property_upgrade0_9_17_600()
+       {
+               $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
+
+               $location_id    = 
$GLOBALS['phpgw']->locations->get_id('property', '.project.request');
+               $sql = "UPDATE phpgw_locations SET allow_c_attrib = 1, 
c_attrib_table = 'fm_request' WHERE location_id = {$location_id}";
+               $GLOBALS['phpgw_setup']->oProc->query($sql);
+
+               if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
+               {
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.601';
+                       return $GLOBALS['setup_info']['property']['currentver'];
+               }
+       }

Modified: trunk/property/templates/base/attributes_form.xsl
===================================================================
--- trunk/property/templates/base/attributes_form.xsl   2010-12-21 10:33:02 UTC 
(rev 6688)
+++ trunk/property/templates/base/attributes_form.xsl   2010-12-21 14:23:40 UTC 
(rev 6689)
@@ -8,356 +8,360 @@
                <xsl:for-each select="attributes_group" >
                        <div id="{link}">
                                <table cellpadding="2" cellspacing="2" 
width="100%" align="center" border="0">
-                                       <xsl:for-each select="attributes" >
-                                       <xsl:variable 
name="statustext"><xsl:value-of select="statustext"/></xsl:variable>
-                                               <tr>
-                                                       <td align="left" 
width="19%" valign="top" title="{$statustext}">
+                                       <xsl:call-template name="attributes"/>
+                               </table>
+                       </div>
+               </xsl:for-each>
+       </xsl:template>
+
+       <xsl:template name="attributes">
+               <xsl:for-each select="attributes" >
+                       <xsl:variable name="statustext"><xsl:value-of 
select="statustext"/></xsl:variable>
+                               <tr>
+                                       <td align="left" width="19%" 
valign="top" title="{$statustext}">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="helpmsg=1">
+                                                               <xsl:variable 
name="help_url"><xsl:value-of select="help_url"/></xsl:variable>
+                                                               <a 
href="javascript:var 
w=window.open('{$help_url}','','width=550,height=400,scrollbars')">
+                                                                       
<xsl:text>[</xsl:text><xsl:value-of select="input_text"/><xsl:text>]</xsl:text>
+                                                               </a>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <xsl:value-of 
select="input_text"/>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="datatype='pwd'">
+                                                               <br/>
+                                                               <xsl:text>[ 
</xsl:text>
                                                                <xsl:choose>
-                                                                       
<xsl:when test="helpmsg=1">
-                                                                               
<xsl:variable name="help_url"><xsl:value-of select="help_url"/></xsl:variable>
-                                                                               
<a href="javascript:var 
w=window.open('{$help_url}','','width=550,height=400,scrollbars')">
-                                                                               
        <xsl:text>[</xsl:text><xsl:value-of 
select="input_text"/><xsl:text>]</xsl:text>
-                                                                               
</a>
+                                                                       
<xsl:when test="value!=''">
+                                                                               
<xsl:value-of select="//lang_edit"/>
                                                                        
</xsl:when>
                                                                        
<xsl:otherwise>
-                                                                               
<xsl:value-of select="input_text"/>
+                                                                               
<xsl:value-of select="//lang_add"/>
                                                                        
</xsl:otherwise>
                                                                </xsl:choose>
+                                                               <xsl:text> 
]</xsl:text>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                       </td>
+                                       <td align="left">
+                                               <xsl:choose>
+                                                       <xsl:when 
test="name!=''">
+                                                               <input 
type="hidden" name="values_attribute[{counter}][name]" value="{name}"></input>
+                                                               <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="{id}"></input>
+                                                               <input 
type="hidden" name="values_attribute[{counter}][nullable]" 
value="{nullable}"></input>
+                                                               <input 
type="hidden" name="values_attribute[{counter}][input_text]" 
value="{input_text}"></input>
                                                                <xsl:choose>
-                                                                       
<xsl:when test="datatype='pwd'">
-                                                                               
<br/>
-                                                                               
<xsl:text>[ </xsl:text>
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="value!=''">
-                                                                               
                <xsl:value-of select="//lang_edit"/>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:otherwise>
-                                                                               
                <xsl:value-of select="//lang_add"/>
-                                                                               
        </xsl:otherwise>
-                                                                               
</xsl:choose>
-                                                                               
<xsl:text> ]</xsl:text>
+                                                                       
<xsl:when test="datatype='R'">
+                                                                               
<xsl:call-template name="choice"/>
                                                                        
</xsl:when>
-                                                               </xsl:choose>
-                                                       </td>
-                                                       <td align="left">
-                                                               <xsl:choose>
-                                                                       
<xsl:when test="name!=''">
-                                                                               
<input type="hidden" name="values_attribute[{counter}][name]" 
value="{name}"></input>
-                                                                               
<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="{id}"></input>
-                                                                               
<input type="hidden" name="values_attribute[{counter}][nullable]" 
value="{nullable}"></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"/>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='CH'">
-                                                                               
                <xsl:call-template name="choice"/>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='LB'">
-                                                                               
                <select name="values_attribute[{counter}][value]" class="forms">
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                        <option value=""><xsl:value-of 
select="//lang_none"/></option>
-                                                                               
                        <xsl:for-each select="choice">  
-                                                                               
                                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
+                                                                       
<xsl:when test="datatype='CH'">
+                                                                               
<xsl:call-template name="choice"/>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='LB'">
+                                                                               
<select name="values_attribute[{counter}][value]" class="forms">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <option value=""><xsl:value-of select="//lang_none"/></option>
+                                                                               
                <xsl:for-each select="choice">  
+                                                                               
                <xsl:variable name="id"><xsl:value-of 
select="id"/></xsl:variable>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="checked='checked'">
+                                                                               
                                <option value="{$id}" 
selected="selected"><xsl:value-of disable-output-escaping="yes" 
select="value"/></option>
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                <option value="{$id}"><xsl:value-of 
disable-output-escaping="yes" select="value"/></option>
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>                           
+                                                                               
        </xsl:for-each>
+                                                                               
</select>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='AB'">
+                                                                               
<table>
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <xsl:variable name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                        <xsl:variable 
name="clear_function"><xsl:text>clear_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                        <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
                                                                                
                                <xsl:choose>
-                                                                               
                                        <xsl:when test="checked='checked'">
-                                                                               
                                                <option value="{$id}" 
selected="selected"><xsl:value-of disable-output-escaping="yes" 
select="value"/></option>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                </xsl:attribute>
                                                                                
                                        </xsl:when>
-                                                                               
                                        <xsl:otherwise>
-                                                                               
                                                <option 
value="{$id}"><xsl:value-of disable-output-escaping="yes" 
select="value"/></option>
-                                                                               
                                        </xsl:otherwise>
-                                                                               
                                </xsl:choose>                           
-                                                                               
                        </xsl:for-each>
-                                                                               
                </select>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='AB'">
-                                                                               
                <table>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                        <input  size="30" type="text" name="{$contact_name}" 
value="{contact_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                                <xsl:choose>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                </xsl:attribute>
+                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                        <input type="checkbox" name="clear_{name}_box"  
onClick="{$clear_function}" >
+                                                                               
                                <xsl:attribute name="title">
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'delete')" />
+                                                                               
                                </xsl:attribute>
+                                                                               
                                <xsl:attribute name="readonly">
+                                                                               
                                        <xsl:text>readonly</xsl:text>
+                                                                               
                                </xsl:attribute>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="contact_tel!=''">
                                                                                
                        <tr>
                                                                                
                                <td>
-                                                                               
                                        <xsl:variable 
name="contact_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
-                                                                               
                                        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                                        <xsl:variable 
name="clear_function"><xsl:text>clear_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                                        <input type="hidden" name="{name}" 
value="{value}" onClick="{$lookup_function}" readonly="readonly" size="5">
-                                                                               
                                                <xsl:choose>
-                                                                               
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
-                                                                               
                                                                        
<xsl:text> disabled</xsl:text>
-                                                                               
                                                                </xsl:attribute>
-                                                                               
                                                        </xsl:when>
-                                                                               
                                                </xsl:choose>
-                                                                               
                                        </input>
-                                                                               
                                        <input  size="30" type="text" 
name="{$contact_name}" value="{contact_name}"  onClick="{$lookup_function}" 
readonly="readonly"> 
-                                                                               
                                                <xsl:choose>
-                                                                               
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
-                                                                               
                                                                        
<xsl:text> disabled</xsl:text>
-                                                                               
                                                                </xsl:attribute>
-                                                                               
                                                        </xsl:when>
-                                                                               
                                                </xsl:choose>
-                                                                               
                                        </input>
-                                                                               
                                        <input type="checkbox" 
name="clear_{name}_box"  onClick="{$clear_function}" >
-                                                                               
                                                <xsl:attribute name="title">
-                                                                               
                                                        <xsl:value-of 
select="php:function('lang', 'delete')" />
+                                                                               
                                        <xsl:value-of select="contact_tel"/>
+                                                                               
                                </td>
+                                                                               
                        </tr>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="contact_email!=''">
+                                                                               
                        <tr>
+                                                                               
                                <td>
+                                                                               
                                        <a 
href="mailto:{contact_email}";><xsl:value-of select="contact_email"/></a>
+                                                                               
                                </td>
+                                                                               
                        </tr>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</table>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='ABO'">
+                                                                               
<table>
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <xsl:variable name="org_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
+                                                                               
                        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
                        <input type="hidden" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                                <xsl:choose>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
                                                                                
                                                </xsl:attribute>
-                                                                               
                                                <xsl:attribute name="readonly">
-                                                                               
                                                        
<xsl:text>readonly</xsl:text>
+                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                        <input  size="30" type="text" name="{$org_name}" 
value="{org_name}"  onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
                                <xsl:choose>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
                                                                                
                                                </xsl:attribute>
-                                                                               
                                        </input>
+                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="org_tel!=''">
+                                                                               
                        <tr>
+                                                                               
                                <td>
+                                                                               
                                        <xsl:value-of select="org_tel"/>
                                                                                
                                </td>
                                                                                
                        </tr>
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="contact_tel!=''">
-                                                                               
                                        <tr>
-                                                                               
                                                <td>
-                                                                               
                                                        <xsl:value-of 
select="contact_tel"/>
-                                                                               
                                                </td>
-                                                                               
                                        </tr>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="contact_email!=''">
-                                                                               
                                        <tr>
-                                                                               
                                                <td>
-                                                                               
                                                        <a 
href="mailto:{contact_email}";><xsl:value-of select="contact_email"/></a>
-                                                                               
                                                </td>
-                                                                               
                                        </tr>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </table>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="org_email!=''">
+                                                                               
                        <tr>
+                                                                               
                                <td>
+                                                                               
                                        <a 
href="mailto:{org_email}";><xsl:value-of select="org_email"/></a>
+                                                                               
                                </td>
+                                                                               
                        </tr>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</table>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='VENDOR'">
+                                                                               
<xsl:variable name="vendor_name"><xsl:value-of 
select="name"/><xsl:text>_org_name</xsl:text></xsl:variable>
+                                                                               
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
<input type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                               
<input  size="30" type="text" name="{$vendor_name}" value="{vendor_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                       
</xsl:when>     
+                                                                       
<xsl:when test="datatype='user'">
+                                                                               
<xsl:variable name="user_name"><xsl:value-of 
select="name"/><xsl:text>_user_name</xsl:text></xsl:variable>
+                                                                               
<xsl:variable name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
+                                                                               
<input type="text" name="{name}" value="{value}" onClick="{$lookup_function}" 
readonly="readonly" size="6">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                               
<input  size="30" type="text" name="{$user_name}" value="{user_name}"  
onClick="{$lookup_function}" readonly="readonly"> 
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='D'">
+                                                                               
<input type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12" >
+                                                                               
        <xsl:attribute name="readonly">
+                                                                               
                <xsl:text> readonly</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                               
<img id="values_attribute_{counter}-trigger" src="{img_cal}" 
alt="{lang_datetitle}" title="{lang_datetitle}" style="cursor:pointer; 
cursor:hand;" />
+                                                                       
</xsl:when>     
+                                                                       
<xsl:when test="datatype='T'">
+                                                                               
<textarea cols="{//textareacols}" rows="{//textarearows}" 
name="values_attribute[{counter}][value]" >
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
        <xsl:value-of select="value"/>          
+                                                                               
</textarea>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='pwd'">
+                                                                               
<table>
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <input type="password" 
name="values_attribute[{counter}][value]"  size="30">
+                                                                               
                                <xsl:choose>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                </xsl:attribute>
+                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
        <tr>
+                                                                               
                <td>
+                                                                               
                        <input type="password" 
name="values_attribute[{counter}][value2]"  size="30">
+                                                                               
                                <xsl:choose>
+                                                                               
                                        <xsl:when test="disabled!=''">
+                                                                               
                                                <xsl:attribute name="disabled">
+                                                                               
                                                        <xsl:text> 
disabled</xsl:text>
+                                                                               
                                                </xsl:attribute>
+                                                                               
                                        </xsl:when>
+                                                                               
                                </xsl:choose>
+                                                                               
                        </input>
+                                                                               
                </td>
+                                                                               
        </tr>
+                                                                               
</table>
+                                                                       
</xsl:when>
+                                                                       
<xsl:when test="datatype='event'">
+                                                                               
<xsl:choose>
+                                                                               
        <xsl:when test="warning!=''">
+                                                                               
                <xsl:value-of select="warning"/>
                                                                                
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='ABO'">
+                                                                               
        <xsl:otherwise>
+                                                                               
                <xsl:variable name="event_descr"><xsl:value-of 
select="name"/><xsl:text>_descr</xsl:text></xsl:variable>
+                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
                                                                                
                <table>
                                                                                
                        <tr>
                                                                                
                                <td>
-                                                                               
                                        <xsl:variable 
name="org_name"><xsl:value-of 
select="name"/><xsl:text>_name</xsl:text></xsl:variable>
-                                                                               
                                        <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                                        <input type="hidden" name="{name}" 
value="{value}" onClick="{$lookup_function}" readonly="readonly" size="5">
+                                                                               
                                        <input type="text" name="{name}" 
value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6"></input>
+                                                                               
                                        <input  size="30" type="text" 
name="{$event_descr}" value="{descr}"  onClick="{$lookup_function}" 
readonly="readonly"> 
                                                                                
                                                <xsl:choose>
                                                                                
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
+                                                                               
                                                        <xsl:attribute 
name="disabled">
                                                                                
                                                                        
<xsl:text> disabled</xsl:text>
                                                                                
                                                                </xsl:attribute>
                                                                                
                                                        </xsl:when>
                                                                                
                                                </xsl:choose>
                                                                                
                                        </input>
-                                                                               
                                        <input  size="30" type="text" 
name="{$org_name}" value="{org_name}"  onClick="{$lookup_function}" 
readonly="readonly"> 
-                                                                               
                                                <xsl:choose>
-                                                                               
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
-                                                                               
                                                                        
<xsl:text> disabled</xsl:text>
-                                                                               
                                                                </xsl:attribute>
-                                                                               
                                                        </xsl:when>
-                                                                               
                                                </xsl:choose>
-                                                                               
                                        </input>
                                                                                
                                </td>
                                                                                
                        </tr>
                                                                                
                        <xsl:choose>
-                                                                               
                                <xsl:when test="org_tel!=''">
+                                                                               
                                <xsl:when test="next!=''">
                                                                                
                                        <tr>
                                                                                
                                                <td>
-                                                                               
                                                        <xsl:value-of 
select="org_tel"/>
+                                                                               
                                                        <xsl:value-of 
select="lang_next_run"/>
+                                                                               
                                                        <xsl:text>: </xsl:text>
+                                                                               
                                                        <xsl:value-of 
select="next"/>
                                                                                
                                                </td>
                                                                                
                                        </tr>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="org_email!=''">
                                                                                
                                        <tr>
                                                                                
                                                <td>
-                                                                               
                                                        <a 
href="mailto:{org_email}";><xsl:value-of select="org_email"/></a>
+                                                                               
                                                        <xsl:value-of 
select="lang_enabled"/>
+                                                                               
                                                        <xsl:text>: </xsl:text>
+                                                                               
                                                        <xsl:value-of 
select="enabled"/>
                                                                                
                                                </td>
                                                                                
                                        </tr>
                                                                                
                                </xsl:when>
                                                                                
                        </xsl:choose>
                                                                                
                </table>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='VENDOR'">
-                                                                               
                <xsl:variable name="vendor_name"><xsl:value-of 
select="name"/><xsl:text>_org_name</xsl:text></xsl:variable>
-                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                <input type="text" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="6">
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
                <input  size="30" type="text" name="{$vendor_name}" 
value="{vendor_name}"  onClick="{$lookup_function}" readonly="readonly"> 
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
        </xsl:when>     
-                                                                               
        <xsl:when test="datatype='user'">
-                                                                               
                <xsl:variable name="user_name"><xsl:value-of 
select="name"/><xsl:text>_user_name</xsl:text></xsl:variable>
-                                                                               
                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                <input type="text" name="{name}" value="{value}" 
onClick="{$lookup_function}" readonly="readonly" size="6">
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
                <input  size="30" type="text" name="{$user_name}" 
value="{user_name}"  onClick="{$lookup_function}" readonly="readonly"> 
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='D'">
-                                                                               
                <input type="text" id="values_attribute_{counter}" 
name="values_attribute[{counter}][value]" value="{value}"  size="12" 
maxlength="12" >
-                                                                               
                        <xsl:attribute name="readonly">
-                                                                               
                                <xsl:text> readonly</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
-                                                                               
                <img id="values_attribute_{counter}-trigger" src="{img_cal}" 
alt="{lang_datetitle}" title="{lang_datetitle}" style="cursor:pointer; 
cursor:hand;" />
-                                                                               
        </xsl:when>     
-                                                                               
        <xsl:when test="datatype='T'">
-                                                                               
                <textarea cols="{//textareacols}" rows="{//textarearows}" 
name="values_attribute[{counter}][value]" >
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                        <xsl:value-of select="value"/>          
-                                                                               
                </textarea>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='pwd'">
-                                                                               
                <table>
-                                                                               
                        <tr>
-                                                                               
                                <td>
-                                                                               
                                        <input type="password" 
name="values_attribute[{counter}][value]"  size="30">
-                                                                               
                                                <xsl:choose>
-                                                                               
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
-                                                                               
                                                                        
<xsl:text> disabled</xsl:text>
-                                                                               
                                                                </xsl:attribute>
-                                                                               
                                                        </xsl:when>
-                                                                               
                                                </xsl:choose>
-                                                                               
                                        </input>
-                                                                               
                                </td>
-                                                                               
                        </tr>
-                                                                               
                        <tr>
-                                                                               
                                <td>
-                                                                               
                                        <input type="password" 
name="values_attribute[{counter}][value2]"  size="30">
-                                                                               
                                                <xsl:choose>
-                                                                               
                                                        <xsl:when 
test="disabled!=''">
-                                                                               
                                                                <xsl:attribute 
name="disabled">
-                                                                               
                                                                        
<xsl:text> disabled</xsl:text>
-                                                                               
                                                                </xsl:attribute>
-                                                                               
                                                        </xsl:when>
-                                                                               
                                                </xsl:choose>
-                                                                               
                                        </input>
-                                                                               
                                </td>
-                                                                               
                        </tr>
-                                                                               
                </table>
-                                                                               
        </xsl:when>
-                                                                               
        <xsl:when test="datatype='event'">
-                                                                               
                <xsl:choose>
-                                                                               
                        <xsl:when test="warning!=''">
-                                                                               
                                <xsl:value-of select="warning"/>
-                                                                               
                        </xsl:when>
-                                                                               
                        <xsl:otherwise>
-                                                                               
                                <xsl:variable name="event_descr"><xsl:value-of 
select="name"/><xsl:text>_descr</xsl:text></xsl:variable>
-                                                                               
                                <xsl:variable 
name="lookup_function"><xsl:text>lookup_</xsl:text><xsl:value-of 
select="name"/><xsl:text>();</xsl:text></xsl:variable>
-                                                                               
                                <table>
-                                                                               
                                        <tr>
-                                                                               
                                                <td>
-                                                                               
                                                        <input type="text" 
name="{name}" value="{value}" onClick="{$lookup_function}" readonly="readonly" 
size="6"></input>
-                                                                               
                                                        <input  size="30" 
type="text" name="{$event_descr}" value="{descr}"  onClick="{$lookup_function}" 
readonly="readonly"> 
-                                                                               
                                                                <xsl:choose>
-                                                                               
                                                                        
<xsl:when test="disabled!=''">
-                                                                               
                                                                                
<xsl:attribute name="disabled">
-                                                                               
                                                                                
        <xsl:text> disabled</xsl:text>
-                                                                               
                                                                                
</xsl:attribute>
-                                                                               
                                                                        
</xsl:when>
-                                                                               
                                                                </xsl:choose>
-                                                                               
                                                        </input>
-                                                                               
                                                </td>
-                                                                               
                                        </tr>
-                                                                               
                                        <xsl:choose>
-                                                                               
                                                <xsl:when test="next!=''">
-                                                                               
                                                        <tr>
-                                                                               
                                                                <td>
-                                                                               
                                                                        
<xsl:value-of select="lang_next_run"/>
-                                                                               
                                                                        
<xsl:text>: </xsl:text>
-                                                                               
                                                                        
<xsl:value-of select="next"/>
-                                                                               
                                                                </td>
-                                                                               
                                                        </tr>
-                                                                               
                                                        <tr>
-                                                                               
                                                                <td>
-                                                                               
                                                                        
<xsl:value-of select="lang_enabled"/>
-                                                                               
                                                                        
<xsl:text>: </xsl:text>
-                                                                               
                                                                        
<xsl:value-of select="enabled"/>
-                                                                               
                                                                </td>
-                                                                               
                                                        </tr>
-                                                                               
                                                </xsl:when>
-                                                                               
                                        </xsl:choose>
-                                                                               
                                </table>
-                                                                               
                        </xsl:otherwise>
-                                                                               
                </xsl:choose>
-                                                                               
        </xsl:when>     
-                                                                               
        <xsl:otherwise>
-                                                                               
                <input type="text" name="values_attribute[{counter}][value]" 
value="{value}" size="30">
-                                                                               
                        <xsl:choose>
-                                                                               
                                <xsl:when test="disabled!=''">
-                                                                               
                                        <xsl:attribute name="disabled">
-                                                                               
                                                <xsl:text> disabled</xsl:text>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                </xsl:when>
-                                                                               
                        </xsl:choose>
-                                                                               
                </input>
                                                                                
        </xsl:otherwise>
                                                                                
</xsl:choose>
-                                                                               
<xsl:choose>
-                                                                               
        <xsl:when test="history=1">
-                                                                               
                <input type="text" name="values_attribute[{counter}][date]" 
value="" onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" 
onBlur="{//onBlur}" size="12" maxlength="10" >
-                                                                               
                </input>
-                                                                               
                <xsl:variable name="link_history"><xsl:value-of 
select="link_history"/></xsl:variable>
-                                                                               
                <xsl:variable name="lang_history_help"><xsl:value-of 
select="//lang_history_help"/></xsl:variable>
-                                                                               
                <xsl:variable name="lang_history"><xsl:value-of 
select="//lang_history"/></xsl:variable>
-                                                                               
                <a href="javascript:var 
w=window.open('{$link_history}','','width=550,height=400,scrollbars')"
-                                                                               
                onMouseOver="overlib('{$lang_history_help}', CAPTION, 
'{$lang_history}')"
-                                                                               
                onMouseOut="nd()">
-                                                                               
                <xsl:value-of select="//lang_history"/></a>                     
                                        
-                                                                               
        </xsl:when>
-                                                                               
</xsl:choose>
+                                                                       
</xsl:when>     
+                                                                       
<xsl:otherwise>
+                                                                               
<input type="text" name="values_attribute[{counter}][value]" value="{value}" 
size="30">
+                                                                               
        <xsl:choose>
+                                                                               
                <xsl:when test="disabled!=''">
+                                                                               
                        <xsl:attribute name="disabled">
+                                                                               
                                <xsl:text> disabled</xsl:text>
+                                                                               
                        </xsl:attribute>
+                                                                               
                </xsl:when>
+                                                                               
        </xsl:choose>
+                                                                               
</input>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="history=1">
+                                                                               
<input type="text" name="values_attribute[{counter}][date]" value="" 
onFocus="{//dateformat_validate}" onKeyUp="{//onKeyUp}" onBlur="{//onBlur}" 
size="12" maxlength="10" >
+                                                                               
</input>
+                                                                               
<xsl:variable name="link_history"><xsl:value-of 
select="link_history"/></xsl:variable>
+                                                                               
<xsl:variable name="lang_history_help"><xsl:value-of 
select="//lang_history_help"/></xsl:variable>
+                                                                               
<xsl:variable name="lang_history"><xsl:value-of 
select="//lang_history"/></xsl:variable>
+                                                                               
<a href="javascript:var 
w=window.open('{$link_history}','','width=550,height=400,scrollbars')"
+                                                                               
onMouseOver="overlib('{$lang_history_help}', CAPTION, '{$lang_history}')"
+                                                                               
onMouseOut="nd()">
+                                                                               
<xsl:value-of select="//lang_history"/></a>                                     
                        
                                                                        
</xsl:when>
                                                                </xsl:choose>
-                                                       </td>
-                                               </tr>
-                                       </xsl:for-each>
-                               </table>
-                       </div>
-               </xsl:for-each>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                       </td>
+                               </tr>
+                       </xsl:for-each>
        </xsl:template>
 
        <xsl:template name="choice">

Modified: trunk/property/templates/base/request.xsl
===================================================================
--- trunk/property/templates/base/request.xsl   2010-12-21 10:33:02 UTC (rev 
6688)
+++ trunk/property/templates/base/request.xsl   2010-12-21 14:23:40 UTC (rev 
6689)
@@ -623,6 +623,7 @@
                                                                                
        </table>
                                                                                
</td>
                                                                </tr>
+                                                               
<xsl:call-template name="attributes"/>
                                                        </table>
                                                </div>
 




reply via email to

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