fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10560] property: more on condition survey - and some


From: Sigurd Nes
Subject: [Fmsystem-commits] [10560] property: more on condition survey - and some formatting
Date: Fri, 30 Nov 2012 13:52:21 +0000

Revision: 10560
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10560
Author:   sigurdne
Date:     2012-11-30 13:52:18 +0000 (Fri, 30 Nov 2012)
Log Message:
-----------
property: more on condition survey - and some formatting

Modified Paths:
--------------
    trunk/property/inc/class.uicondition_survey.inc.php
    trunk/property/templates/base/attributes_form.xsl
    trunk/property/templates/base/attributes_view.xsl
    trunk/property/templates/base/condition_survey.xsl
    trunk/property/templates/base/contact_form.xsl
    trunk/property/templates/base/location_form.xsl
    trunk/property/templates/base/location_view.xsl
    trunk/property/templates/base/tts.xsl

Modified: trunk/property/inc/class.uicondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.uicondition_survey.inc.php 2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/inc/class.uicondition_survey.inc.php 2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -46,7 +46,8 @@
                        'get_vendors'           => true,
                        'get_users'                     => true,
                        'edit_survey_title'     => true,
-                       'get_files'                     => true
+                       'get_files'                     => true,
+                       'view_file'                     => true
                );
 
                public function __construct()
@@ -64,7 +65,6 @@
                        $this->acl_manage                       = 
$this->acl->check($this->acl_location, 16, 'property');
 
                        $GLOBALS['phpgw_info']['flags']['menu_selection'] = 
"property::condition_survey";
-       //              
$GLOBALS['phpgw']->css->add_external_file('logistic/templates/base/css/base.css');
                }
 
 
@@ -216,7 +216,7 @@
                        $export = phpgw::get_var('export');
 
                        $values = $this->bo->read($params);
-//_debug_array($values);
+
                        // ... add result data
                        $result_data = array('results' => $values);
 
@@ -251,9 +251,19 @@
                        $this->edit();
                }
 
+               /**
+               * Prepare data for view and edit - depending on mode
+               *
+               * @param array  $values  populated object in case of retry
+               * @param string $mode    edit or view
+               * @param int    $id      entity id - no id means 'new'
+               *
+               * @return void
+               */
+
                public function edit($values = array(), $mode = 'edit')
                {
-                       $id     = phpgw::get_var('id', 'int');
+                       $id     = (int)phpgw::get_var('id');
 
                        if(!$this->acl_add && !$this->acl_edit)
                        {
@@ -348,7 +358,7 @@
                                'tabs'                                          
        => phpgwapi_yui::tabview_generate($tabs, $active_tab),
                                'multiple_uploader'                             
=> $mode == 'edit' ? true : '',
                        );
-//_debug_array($data);die();
+
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . '::' . lang('condition survey');
 
                        if($mode == 'edit')
@@ -368,9 +378,18 @@
                        self::render_template_xsl(array('condition_survey'), 
$data);
                }
 
+
+               /**
+               * Saves an entry to the database for new/edit - redirects to 
view
+               *
+               * @param int  $id  entity id - no id means 'new'
+               *
+               * @return void
+               */
+
                public function save()
                {
-                       $id = phpgw::get_var('id');
+                       $id = (int)phpgw::get_var('id');
 
                        if ($id )
                        {
@@ -409,29 +428,24 @@
                                }
 
                                $this->_handle_files($id);
+                               $this->_handle_import($id);
                                phpgwapi_cache::message_set('ok!', 'message'); 
                                $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'property.uicondition_survey.view', 'id' => $id));
                        }
                }
 
+               /**
+               * Fetch a list of files to be displayed in view/edit
+               *
+               * @param int  $id  entity id
+               *
+               * @return array $ResultSet json resultset
+               */
 
                public function get_files()
                {
-                       $values = array();
-                       $values[] = array
-                       (
-                               'id'    => 1,
-                               'name' => 2,
-                               'file_name' => '<a 
href="'.$link_view_file.'&amp;file_name='.$_entry['name'].'" target="_blank" 
title="'.lang('click to view file').'">'.$_entry['name'].'hei</a>',
-                               'delete_file' => '<input type="checkbox" 
name="values[file_action][]" value="'.$_entry['name'].'" title="'.lang('Check 
to delete file').'">'
-                       );
+                       $id     = phpgw::get_var('id', 'REQUEST', 'int');
 
-
-                       return array('ResultSet'=> array('Result'=>$values));
-
-
-                       $id     = phpgw::get_var('id', 'int');
-
                        if( !$this->acl_read)
                        {
                                return;
@@ -439,48 +453,64 @@
 
                        $link_file_data = array
                        (
-                               'menuaction'    => 'property.uitts.view_file',
+                               'menuaction'    => 
'property.uicondition_survey.view_file',
                                'id'                    => $id
                        );
 
-                       $link_to_files = 
isset($this->bo->config->config_data['files_url']) ? 
$this->bo->config->config_data['files_url']:'';
 
-                       $link_view_file = 
$GLOBALS['phpgw']->link('/index.php',$link_file_data);
-                       $values = $this->bo->read_single($id);
+                       $link_view_file = self::link($link_file_data);
 
-                       $content_files = array();
+                       $vfs = CreateObject('phpgwapi.vfs');
+                       $vfs->override_acl = 1;
 
-                       foreach($values['files'] as $_entry )
+                       $files = $vfs->ls(array(
+                               'string' => "/property/condition_survey/{$id}",
+                               'relatives' => array(RELATIVE_NONE)));
+
+                       $vfs->override_acl = 0;
+
+
+                       $lang_view = lang('click to view file');
+                       $lang_delete = lang('click to delete file');
+
+                       $values = array();
+                       foreach($files as $_entry )
                        {
-                               $content_files[] = array
+                               $values[] = array
                                (
-                                       'file_name' => '<a 
href="'.$link_view_file.'&amp;file_name='.$_entry['name'].'" target="_blank" 
title="'.lang('click to view file').'">'.$_entry['name'].'</a>',
-                                       'delete_file' => '<input 
type="checkbox" name="values[file_action][]" value="'.$_entry['name'].'" 
title="'.lang('Check to delete file').'">',
-                                       'attach_file' => '<input 
type="checkbox" name="values[file_attach][]" value="'.$_entry['name'].'" 
title="'.lang('Check to attach file').'">'
+                                       'file_name' => "<a 
href='{$link_view_file}&amp;file_name={$_entry['name']}' target='_blank' 
title='{$lang_view}'>{$_entry['name']}</a>",
+                                       'delete_file' => "<input 
type='checkbox' name='values[file_action][]' value='{$_entry['name']}' 
title='$lang_delete'>",
                                );
                        }                                                       
 
-                       if( phpgw::get_var('phpgw_return_as') == 'json' )
+                       return array('ResultSet'=> array('Result'=>$values), 
'totalResultsAvailable' => count($values));
+               }
+
+
+               /**
+               * Dowloads a single file to the browser
+               *
+               * @param int  $id  entity id
+               *
+               * @return file
+               */
+
+               function view_file()
+               {
+                       if(!$this->acl_read)
                        {
+                               return lang('no access');
+                       }
 
-                               if(count($content_files))
-                               {
-                                       return json_encode($content_files);
-                               }
-                               else
-                               {
-                                       return "";
-                               }
-                       }
-                       return $content_files;
+                       $bofiles        = CreateObject('property.bofiles');
+                       $bofiles->view_file('condition_survey');
                }
 
 
-
                /**
                * Store and / or delete files related to an entity
                *
-               * @param string  $id  entity id
+               * @param int  $id  entity id
                *
                * @return void
                */
@@ -527,6 +557,61 @@
 
 
                /**
+               * Import deviations found in the survey to the database from a 
spreadsheet
+               *
+               * @param int  $id  entity id
+               *
+               * @return void
+               */
+               private function _handle_import($id)
+               {
+                       $id = (int)$id;
+                       if(!$id)
+                       {
+                               throw new 
Exception('uicondition_survey::_handle_import() - missing id');
+                       }
+
+                       $file = $_FILES['import_file']['tmp_name'];
+
+                       phpgwapi_cache::session_set('property', 'import_file', 
$file);
+
+                       phpgw::import_class('phpgwapi.phpexcel');
+
+                       $objPHPExcel = PHPExcel_IOFactory::load($file);
+                       $AllSheets = $objPHPExcel->getSheetNames();
+_debug_array($file);
+_debug_array($AllSheets);die();
+                       $data = 
$objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
+
+                       $start = 1; // Where to start
+
+                       $fields = array_values($data[($start-1)]);
+
+                       $rows = count($data)+1;
+
+                       $result = array();
+
+                       for ($i=$start; $i<$rows; $i++ )
+                       {
+                               $_result = array();
+                               $j=0;
+                               foreach($data[$i] as $key => $value)
+                               {
+                                       $_result[$j] = trim($value);
+                                       $j++;
+                               }
+                               $result[] = $_result;
+                       }
+
+                       $msg = "'{$path}' contained " . count($result) . " 
lines";
+
+_debug_array($msg);
+_debug_array($result);die();
+
+               }
+
+
+               /**
                * Gets user candidates to be used as coordinator - called as 
ajax from edit form
                *
                * @param string  $query

Modified: trunk/property/templates/base/attributes_form.xsl
===================================================================
--- trunk/property/templates/base/attributes_form.xsl   2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/attributes_form.xsl   2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -36,6 +36,7 @@
                        <xsl:choose>
                                <xsl:when test="not(hide_row)">
                                        <td align="left" width="19%" 
valign="top" title="{$statustext}">
+                                               <label>
                                                <xsl:choose>
                                                        <xsl:when 
test="helpmsg=1">
                                                                <xsl:variable 
name="help_url">
@@ -66,6 +67,7 @@
                                                                <xsl:text> 
]</xsl:text>
                                                        </xsl:when>
                                                </xsl:choose>
+                                               </label>
                                        </td>
                                </xsl:when>
                        </xsl:choose>

Modified: trunk/property/templates/base/attributes_view.xsl
===================================================================
--- trunk/property/templates/base/attributes_view.xsl   2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/attributes_view.xsl   2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -18,6 +18,7 @@
                                </xsl:choose>
                        </xsl:attribute>
                        <td align="left" valign="top">
+                               <label>
                                <xsl:value-of select="input_text"/>
                                <xsl:choose>
                                        <xsl:when test="datatype='D'">
@@ -26,6 +27,7 @@
                                                <xsl:text>]</xsl:text>
                                        </xsl:when>
                                </xsl:choose>
+                               </label>
                        </td>
                        <td align="left">
                                <xsl:choose>

Modified: trunk/property/templates/base/condition_survey.xsl
===================================================================
--- trunk/property/templates/base/condition_survey.xsl  2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/condition_survey.xsl  2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -2,6 +2,8 @@
 
        <!-- add / edit -->
 <xsl:template match="data" xmlns:formvalidator="http://www.w3.org/TR/html4/"; 
xmlns:php="http://php.net/xsl";>
+               <xsl:call-template name="yui_phpgw_i18n"/>
+
                <div class="yui-navset" id="survey_edit_tabview">
        
                <h1>

Modified: trunk/property/templates/base/contact_form.xsl
===================================================================
--- trunk/property/templates/base/contact_form.xsl      2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/contact_form.xsl      2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -14,9 +14,11 @@
                </script>
                <tr>
                        <td valign="top">
-                               <a href="javascript:{field}_contact_lookup()" 
title="{lang_select_contact_help}">
-                                       <xsl:value-of select="lang_contact"/>
-                               </a>
+                               <label>
+                                       <a 
href="javascript:{field}_contact_lookup()" title="{lang_select_contact_help}">
+                                               <xsl:value-of 
select="lang_contact"/>
+                                       </a>
+                               </label>
                        </td>
                        <td>
                                <table>

Modified: trunk/property/templates/base/location_form.xsl
===================================================================
--- trunk/property/templates/base/location_form.xsl     2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/location_form.xsl     2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -8,16 +8,18 @@
                <xsl:for-each select="location">
                        <tr>
                                <td class="th_text" width="{with}" 
align="{align}" title="{statustext}">
-                                       <xsl:choose>
-                                               <xsl:when test="lookup_link=1">
-                                                       <a 
href="javascript:{lookup_function_call}" title="{statustext}">
+                                       <label>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="lookup_link=1">
+                                                               <a 
href="javascript:{lookup_function_call}" title="{statustext}">
+                                                                       
<xsl:value-of select="name"/>
+                                                               </a>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
                                                                <xsl:value-of 
select="name"/>
-                                                       </a>
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:value-of 
select="name"/>
-                                               </xsl:otherwise>
-                                       </xsl:choose>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </label>
                                </td>
                                <td>
                                        <xsl:choose>

Modified: trunk/property/templates/base/location_view.xsl
===================================================================
--- trunk/property/templates/base/location_view.xsl     2012-11-30 08:25:57 UTC 
(rev 10559)
+++ trunk/property/templates/base/location_view.xsl     2012-11-30 13:52:18 UTC 
(rev 10560)
@@ -10,7 +10,9 @@
                                <xsl:when test="value !=''">
                                        <tr>
                                                <td class="th_text" 
width="{with}" align="left">
-                                                       <xsl:value-of 
select="name"/>
+                                                       <label>
+                                                               <xsl:value-of 
select="name"/>
+                                                       </label>
                                                </td>
                                                <td align="left">
                                                        <xsl:choose>

Modified: trunk/property/templates/base/tts.xsl
===================================================================
--- trunk/property/templates/base/tts.xsl       2012-11-30 08:25:57 UTC (rev 
10559)
+++ trunk/property/templates/base/tts.xsl       2012-11-30 13:52:18 UTC (rev 
10560)
@@ -13,499 +13,10 @@
                        <xsl:when test="view2">
                                <xsl:apply-templates select="view2"/>
                        </xsl:when>
-                       <xsl:when test="list2">
-                               <xsl:apply-templates select="list2"/>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:apply-templates select="list"/>
-                       </xsl:otherwise>
                </xsl:choose>
        </xsl:template>
 
-       <!-- New template-->
-       <xsl:template match="list">
-               <xsl:variable name="autorefresh">
-                       <xsl:value-of select="autorefresh"/>
-               </xsl:variable>
-               <META HTTP-EQUIV="Refresh" CONTENT="{$autorefresh}"/>
-               <xsl:apply-templates select="menu"/>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:choose>
-                               <xsl:when test="msgbox_data != ''">
-                                       <tr>
-                                               <td align="left" colspan="3">
-                                                       <xsl:call-template 
name="msgbox"/>
-                                               </td>
-                                       </tr>
-                               </xsl:when>
-                       </xsl:choose>
-                       <tr>
-                               <xsl:choose>
-                                       <xsl:when test="group_filters != ''">
-                                               <xsl:variable 
name="select_action">
-                                                       <xsl:value-of 
select="select_action"/>
-                                               </xsl:variable>
-                                               <form method="post" 
name="search" action="{$select_action}">
-                                                       <td>
-                                                               
<xsl:call-template name="categories"/>
-                                                       </td>
-                                                       <td>
-                                                               
<xsl:call-template name="select_district"/>
-                                                       </td>
-                                                       <td align="center">
-                                                               
<xsl:call-template name="filter_select"/>
-                                                       </td>
-                                                       <td align="center">
-                                                               
<xsl:call-template name="user_id_select"/>
-                                                       </td>
-                                                       <td align="right">
-                                                               
<xsl:call-template name="search_field_grouped"/>
-                                                       </td>
-                                               </form>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <td>
-                                                       <xsl:call-template 
name="categories"/>
-                                               </td>
-                                               <td>
-                                                       <xsl:call-template 
name="filter_district"/>
-                                               </td>
-                                               <td align="center">
-                                                       <xsl:call-template 
name="filter_filter"/>
-                                               </td>
-                                               <td align="center">
-                                                       <xsl:call-template 
name="user_id_filter"/>
-                                               </td>
-                                               <td align="right">
-                                                       <xsl:call-template 
name="search_field"/>
-                                               </td>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                               <td class="small_text" valign="top" 
align="left">
-                                       <xsl:variable name="link_download">
-                                               <xsl:value-of 
select="link_download"/>
-                                       </xsl:variable>
-                                       <xsl:variable name="lang_download_help">
-                                               <xsl:value-of 
select="lang_download_help"/>
-                                       </xsl:variable>
-                                       <xsl:variable name="lang_download">
-                                               <xsl:value-of 
select="lang_download"/>
-                                       </xsl:variable>
-                                       <a href="javascript:var 
w=window.open('{$link_download}','','left=50,top=100')" 
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')" 
onMouseOut="nd()">
-                                               <xsl:value-of 
select="lang_download"/>
-                                       </a>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="8" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header"/>
-                       <xsl:apply-templates select="values"/>
-                       <xsl:apply-templates select="table_add"/>
-               </table>
-       </xsl:template>
 
-       <!-- New template-->
-       <xsl:template match="table_header">
-               <xsl:variable name="lang_priority_statustext">
-                       <xsl:value-of select="lang_priority_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_id_statustext">
-                       <xsl:value-of select="lang_id_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_opened_by_statustext">
-                       <xsl:value-of select="lang_opened_by_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_assigned_to_statustext">
-                       <xsl:value-of select="lang_assigned_to_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_finnish_statustext">
-                       <xsl:value-of select="lang_finnish_statustext"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="1%" align="right">
-                               <xsl:variable name="sort_priority">
-                                       <xsl:value-of select="sort_priority"/>
-                               </xsl:variable>
-                               <a href="{$sort_priority}" 
onMouseover="window.status='{$lang_priority_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_priority"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="6%" align="right">
-                               <xsl:variable name="sort_id">
-                                       <xsl:value-of select="sort_id"/>
-                               </xsl:variable>
-                               <a href="{$sort_id}" 
onMouseover="window.status='{$lang_id_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%">
-                               <xsl:value-of select="lang_subject"/>
-                       </td>
-                       <td class="th_text" width="15%" align="left">
-                               <xsl:value-of select="lang_location_code"/>
-                       </td>
-                       <td class="th_text" width="30%" align="left">
-                               <xsl:value-of select="lang_address"/>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_opened_by">
-                                       <xsl:value-of select="sort_opened_by"/>
-                               </xsl:variable>
-                               <a href="{$sort_opened_by}" 
onMouseover="window.status='{$lang_opened_by_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_opened_by"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_assigned_to">
-                                       <xsl:value-of 
select="sort_assigned_to"/>
-                               </xsl:variable>
-                               <a href="{$sort_assigned_to}" 
onMouseover="window.status='{$lang_assigned_to_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_assigned_to"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_date">
-                                       <xsl:value-of select="sort_date"/>
-                               </xsl:variable>
-                               <a href="{$sort_date}" 
onMouseover="window.status='{$lang_opened_by_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_time_created"/>
-                               </a>
-                       </td>
-                       <xsl:for-each select="extra">
-                               <td class="th_text" width="{with}" 
align="{align}">
-                                       <xsl:value-of select="header"/>
-                               </td>
-                       </xsl:for-each>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_finnish_date">
-                                       <xsl:value-of 
select="sort_finnish_date"/>
-                               </xsl:variable>
-                               <a href="{$sort_finnish_date}" 
onMouseover="window.status='{$lang_finnish_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_finnish_date"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="15%" align="center">
-                               <xsl:value-of select="lang_delay"/>
-                       </td>
-                       <td class="th_text" width="15%" align="center">
-                               <xsl:value-of select="lang_status"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values">
-               <xsl:variable name="lang_view_statustext">
-                       <xsl:value-of select="lang_view_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="link_view">
-                       <xsl:value-of select="link_view"/>
-               </xsl:variable>
-               <tr bgcolor="{bgcolor}">
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="priostr"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="new_ticket"/>
-                               <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="id"/>
-                               </a>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="subject"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="location_code"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="address"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="user"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="assignedto"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="date"/>
-                               </a>
-                       </td>
-                       <xsl:for-each select="child_date">
-                               <td class="small_text">
-                                       <xsl:for-each select="date_info">
-                                               <a href="{link}">
-                                                       <xsl:value-of 
select="entry_date"/>
-                                               </a>
-                                               <br/>
-                                       </xsl:for-each>
-                               </td>
-                       </xsl:for-each>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="finnish_date"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="delay"/>
-                       </td>
-                       <td class="small_text" valign="top" align="center">
-                               <xsl:choose>
-                                       <xsl:when test="//allow_edit_status != 
''">
-                                               <xsl:variable 
name="link_edit_status">
-                                                       <xsl:value-of 
select="link_edit_status"/>
-                                               </xsl:variable>
-                                               <xsl:variable 
name="lang_edit_status">
-                                                       <xsl:value-of 
select="lang_edit_status"/>
-                                               </xsl:variable>
-                                               <xsl:variable 
name="text_edit_status">
-                                                       <xsl:value-of 
select="text_edit_status"/>
-                                               </xsl:variable>
-                                               <xsl:variable name="status">
-                                                       <xsl:value-of 
select="status"/>
-                                               </xsl:variable>
-                                               <a href="{$link_edit_status}" 
onMouseOver="overlib('{$text_edit_status}', CAPTION, '{$lang_edit_status}')" 
onMouseOut="nd()">
-                                                       <xsl:value-of 
select="status"/>
-                                               </a>
-                                       </xsl:when>
-                                       <xsl:otherwise>
-                                               <xsl:value-of select="status"/>
-                                       </xsl:otherwise>
-                               </xsl:choose>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_add">
-               <tr>
-                       <td height="50">
-                               <xsl:variable name="add_action">
-                                       <xsl:value-of select="add_action"/>
-                               </xsl:variable>
-                               <xsl:variable name="lang_add">
-                                       <xsl:value-of select="lang_add"/>
-                               </xsl:variable>
-                               <form method="post" action="{$add_action}">
-                                       <input type="submit" name="add" 
value="{$lang_add}" onMouseout="window.status='';return true;">
-                                               <xsl:attribute 
name="onMouseover">
-                                                       
<xsl:text>window.status='</xsl:text>
-                                                       <xsl:value-of 
select="lang_add_statustext"/>
-                                                       <xsl:text>'; return 
true;</xsl:text>
-                                               </xsl:attribute>
-                                       </input>
-                               </form>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="list2">
-               <xsl:variable name="autorefresh">
-                       <xsl:value-of select="autorefresh"/>
-               </xsl:variable>
-               <META HTTP-EQUIV="Refresh" CONTENT="{$autorefresh}"/>
-               <xsl:apply-templates select="menu"/>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:choose>
-                               <xsl:when test="msgbox_data != ''">
-                                       <tr>
-                                               <td align="left" colspan="3">
-                                                       <xsl:call-template 
name="msgbox"/>
-                                               </td>
-                                       </tr>
-                               </xsl:when>
-                       </xsl:choose>
-                       <tr>
-                               <td align="left">
-                                       <xsl:call-template 
name="filter_filter"/>
-                               </td>
-                               <td colspan="10" align="right">
-                                       <xsl:call-template name="search_field"/>
-                               </td>
-                               <td class="small_text" valign="top" 
align="left">
-                                       <xsl:variable name="link_download">
-                                               <xsl:value-of 
select="link_download"/>
-                                       </xsl:variable>
-                                       <xsl:variable name="lang_download_help">
-                                               <xsl:value-of 
select="lang_download_help"/>
-                                       </xsl:variable>
-                                       <xsl:variable name="lang_download">
-                                               <xsl:value-of 
select="lang_download"/>
-                                       </xsl:variable>
-                                       <a href="javascript:var 
w=window.open('{$link_download}','','left=50,top=100')" 
onMouseOver="overlib('{$lang_download_help}', CAPTION, '{$lang_download}')" 
onMouseOut="nd()">
-                                               <xsl:value-of 
select="lang_download"/>
-                                       </a>
-                               </td>
-                       </tr>
-                       <tr>
-                               <td colspan="12" width="100%">
-                                       <xsl:call-template name="nextmatchs"/>
-                               </td>
-                       </tr>
-               </table>
-               <table width="100%" cellpadding="2" cellspacing="2" 
align="center">
-                       <xsl:apply-templates select="table_header2"/>
-                       <xsl:apply-templates select="values2"/>
-                       <xsl:apply-templates select="table_add"/>
-               </table>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="table_header2">
-               <xsl:variable name="lang_priority_statustext">
-                       <xsl:value-of select="lang_priority_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_id_statustext">
-                       <xsl:value-of select="lang_id_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_opened_by_statustext">
-                       <xsl:value-of select="lang_opened_by_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_assigned_to_statustext">
-                       <xsl:value-of select="lang_assigned_to_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="lang_finnish_statustext">
-                       <xsl:value-of select="lang_finnish_statustext"/>
-               </xsl:variable>
-               <tr class="th">
-                       <td class="th_text" width="1%" align="right">
-                               <xsl:variable name="sort_priority">
-                                       <xsl:value-of select="sort_priority"/>
-                               </xsl:variable>
-                               <a href="{$sort_priority}" 
onMouseover="window.status='{$lang_priority_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_priority"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="6%" align="right">
-                               <xsl:variable name="sort_id">
-                                       <xsl:value-of select="sort_id"/>
-                               </xsl:variable>
-                               <a href="{$sort_id}" 
onMouseover="window.status='{$lang_id_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_id"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="10%">
-                               <xsl:value-of select="lang_subject"/>
-                       </td>
-                       <td class="th_text" width="15%" align="left">
-                               <xsl:value-of select="lang_location_code"/>
-                       </td>
-                       <td class="th_text" width="30%" align="left">
-                               <xsl:value-of select="lang_address"/>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_opened_by">
-                                       <xsl:value-of select="sort_opened_by"/>
-                               </xsl:variable>
-                               <a href="{$sort_opened_by}" 
onMouseover="window.status='{$lang_opened_by_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="lang_opened_by"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_assigned_to">
-                                       <xsl:value-of 
select="sort_assigned_to"/>
-                               </xsl:variable>
-                               <a href="{$sort_assigned_to}" 
onMouseover="window.status='{$lang_assigned_to_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_assigned_to"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_date">
-                                       <xsl:value-of select="sort_date"/>
-                               </xsl:variable>
-                               <a href="{$sort_date}" 
onMouseover="window.status='{$lang_opened_by_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_time_created"/>
-                               </a>
-                       </td>
-                       <xsl:for-each select="extra">
-                               <td class="th_text" width="{with}" 
align="{align}">
-                                       <xsl:value-of select="header"/>
-                               </td>
-                       </xsl:for-each>
-                       <td class="th_text" width="8%" align="center">
-                               <xsl:variable name="sort_finnish_date">
-                                       <xsl:value-of 
select="sort_finnish_date"/>
-                               </xsl:variable>
-                               <a href="{$sort_finnish_date}" 
onMouseover="window.status='{$lang_finnish_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of 
select="lang_finnish_date"/>
-                               </a>
-                       </td>
-                       <td class="th_text" width="15%" align="center">
-                               <xsl:value-of select="lang_delay"/>
-                       </td>
-                       <td class="th_text" width="15%" align="center">
-                               <xsl:value-of select="lang_status"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
-       <!-- New template-->
-       <xsl:template match="values2">
-               <xsl:variable name="lang_view_statustext">
-                       <xsl:value-of select="lang_view_statustext"/>
-               </xsl:variable>
-               <xsl:variable name="link_view">
-                       <xsl:value-of select="link_view"/>
-               </xsl:variable>
-               <tr bgcolor="{bgcolor}">
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="priostr"/>
-                       </td>
-                       <td class="small_text" align="right">
-                               <xsl:value-of select="new_ticket"/>
-                               <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="id"/>
-                               </a>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="subject"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="location_code"/>
-                       </td>
-                       <td class="small_text" align="left">
-                               <xsl:value-of select="address"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="user"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="assignedto"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <a href="{$link_view}" 
onMouseover="window.status='{$lang_view_statustext}';return true;" 
onMouseout="window.status='';return true;">
-                                       <xsl:value-of select="date"/>
-                               </a>
-                       </td>
-                       <xsl:for-each select="child_date">
-                               <td class="small_text">
-                                       <xsl:for-each select="date_info">
-                                               <xsl:variable name="link">
-                                                       <xsl:value-of 
select="link"/>
-                                               </xsl:variable>
-                                               <a href="{$link}" 
onMouseover="window.status='';return true;" onMouseout="window.status='';return 
true;">
-                                                       <xsl:value-of 
select="entry_date"/>
-                                               </a>
-                                               <br/>
-                                       </xsl:for-each>
-                               </td>
-                       </xsl:for-each>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="finnish_date"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="delay"/>
-                       </td>
-                       <td class="small_text" align="center">
-                               <xsl:value-of select="status"/>
-                       </td>
-               </tr>
-       </xsl:template>
-
        <!-- add -->
        <xsl:template xmlns:php="http://php.net/xsl"; match="add">
                <script type="text/javascript">
@@ -532,7 +43,9 @@
                                                <xsl:for-each 
select="value_origin">
                                                        <tr>
                                                                <td 
valign="top">
-                                                                       
<xsl:value-of select="descr"/>
+                                                                       <label>
+                                                                               
<xsl:value-of select="descr"/>
+                                                                       </label>
                                                                </td>
                                                                <td>
                                                                        <table>
@@ -556,7 +69,9 @@
                                                <xsl:call-template 
name="location_form"/>
                                                <tr>
                                                        <td>
-                                                               <xsl:value-of 
select="lang_category"/>
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'category')"/>
+                                                               </label>
                                                        </td>
                                                        <td>
                                                                
<xsl:call-template name="categories"/>
@@ -566,7 +81,9 @@
                                                        <xsl:when test="simple 
!='1'">
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="php:function('lang', 'Group')"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="php:function('lang', 'Group')"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<xsl:call-template name="group_select"/>
@@ -574,7 +91,9 @@
                                                                </tr>
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="php:function('lang', 'Assign to')"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="php:function('lang', 'Assign to')"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<xsl:call-template name="user_id_select"/>
@@ -583,7 +102,9 @@
                                                                
<xsl:call-template name="contact_form"/>
                                                                <tr>
                                                                        <td>
+                                                                               
<label>
                                                                                
<xsl:value-of select="php:function('lang', 'Send e-mail')"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<input type="checkbox" name="values[send_mail]" value="1">
@@ -600,7 +121,9 @@
                                                                </tr>
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="php:function('lang', 'Priority')"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="php:function('lang', 'Priority')"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<xsl:variable name="lang_priority_statustext">
@@ -616,7 +139,9 @@
                                                                </tr>
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="php:function('lang', 'status')"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="php:function('lang', 'status')"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<select name="values[status]">
@@ -631,7 +156,9 @@
                                                                        
<xsl:when test="show_finnish_date ='1'">
                                                                                
<tr>
                                                                                
        <td>
-                                                                               
                <xsl:value-of select="php:function('lang', 'finnish date')"/>
+                                                                               
                <label>
+                                                                               
                        <xsl:value-of select="php:function('lang', 'finnish 
date')"/>
+                                                                               
                </label>
                                                                                
        </td>
                                                                                
        <td>
                                                                                
                <input type="text" id="values_finnish_date" 
name="values[finnish_date]" size="10" value="{value_finnish_date}" 
readonly="readonly" onMouseout="window.status='';return true;">
@@ -648,7 +175,9 @@
                                                <xsl:apply-templates 
select="custom_attributes/attributes"/>
                                                <tr>
                                                        <td valign="top">
-                                                               <xsl:value-of 
select="php:function('lang', 'subject')"/>
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'subject')"/>
+                                                               </label>
                                                        </td>
                                                        <td>
                                                                <input 
type="text" name="values[subject]" value="{value_subject}" 
onMouseout="window.status='';return true;">
@@ -660,7 +189,9 @@
                                                </tr>
                                                <tr>
                                                        <td valign="top">
-                                                               <xsl:value-of 
select="php:function('lang', 'Details')"/>
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'Details')"/>
+                                                               </label>
                                                        </td>
                                                        <td>
                                                                <textarea 
cols="60" rows="10" name="values[details]" onMouseout="window.status='';return 
true;">
@@ -675,10 +206,12 @@
                                                        <xsl:when 
test="fileupload = 1">
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="lang_upload_file"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="lang_upload_file"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
-                                                                               
<input type="file" name="file" size="40" onMouseout="window.status='';return 
true;">
+                                                                               
<input type="file" name="file" size="40">
                                                                                
        <xsl:attribute name="title">
                                                                                
                <xsl:value-of select="lang_file_statustext"/>
                                                                                
        </xsl:attribute>
@@ -881,7 +414,9 @@
                                                <table cellpadding="2" 
cellspacing="2" width="95%" align="center">
                                                        <tr class="th">
                                                                <td 
class="th_text" valign="top">
-                                                                       
<xsl:value-of select="php:function('lang', 'Ticket')"/>
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'Ticket')"/>
+                                                                       </label>
                                                                </td>
                                                                <td 
class="th_text" valign="top">
                                                                        
<xsl:value-of select="value_id"/>
@@ -895,7 +430,9 @@
                                                        <xsl:for-each 
select="value_origin">
                                                                <tr>
                                                                        <td 
valign="top">
-                                                                               
<xsl:value-of select="descr"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="descr"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td>
                                                                                
<table>
@@ -925,7 +462,9 @@
                                                                <xsl:when 
test="contact_phone !=''">
                                                                        <tr>
                                                                                
<td class="th_text" align="left">
-                                                                               
        <xsl:value-of select="php:function('lang', 'Contact phone')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'Contact phone')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td align="left">
                                                                                
        <xsl:value-of select="contact_phone"/>
@@ -937,7 +476,9 @@
                                                        <xsl:for-each 
select="value_target">
                                                                <tr>
                                                                        <td 
class="th_text" valign="top">
-                                                                               
<xsl:value-of select="descr"/>
+                                                                               
<label>
+                                                                               
        <xsl:value-of select="descr"/>
+                                                                               
</label>
                                                                        </td>
                                                                        <td 
class="th_text" align="left">
                                                                                
<xsl:for-each select="data">
@@ -951,19 +492,22 @@
                                                        </xsl:for-each>
                                                        <tr>
                                                                <td 
class="th_text" valign="top">
-                                                                       
<xsl:value-of select="php:function('lang', 'details')"/>
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'details')"/>
+                                                                       </label>
                                                                </td>
                                                                <xsl:choose>
                                                                        
<xsl:when test="additional_notes=''">
                                                                                
<td class="th_text">
-                                                                               
        <xsl:value-of select="php:function('lang', 'no additional notes')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'no additional 
notes')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                        
</xsl:when>
                                                                        
<xsl:otherwise>
                                                                                
<td>
                                                                                
        <table width="100%" cellpadding="2" cellspacing="2" align="center">
                                                                                
                <!--  DATATABLE 0-->
-                                                                               
                <!--  <xsl:apply-templates 
select="table_header_additional_notes"/><xsl:apply-templates 
select="additional_notes"/>-->
                                                                                
                <td>
                                                                                
                        <div id="paging_0"/>
                                                                                
                        <div id="datatable-container_0"/>
@@ -977,7 +521,9 @@
                                                                <xsl:when 
test="simple !='1'">
                                                                        <tr>
                                                                                
<td valign="top">
-                                                                               
        <xsl:value-of select="php:function('lang', 'group')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'group')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <xsl:call-template name="group_select"/>
@@ -985,7 +531,9 @@
                                                                        </tr>
                                                                        <tr>
                                                                                
<td valign="top">
-                                                                               
        <xsl:value-of select="php:function('lang', 'assigned to')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'assigned to')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <xsl:call-template name="user_id_select"/>
@@ -995,7 +543,9 @@
                                                                                
<xsl:when test="lang_takeover != ''">
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="lang_takeover"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="lang_takeover"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="checkbox" name="values[takeover]" 
value="1">
@@ -1009,7 +559,9 @@
                                                                        
</xsl:choose>
                                                                        <tr>
                                                                                
<td>
-                                                                               
        <xsl:value-of select="php:function('lang', 'Send e-mail')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'Send e-mail')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <input type="checkbox" name="values[send_mail]" value="1">
@@ -1026,7 +578,9 @@
                                                                        </tr>
                                                                        <tr>
                                                                                
<td valign="top">
-                                                                               
        <xsl:value-of select="php:function('lang', 'Priority')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'Priority')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <xsl:variable name="lang_priority_statustext">
@@ -1044,7 +598,9 @@
                                                                                
<xsl:when test="value_order_id=''">
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'status')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'status')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <select name="values[status]" class="forms">
@@ -1059,7 +615,9 @@
                                                                        
</xsl:choose>
                                                                        <tr>
                                                                                
<td>
-                                                                               
        <xsl:value-of select="php:function('lang', 'category')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'category')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <xsl:call-template name="categories"/>
@@ -1069,7 +627,9 @@
                                                                                
<xsl:when test="show_finnish_date ='1'">
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 'finnish 
date')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'finnish date')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="text" id="values_finnish_date" 
name="values[finnish_date]" size="10" value="{value_finnish_date}" 
readonly="readonly" onMouseout="window.status='';return true;">
@@ -1085,7 +645,9 @@
                                                                                
<xsl:when test="show_billable_hours ='1'">
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 'billable 
hours')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'billable hours')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="text" id="values_billable_hour" 
name="values[billable_hours]" size="10" value="{value_billable_hours}">
@@ -1111,7 +673,9 @@
                                                        <xsl:apply-templates 
select="custom_attributes/attributes"/>
                                                        <tr>
                                                                <td 
valign="top">
-                                                                       
<xsl:value-of select="php:function('lang', 'new note')"/>
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'new note')"/>
+                                                                       </label>
                                                                </td>
                                                                <td>
                                                                        
<textarea cols="{textareacols}" rows="{textarearows}" name="values[note]">
@@ -1125,7 +689,9 @@
                                                                <xsl:when 
test="fileupload = 1">
                                                                        <tr>
                                                                                
<td width="19%" align="left" valign="top">
-                                                                               
        <xsl:value-of select="php:function('lang', 'files')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'files')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <div id="datatable-container_2"/>
@@ -1145,7 +711,9 @@
                                                                <xsl:when 
test="send_response = 1">
                                                                        <tr>
                                                                                
<td class="th_text" align="left">
-                                                                               
        <xsl:value-of select="php:function('lang', 'notify client by sms')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'notify client by 
sms')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td align="left">
                                                                                
        <table>
@@ -1170,12 +738,14 @@
                                                                        </tr>
                                                                        <tr>
                                                                                
<td valign="top">
-                                                                               
        <a href="javascript:response_lookup()">
-                                                                               
                <xsl:attribute name="title">
+                                                                               
        <label>
+                                                                               
                <a href="javascript:response_lookup()">
+                                                                               
                        <xsl:attribute name="title">
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'response')"/>
+                                                                               
                        </xsl:attribute>
                                                                                
                        <xsl:value-of select="php:function('lang', 
'response')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:value-of select="php:function('lang', 'response')"/>
-                                                                               
        </a>
+                                                                               
                </a>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <textarea cols="{textareacols}" rows="{textarearows}" 
id="response_text" name="values[response_text]" onKeyUp="javascript: 
SmsCountKeyUp(160);" onKeyDown="javascript: SmsCountKeyDown(160);" 
wrap="virtual">
@@ -1188,7 +758,9 @@
                                                                        </tr>
                                                                        <tr>
                                                                                
<td>
-                                                                               
        <xsl:value-of select="php:function('lang', 'character left')"/>
+                                                                               
        <label>
+                                                                               
                <xsl:value-of select="php:function('lang', 'character left')"/>
+                                                                               
        </label>
                                                                                
</td>
                                                                                
<td>
                                                                                
        <input type="text" readonly="readonly" size="3" maxlength="3" 
name="charNumberLeftOutput" id="charNumberLeftOutput" value="160">
@@ -1203,7 +775,9 @@
                                                                                
<xsl:when test="value_order_id=''">
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 'make 
order')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'make order')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="checkbox" name="values[make_order]" 
value="True">
@@ -1219,7 +793,9 @@
                                                                                
<xsl:when test="value_order_id!=''">
                                                                                
        <tr class="th">
                                                                                
                <td class="th_text">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'order 
id')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'order id')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <xsl:value-of select="value_order_id"/>
@@ -1228,7 +804,9 @@
                                                                                
        </tr>
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 'on behalf 
of assigned')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 'on 
behalf of assigned')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="checkbox" 
name="values[on_behalf_of_assigned]" value="True">
@@ -1243,7 +821,9 @@
                                                                                
        <xsl:call-template name="b_account_form"/>
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 'building 
part')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'building part')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <select name="values[building_part]">
@@ -1261,7 +841,9 @@
                                                                                
                <xsl:when test="branch_list!=''">
                                                                                
                        <tr>
                                                                                
                                <td>
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'branch')"/>
+                                                                               
                                        <label>
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'branch')"/>
+                                                                               
                                        </label>
                                                                                
                                </td>
                                                                                
                                <td>
                                                                                
                                        <select name="values[branch_id]">
@@ -1279,7 +861,9 @@
                                                                                
        </xsl:choose>
                                                                                
        <tr>
                                                                                
                <td>
-                                                                               
                        <xsl:value-of select="php:function('lang', 
'order_dim1')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'order_dim1')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <select name="values[order_dim1]">
@@ -1295,14 +879,18 @@
                                                                                
        </tr>
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'cost 
estimate')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'cost estimate')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td><input type="text" name="values[budget]" 
value="{value_budget}"><xsl:attribute name="title"><xsl:value-of 
select="php:function('lang', 'Enter the 
budget')"/></xsl:attribute></input><xsl:text> </xsl:text> [ <xsl:value-of 
select="currency"/> ]
                                                                                
                </td>
                                                                                
        </tr>
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'actual 
cost')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'actual cost')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <input type="text" name="values[actual_cost]" 
value="{value_actual_cost}"><xsl:attribute name="title"><xsl:value-of 
select="php:function('lang', 'Enter actual 
cost')"/></xsl:attribute></input><!--<xsl:value-of select="value_actual_cost"/> 
--><xsl:text> </xsl:text> [ <xsl:value-of select="currency"/> ]
@@ -1310,12 +898,14 @@
                                                                                
        </tr>
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <a href="javascript:template_lookup()">
-                                                                               
                                <xsl:attribute name="title">
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'lookup template')"/>
-                                                                               
                                </xsl:attribute>
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'description')"/>
-                                                                               
                        </a>
+                                                                               
                        <label>
+                                                                               
                                <a href="javascript:template_lookup()">
+                                                                               
                                        <xsl:attribute name="title">
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'lookup template')"/>
+                                                                               
                                        </xsl:attribute>
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'description')"/>
+                                                                               
                                </a>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <textarea cols="{textareacols}" rows="{textarearows}" 
id="order_descr" name="values[order_descr]" wrap="virtual">
@@ -1330,7 +920,9 @@
                                                                                
                <xsl:when test="need_approval='1'">
                                                                                
                        <tr>
                                                                                
                                <td valign="top">
-                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'ask for approval')"/>
+                                                                               
                                        <label>
+                                                                               
                                                <xsl:value-of 
select="php:function('lang', 'ask for approval')"/>
+                                                                               
                                        </label>
                                                                                
                                </td>
                                                                                
                                <td>
 
@@ -1363,7 +955,9 @@
                                                                                
        </xsl:choose>
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'send 
order')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'send order')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <div id="paging_3"/>
@@ -1371,7 +965,9 @@
                                                                                
                </td>
                                                                                
                <tr>
                                                                                
                        <td valign="top">
-                                                                               
                                <xsl:value-of select="php:function('lang', 
'extra mail address')"/>
+                                                                               
                                <label>
+                                                                               
                                        <xsl:value-of 
select="php:function('lang', 'extra mail address')"/>
+                                                                               
                                </label>
                                                                                
                        </td>
                                                                                
                        <td>
                                                                                
                                <input type="text" 
name="values[vendor_email][]" value="">
@@ -1384,7 +980,9 @@
                                                                                
        </tr>
                                                                                
        <tr>
                                                                                
                <td valign="top">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'status')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'status')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <select name="values[status]" class="forms">
@@ -1403,7 +1001,9 @@
                                                                                
<xsl:when test="value_order_id!=''">
                                                                                
        <tr class="th">
                                                                                
                <td class="th_text">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'order 
id')"/>
+                                                                               
                        <label>
+                                                                               
                                <xsl:value-of select="php:function('lang', 
'order id')"/>
+                                                                               
                        </label>
                                                                                
                </td>
                                                                                
                <td>
                                                                                
                        <xsl:value-of select="value_order_id"/>
@@ -1423,9 +1023,11 @@
                                                        </xsl:variable>
                                                        <tr>
                                                                <td 
valign="top">
-                                                                       <a 
href="javascript:notify_contact_lookup()" title="{$lang_contact_statustext}">
-                                                                               
<xsl:value-of select="php:function('lang', 'contact')"/>
-                                                                       </a>
+                                                                       <label>
+                                                                               
<a href="javascript:notify_contact_lookup()" title="{$lang_contact_statustext}">
+                                                                               
        <xsl:value-of select="php:function('lang', 'contact')"/>
+                                                                               
</a>
+                                                                       </label>
                                                                </td>
                                                                <td>
                                                                        <table>
@@ -1441,7 +1043,9 @@
                                                        </tr>
                                                        <tr>
                                                                <td 
valign="top" class="th_text">
-                                                                       
<xsl:value-of select="php:function('lang', 'notify')"/>
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'notify')"/>
+                                                                       </label>
                                                                </td>
                                                                <td>
                                                                        <div 
id="paging_4"> </div>




reply via email to

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