fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [13774] Syncromind: Merge 13730:13773 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [13774] Syncromind: Merge 13730:13773 from trunk
Date: Tue, 25 Aug 2015 13:29:41 +0000

Revision: 13774
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=13774
Author:   sigurdne
Date:     2015-08-25 13:29:40 +0000 (Tue, 25 Aug 2015)
Log Message:
-----------
Syncromind: Merge 13730:13773 from trunk

Modified Paths:
--------------
    branches/dev-syncromind/admin/templates/base/custom.xsl
    branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
    branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
    branches/dev-syncromind/controller/templates/base/component.xsl
    branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
    branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php
    branches/dev-syncromind/phpgwapi/inc/class.send.inc.php
    branches/dev-syncromind/preferences/setup/phpgw_no.lang
    branches/dev-syncromind/property/inc/class.hook_helper.inc.php
    branches/dev-syncromind/property/inc/class.soproject.inc.php
    branches/dev-syncromind/property/inc/class.sorequest.inc.php
    branches/dev-syncromind/property/inc/class.uirequest.inc.php
    branches/dev-syncromind/property/setup/phpgw_no.lang
    branches/dev-syncromind/property/templates/base/admin_entity.xsl
    branches/dev-syncromind/sms/bin/default/config_STATUS_log
    branches/dev-syncromind/sms/bin/default/set_workorder_status.php

Added Paths:
-----------
    branches/dev-syncromind/mobilefrontend/property/class.uidocument.inc.php
    branches/dev-syncromind/mobilefrontend/property/class.uientity.inc.php

Property Changed:
----------------
    branches/dev-syncromind/
    branches/dev-syncromind/controller/


Property changes on: branches/dev-syncromind
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726
   + /branches/stavangerkommune:12743-12875,12986
/trunk:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13731-13773

Modified: branches/dev-syncromind/admin/templates/base/custom.xsl
===================================================================
--- branches/dev-syncromind/admin/templates/base/custom.xsl     2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/admin/templates/base/custom.xsl     2015-08-25 
13:29:40 UTC (rev 13774)
@@ -931,7 +931,14 @@
                                <td valign="top" colspan='2'>
                                        <xsl:value-of select="lang_new_value"/>
                                </td>
-                               <td valign="top" colspan='2'>
+                               <td valign="top">
+                                       <input type="text" 
name="values[new_choice_id]" size = '3'>
+                                               <xsl:attribute name="title">
+                                                       <xsl:value-of 
select="php:function('lang', 'new id for multiple choice')"/>
+                                               </xsl:attribute>
+                                       </input>
+                               </td>
+                               <td valign="top">
                                        <input type="text" 
name="values[new_choice]" onMouseout="window.status='';return true;">
                                                <xsl:attribute 
name="onMouseover">
                                                        
<xsl:text>window.status='</xsl:text>


Property changes on: branches/dev-syncromind/controller
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729
   + /branches/stavangerkommune/controller:12743-12875,12986
/trunk/controller:12111-12211,12213-12246,12250-12363,12366-12405,12407-12435,12437-12462,12464-12527,12530-12602,12604-12670,12672-12683,12686-12750,12753-12785,12787-12974,12987,12989-13177,13179-13344,13346-13399,13401-13432,13434-13481,13483-13506,13542-13602,13604-13653,13656-13668,13670-13689,13691-13726,13728-13729,13731-13773

Modified: branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php   
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/controller/inc/class.uicheck_list.inc.php   
2015-08-25 13:29:40 UTC (rev 13774)
@@ -817,7 +817,7 @@
                                        $subject = 
"{$repeat_type_array[$serie['repeat_type']]}/{$serie['repeat_interval']}";
                                        $subject .= 
"::{$serie['title']}::{$short_desc}";
 
-                                       $description = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array(
+                                       $link_backend = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php', array(
                                                'menuaction'    => 
'controller.uicheck_list.add_check_list',
                                                'control_id'    => 
$check_list->get_control_id(),
                                                'location_id'   => 
$check_list->get_location_id(),
@@ -827,9 +827,21 @@
                                                'assigned_to'   => 
$check_list->get_assigned_to(),
                                                'deadline_current'      => true
 
-                                       ),false,true).'">' . lang('serie').' #' 
.$check_list->get_serie_id() .'</a>'."\n";
+                                       ),false,true,true).'">Serie#' . 
$check_list->get_serie_id() .'::Backend</a>';
 
-                                       $description = str_replace('&amp;', 
'&', $description);
+                                       $link_mobilefrontend = '<a href ="' . 
$GLOBALS['phpgw']->link('/mobilefrontend/index.php', array(
+                                               'menuaction'    => 
'controller.uicheck_list.add_check_list',
+                                               'control_id'    => 
$check_list->get_control_id(),
+                                               'location_id'   => 
$check_list->get_location_id(),
+                                               'component_id'  => 
$check_list->get_component_id(),
+                                               'serie_id'              => 
$check_list->get_serie_id(),
+                                               'type'                  => 
'component',
+                                               'assigned_to'   => 
$check_list->get_assigned_to(),
+                                               'deadline_current'      => true
+
+                                       ),false,true,true).'">Serie#' . 
$check_list->get_serie_id() .'::Mobilefrontend</a>';
+
+                                       $description = str_replace('&amp;', 
'&', "{$link_mobilefrontend}\\n\\n{$link_backend}");
                                        if($from_address && $to_address)
                                        {
                                                
$this->sendIcalEvent($from_name, $from_address, $to_name, $to_address, 
$startTime, $endTime, $subject, $description, $location);
@@ -1404,14 +1416,6 @@
                        //Create Email Headers
                        $mime_boundary = "----Meeting Booking----".md5(time());
 
-                       $headers  = <<<HTML
-                       From: {$from_name} <{$from_address}>
-                       Reply-To: {$from_name} <{$from_address}>
-                       MIME-Version: 1.0
-                       Content-Type: multipart/alternative; 
boundary=\"{$mime_boundary}\"
-                       Content-class: urn:content-classes:calendarmessage
-HTML;
-
                        //Create Email Body (HTML)
                        $message  = <<<HTML
                        --{$mime_boundary}
@@ -1425,9 +1429,17 @@
                        </body>
                        </html>
                        --{$mime_boundary}
+HTML;
+                       //Create Email Body (HTML)
+                       $message  = <<<HTML
+                       <html>
+                       <body>
+                       <p>Dear {$to_name}</p>
+                       <p>{$description}</p>
+                       </body>
+                       </html>
+HTML;
 
-
-HTML;
                        $last_modified =  date("Ymd\TGis");
                        $uid = date("Ymd\TGis", $startTime).rand()."@".$domain;
                        $dtstamp = date("Ymd\TGis");
@@ -1438,7 +1450,7 @@
 
 $ical = <<<HTML
 BEGIN:VCALENDAR
-PRODID:controller
+PRODID: controller {$domain}
 VERSION:2.0
 CALSCALE:GREGORIAN
 METHOD:REQUEST
@@ -1469,15 +1481,30 @@
 
 
 
-                       $message .= $ical;
+//                     $message .= $ical;
+                       $message = $ical;
 
+
+                       //Might work....
+                       $attachment = array
+                       (
+                       //      'content'               => base64_encode($ical),
+                               'content'               => $ical,
+                               'name'                  => 'meeting.ics',
+                       //      'encoding'              => 'base64',//'7bit',
+                               'encoding'              => '7bit',
+                               'type'                  => 
"text/calendar;charset=utf-8; method=REQUEST",
+                               'disposition'   => 'inline'
+                       );
+
+
                        $rc = false;
                        if 
(isset($GLOBALS['phpgw_info']['server']['smtp_server']) && 
$GLOBALS['phpgw_info']['server']['smtp_server'])
                        {
                                $send= CreateObject('phpgwapi.send');
                                try
                                {
-                                       $rc = $send->msg('email', $to_address, 
$subject, $message, $msgtype='Ical', $cc='', $bcc='', $from_address, 
$from_name,'html',$mime_boundary);
+                                       $rc = $send->msg('email', $to_address, 
$subject, $message, $msgtype='Ical', $cc='', $bcc='', $from_address, 
$from_name,'html',$mime_boundary);//, array($attachment));
                                }
                                catch (phpmailerException $e)
                                {
@@ -1489,9 +1516,6 @@
                                phpgwapi_cache::message_set(lang('SMTP server 
is not set! (admin section)'), 'error');
                        }
 
-
-               //      $mailsent = mail($to_address, $subject, $message, 
$headers);
-
                        return $rc;
                }
        }

Modified: branches/dev-syncromind/controller/inc/class.uicomponent.inc.php
===================================================================
--- branches/dev-syncromind/controller/inc/class.uicomponent.inc.php    
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/controller/inc/class.uicomponent.inc.php    
2015-08-25 13:29:40 UTC (rev 13774)
@@ -330,8 +330,13 @@
                                                                'text'   => '',
                                                                'value'  => 
$filter_component
                                                        ),
-                                               ),
-                                       ),
+                                                       array('type'     => 
'hidden',
+                                                               'name'   => 
'custom_frontend',
+                                                               'text'   => '',
+                                                               'value'  => 
isset($GLOBALS['phpgw_info']['flags']['custom_frontend']) && 
$GLOBALS['phpgw_info']['flags']['custom_frontend'] ? 1 : 0
+                                                       )
+                                               )
+                                       )
                                ),
                                'datatable'              => array(
                                        'source' => 
self::link(array('menuaction' => 'controller.uicomponent.index',
@@ -612,11 +617,16 @@
                                        $control                                
                = $so_control->get_single($control_id);
 
                                        $repeat_type                            
 = $control->get_repeat_type();
-
+                                       
+                                       //FIXME: Not currently supported
+                                       if($repeat_type <= 
controller_control::REPEAT_TYPE_WEEK)
+                                       {
+                                               $repeat_type = 
controller_control::REPEAT_TYPE_MONTH;
+                                       }
                                        // LOCATIONS: Process aggregated values 
for controls with repeat type day or week
                                        if($repeat_type <= 
controller_control::REPEAT_TYPE_WEEK)
                                        {
-                                               //FIX ME: Not currently 
supported
+                                               //FIXME: Not currently supported
 
                                                
$component->set_xml_short_desc(" 
{$location_type_name[$location_id]}</br>{$short_description}");
 
@@ -1132,4 +1142,4 @@
                        return $to_month;
                }
 
-       }
\ No newline at end of file
+       }

Modified: branches/dev-syncromind/controller/templates/base/component.xsl
===================================================================
--- branches/dev-syncromind/controller/templates/base/component.xsl     
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/controller/templates/base/component.xsl     
2015-08-25 13:29:40 UTC (rev 13774)
@@ -228,8 +228,16 @@
                        $("#receipt").html('');
 
                        var user_id = $("#user_id").val();
-                       if(user_id < 0)
+                       var custom_frontend = 
$("[name='custom_frontend']").val();
+
+                       if(custom_frontend ==1)
                        {
+                               $( "#user_id" ).hide();
+                               $("[for='user_id']").hide();
+                       }
+
+                       if(user_id < 0 || custom_frontend ==1)
+                       {
                                $( "#entity_group_id" ).hide();
                                $("[for='entity_group_id']").hide();
                                $( "#location_id" ).hide();

Copied: 
branches/dev-syncromind/mobilefrontend/property/class.uidocument.inc.php (from 
rev 13773, trunk/mobilefrontend/property/class.uidocument.inc.php)
===================================================================
--- branches/dev-syncromind/mobilefrontend/property/class.uidocument.inc.php    
                        (rev 0)
+++ branches/dev-syncromind/mobilefrontend/property/class.uidocument.inc.php    
2015-08-25 13:29:40 UTC (rev 13774)
@@ -0,0 +1,40 @@
+<?php
+
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package property
+        * @subpackage tts
+        * @version $Id: class.uitts.inc.php 11511 2013-12-08 20:57:07Z 
sigurdne $
+        */
+
+       phpgw::import_class('property.uidocument');
+
+       class mobilefrontend_uidocument extends property_uidocument
+       {
+               public function __construct()
+               {
+                       parent::__construct();
+                       $GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
+               }
+       }

Copied: branches/dev-syncromind/mobilefrontend/property/class.uientity.inc.php 
(from rev 13773, trunk/mobilefrontend/property/class.uientity.inc.php)
===================================================================
--- branches/dev-syncromind/mobilefrontend/property/class.uientity.inc.php      
                        (rev 0)
+++ branches/dev-syncromind/mobilefrontend/property/class.uientity.inc.php      
2015-08-25 13:29:40 UTC (rev 13774)
@@ -0,0 +1,40 @@
+<?php
+
+       /**
+        * phpGroupWare - property: a part of a Facilities Management System.
+        *
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2011,2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * This file is part of phpGroupWare.
+        *
+        * phpGroupWare is free software; you can redistribute it and/or modify
+        * it under the terms of the GNU General Public License as published by
+        * the Free Software Foundation; either version 2 of the License, or
+        * (at your option) any later version.
+        *
+        * phpGroupWare is distributed in the hope that it will be useful,
+        * but WITHOUT ANY WARRANTY; without even the implied warranty of
+        * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        * GNU General Public License for more details.
+        *
+        * You should have received a copy of the GNU General Public License
+        * along with phpGroupWare; if not, write to the Free Software
+        * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  
02110-1301  USA
+        *
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @internal Development of this application was funded by 
http://www.bergen.kommune.no/
+        * @package property
+        * @subpackage tts
+        * @version $Id: class.uitts.inc.php 11511 2013-12-08 20:57:07Z 
sigurdne $
+        */
+
+       phpgw::import_class('property.uientity');
+
+       class mobilefrontend_uientity extends property_uientity
+       {
+               public function __construct()
+               {
+                       parent::__construct();
+                       $GLOBALS['phpgw_info']['flags']['nonavbar'] = true;
+               }
+       }

Modified: branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php    
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/phpgwapi/inc/class.custom_fields.inc.php    
2015-08-25 13:29:40 UTC (rev 13774)
@@ -404,9 +404,12 @@
                                        {
                                                return $values['id'];
                                        }
+                                       else
+                                       {
+                                               return 0;
+                                       }
                                }
-
-                               return 0;
+                               return $values['id'];
                        }
 
 
@@ -444,9 +447,10 @@
                                {
                                        return $values['id'];
                                }
+                               return 0;
                        }
 
-                       return 0;
+                       return $values['id'];
                }
 
                /**
@@ -924,24 +928,9 @@
                        
                        if(isset($attrib['new_choice']) && 
$attrib['new_choice'] && !$doubled )
                        {
-                               $choice_id = 
$this->_next_id('phpgw_cust_choice' ,array('location_id'=> $location_id, 
'attrib_id'=>$attrib_id));
-                               $choice_sort = $choice_id;
-
-                               $values= array(
-                                       $location_id,
-                                       $attrib_id,
-                                       $choice_id,
-                                       $choice_sort,
-                                       $attrib['new_choice']
-                                       );
-
-                               $values = $this->_db->validate_insert($values);
-
-                               $this->_db->query("INSERT INTO 
phpgw_cust_choice (location_id, attrib_id, id,choice_sort, value) "
-                               . "VALUES ($values)",__LINE__,__FILE__);
+                               $this->add_choice($location_id, $attrib_id, 
$attrib['new_choice'], $attrib['new_choice_id']);
                        }
 
-
                        if ( count($attrib['edit_choice'])  && !$doubled )
                        {
                                foreach ($attrib['edit_choice'] as $choice_id 
=> $value)
@@ -992,7 +981,39 @@
                        return false;
                }
 
+               /**
+                * Insert a new value for a list-attribute
+                * @param integer $location_id
+                * @param integer $attrib_id
+                * @param string $value
+                * @param integer $choice_id
 
+                */
+               public function add_choice($location_id,$attrib_id,$value, 
$choice_id = 0)
+               {
+                       if(!$choice_id)
+                       {
+                               $choice_id = 
$this->_next_id('phpgw_cust_choice' ,array('location_id'=> $location_id, 
'attrib_id'=>$attrib_id));
+                       }
+
+                       $this->_db->query("SELECT count(id) as cnt FROM 
phpgw_cust_choice WHERE location_id = {$location_id} AND attrib_id = 
{$attrib_id}",__LINE__,__FILE__);
+                       $this->_db->next_record();
+                       $choice_sort = (int)$this->_db->f('cnt') +1;
+
+                       $values= array(
+                               $location_id,
+                               $attrib_id,
+                               $choice_id,
+                               $choice_sort,
+                               $value
+                               );
+
+                       $values = $this->_db->validate_insert($values);
+
+                       $this->_db->query("INSERT INTO phpgw_cust_choice 
(location_id, attrib_id, id,choice_sort, value) "
+                       . "VALUES ({$values})",__LINE__,__FILE__);
+               }
+
                /**
                 * Get a list of attributes
                 *

Modified: branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php   2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/phpgwapi/inc/class.db_pdo.inc.php   2015-08-25 
13:29:40 UTC (rev 13774)
@@ -370,12 +370,14 @@
 
                        try
                        {
-                               if($exec)
+/*
+                               if($exec) // Commented to prevent from 
SQL-injection
                                {
                                        $this->affected_rows = 
$this->db->exec($sql);
                                        return true;
                                }
                                else
+*/
                                {
                                        $statement_object = 
$this->db->query($sql);
 /*

Modified: branches/dev-syncromind/phpgwapi/inc/class.send.inc.php
===================================================================
--- branches/dev-syncromind/phpgwapi/inc/class.send.inc.php     2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/phpgwapi/inc/class.send.inc.php     2015-08-25 
13:29:40 UTC (rev 13774)
@@ -181,13 +181,27 @@
                        {
                                foreach($attachments as $key => $value)
                                {
-                                       $mail->AddAttachment
-                                       (
-                                               $value['file'],
-                                               utf8_decode($value['name']),
-                                               'base64',
-                                               $value['type']
-                                       );
+                                       if(isset($value['content']) && 
$value['content'])
+                                       {
+                                               $mail->AddStringAttachment
+                                               (
+                                                       $value['content'],
+                                                       $value['name'],         
//meeting.ics
+                                                       $value['encoding'],     
//7bit
+                                                       $value['type'],         
//"text/calendar;charset=utf-8; method=REQUEST"
+                                                       $value['disposition'] 
// 'attachment' | inline
+                                               );
+                                       }
+                                       else
+                                       {
+                                               $mail->AddAttachment
+                                               (
+                                                       $value['file'],
+                                                       
utf8_decode($value['name']),
+                                                       'base64',
+                                                       $value['type']
+                                               );
+                                       }
                                }
                        }
 

Modified: branches/dev-syncromind/preferences/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/preferences/setup/phpgw_no.lang     2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/preferences/setup/phpgw_no.lang     2015-08-25 
13:29:40 UTC (rev 13774)
@@ -162,8 +162,8 @@
 default dimb   preferences     no      Standard ansvarssted
 your email     preferences     no      Din e-postadresse
 insert your email address      preferences     no      Legg inn din 
e-postadresse
-branch tts     preferences     no      Del opp tts
-enable branch in tts-orders    preferences     no      Aktiver oppdeling av 
tts-ordre
+branch tts     preferences     no      Vis fag for melding
+enable branch in tts-orders    preferences     no      Vis fag for 
melding-bestilling
 default vendor type    preferences     no      Standard leverandørtype
 which agreement        preferences     no      Velg leverandørtype du vil ha 
som standard
 with of textarea       preferences     no      Bredde på tekstbokser

Modified: branches/dev-syncromind/property/inc/class.hook_helper.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.hook_helper.inc.php      
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/inc/class.hook_helper.inc.php      
2015-08-25 13:29:40 UTC (rev 13774)
@@ -92,7 +92,7 @@
                public function home_backend()
                {
                        $this->home_workorder_overdue_tender();
-                       $this->home_workorder_overdue_end_date();
+                       $this->home_project_overdue_end_date();
                        $this->home_tenant_claims();
                        $this->home_ticket();
                        $this->home_project();
@@ -202,7 +202,7 @@
                 *
                 * @return void
                 */
-               public function home_workorder_overdue_end_date()
+               public function home_project_overdue_end_date()
                {
                        $accound_id = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $save_app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
@@ -215,14 +215,13 @@
                        if ( 
isset($prefs['property']['mainscreen_show_project_overdue'])
                        && 
$prefs['property']['mainscreen_show_project_overdue'] == 'yes')
                        {
-                               $soworkorder = 
CreateObject('property.soworkorder');
+                               $soproject = CreateObject('property.soproject');
 
-                               $values = $soworkorder->read(array(
+                               $values = $soproject->read(array(
                                        'filter'                        => 
$accound_id,
-                                       'inspection_on_completion'      => 
time(),
+                                       'overdue'                       => 
time(),
                                ));
-
-                               $total_records = $soworkorder->total_records;
+                               $total_records = $soproject->total_records;
                                $portalbox = CreateObject('phpgwapi.listbox', 
array
                                (
                                        'title'         => lang('end date 
delay') . " ({$total_records})",
@@ -248,11 +247,11 @@
                                }
                                foreach ($values as $entry)
                                {
-                                       $entry['tender_delay']  = 
ceil(phpgwapi_datetime::get_working_days($entry['tender_deadline'], time()));
+                                       $entry['delay'] = 
ceil(phpgwapi_datetime::get_working_days($entry['end_date'], time()));
                                        $portalbox->data[] = array
                                        (
-                                               'text' => "Forsinkelse: 
{$entry['tender_delay']} dager :: bestilling nr:{$entry['workorder_id']} :: 
{$entry['location_code']} :: {$entry['address']}",
-                                               'link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiworkorder.edit', 'id' => $entry['workorder_id'], 'tab' => 'budget'))
+                                               'text' => "Forsinkelse: 
{$entry['delay']} dager :: prosjekt nr:{$entry['project_id']} :: 
{$entry['location_code']} :: {$entry['address']}",
+                                               'link' => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'property.uiproject.edit', 'id' => $entry['project_id'], 'tab' => 'budget'))
                                        );
                                }
                                echo "\n".'<!-- BEGIN ticket info -->'."\n<div 
class='property_tickets' style='padding-left: 
10px;'>".$portalbox->draw()."</div>\n".'<!-- END ticket info -->'."\n";

Modified: branches/dev-syncromind/property/inc/class.soproject.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.soproject.inc.php        
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/inc/class.soproject.inc.php        
2015-08-25 13:29:40 UTC (rev 13774)
@@ -116,6 +116,7 @@
                        $status_id               = isset($data['status_id']) && 
$data['status_id'] ? $data['status_id'] : 'open';
                        $start_date              = isset($data['start_date']) 
&& $data['start_date'] ? (int) $data['start_date'] : 0;
                        $end_date                = isset($data['end_date']) && 
$data['end_date'] ? (int) $data['end_date'] : 0;
+                       $overdue                 = isset($data['overdue']) && 
$data['overdue'] ? (int) $data['overdue'] : 0;
                        $allrows                 = isset($data['allrows']) ? 
$data['allrows'] : '';
                        $wo_hour_cat_id  = isset($data['wo_hour_cat_id']) ? 
$data['wo_hour_cat_id'] : '';
                        $district_id     = isset($data['district_id']) ? 
$data['district_id'] : '';
@@ -493,7 +494,10 @@
                                        {
                                                $_status_filter[] = 
$this->db->f('id');
                                        }
-                                       $filtermethod .= " $where 
fm_project.status IN ('" . implode("','", $_status_filter) . "')";
+                                       if($_status_filter)
+                                       {
+                                               $filtermethod .= " $where 
fm_project.status IN ('" . implode("','", $_status_filter) . "')";
+                                       }
                                }
                                else
                                {
@@ -554,6 +558,25 @@
                                $where = 'AND';
                        }
 
+                       if($overdue)
+                       {
+                               $end_date = $overdue + 3600 * 16 + 
phpgwapi_datetime::user_timezone();
+                               $filtermethod .= " $where fm_project.end_date 
<= $end_date AND fm_project.start_date <= $end_date ";
+                               $_status_filter = array();
+                               $this->db->query("SELECT * FROM 
fm_project_status WHERE closed IS NULL");
+                               while($this->db->next_record())
+                               {
+                                       $_status_filter[] = $this->db->f('id');
+                               }
+                               if($_status_filter)
+                               {
+                                       $filtermethod .= " AND 
fm_project.status IN ('" . implode("','", $_status_filter) . "')";
+                               }
+
+                               $where = 'AND';
+                               
+                       }
+
                        if($filter_year && $filter_year != 'all')
                        {
                                $filter_year = (int) $filter_year;
@@ -908,11 +931,49 @@
                                return false;
                        }
 
-                       $this->db->query("SELECT maaler_nr as power_meter FROM 
$meter_table where location_code='$location_code' and category='1'", __LINE__, 
__FILE__);
+                       $meter_table_arr = explode('_', $meter_table);
 
-                       $this->db->next_record();
+                       foreach ($meter_table_arr as $key => $value)
+                       {
+                               if (ctype_digit($value))
+                               {
+                                       break;
+                               }
+                       }
 
-                       return $this->db->f('power_meter');
+                       $entity_id      = $meter_table_arr[$key];
+
+                       if(!$cat_id     = $meter_table_arr[($key +1)])
+                       {
+                               return false;
+                       }
+
+                       $admin_entity   = 
CreateObject('property.soadmin_entity');
+
+                       $category = 
$admin_entity->read_single_category($entity_id,$cat_id);
+
+                       if($category['is_eav'])
+                       {
+                               $sql = "SELECT * FROM fm_bim_item"
+                               . " WHERE location_code = '{$location_code}'"
+                               . " AND location_id = 
'{$category['location_id']}'"
+                               . " AND xmlexists('//category[text() = ''1'']' 
PASSING BY REF xml_representation)";
+
+                               $this->db->query($sql,__LINE__,__FILE__);
+
+                               $this->db->next_record();
+
+                               $xmldata = $this->db->f('xml_representation');
+                               $xml = new DOMDocument('1.0', 'utf-8');
+                               $xml->loadXML($xmldata);
+                               return 
$xml->getElementsByTagName('maaler_nr')->item(0)->nodeValue;
+                       }
+                       else
+                       {
+                               $this->db->query("SELECT maaler_nr as 
power_meter FROM $meter_table where location_code='$location_code' and 
category='1'", __LINE__, __FILE__);
+                               $this->db->next_record();
+                               return $this->db->f('power_meter');
+                       }
                }
 
                function project_workorder_data($data = array())
@@ -1207,6 +1268,9 @@
                                return;
                        }
 
+                       //Disabled for now
+                       return;
+
                        $location = explode('-', $location_code);
 
                        $i = 1;

Modified: branches/dev-syncromind/property/inc/class.sorequest.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.sorequest.inc.php        
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/inc/class.sorequest.inc.php        
2015-08-25 13:29:40 UTC (rev 13774)
@@ -1047,7 +1047,7 @@
                        $value_set['multiplier']                                
= $request['multiplier'] ? (float)$request['multiplier'] : 1;
                        
                
-                       if($request['origin'][0]['location'] == 
'.project.condition_survey' && $request['origin'][0]['data'][0]['id'] && 
!$value_set['condition_survey_id'])
+                       if( (isset($request['origin'][0]['location']) && 
$request['origin'][0]['location'] == '.project.condition_survey') && 
isset($request['origin'][0]['data'][0]['id']) && 
!$value_set['condition_survey_id'])
                        {
                                $value_set['condition_survey_id']       = 
(int)$request['origin'][0]['data'][0]['id'];
                        }

Modified: branches/dev-syncromind/property/inc/class.uirequest.inc.php
===================================================================
--- branches/dev-syncromind/property/inc/class.uirequest.inc.php        
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/inc/class.uirequest.inc.php        
2015-08-25 13:29:40 UTC (rev 13774)
@@ -1496,7 +1496,7 @@
                                        'value_in_progress_date'                
        => $values['in_progress_date'],
                                        'value_delivered_date'                  
        => $values['delivered_date'],
 
-                                       'lang_start_date_statustext'            
=> lang('Select the estimated end date for the request'),
+                                       'lang_start_date_statustext'            
=> lang('Select the estimated start date for the request'),
                                        'lang_start_date'                       
                => lang('request start date'),
                                        'value_start_date'                      
                => $values['start_date'],
 

Modified: branches/dev-syncromind/property/setup/phpgw_no.lang
===================================================================
--- branches/dev-syncromind/property/setup/phpgw_no.lang        2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/setup/phpgw_no.lang        2015-08-25 
13:29:40 UTC (rev 13774)
@@ -1599,6 +1599,7 @@
 select the estimated end date for the agreement        property        no      
Angi estimert slutt-dato for avtalen
 select the estimated end date for the project  property        no      Angi 
estimert sluttdato for prosjektet
 select the estimated end date for the request  property        no      Angi 
estimert sluttdato for behovet
+select the estimated start date for the request        property        no      
Angi ønsket startdato for behovet
 select the estimated termination date  property        no      Angi estimert 
terminerings-dato
 select the file to import from property        no      velg fil å importere
 select the filter. to show all entries select show all property        no      
Velg filter. For å vise alle - velg VIS ALLE

Modified: branches/dev-syncromind/property/templates/base/admin_entity.xsl
===================================================================
--- branches/dev-syncromind/property/templates/base/admin_entity.xsl    
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/property/templates/base/admin_entity.xsl    
2015-08-25 13:29:40 UTC (rev 13774)
@@ -41,7 +41,7 @@
 <!-- New template-->
 <xsl:template match="list">
        <xsl:apply-templates select="menu"/>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -158,7 +158,7 @@
 <!-- New template-->
 <xsl:template match="list_category">
        <xsl:apply-templates select="menu"/>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -177,7 +177,7 @@
                        </td>
                </tr>
        </table>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <xsl:apply-templates select="table_header_category"/>
                <xsl:apply-templates select="values_category"/>
                <xsl:apply-templates select="table_add"/>
@@ -313,7 +313,7 @@
 <!-- New template-->
 <xsl:template match="list_config">
        <xsl:apply-templates select="menu"/>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -325,7 +325,7 @@
                        </td>
                </tr>
        </table>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <xsl:apply-templates select="table_header_list_config"/>
                <xsl:apply-templates select="values_list_config"/>
        </table>
@@ -439,514 +439,514 @@
                <xsl:value-of select="lookup_functions"/>
        </script>
        
-                                        <dl>
-                                            <xsl:choose>
-                                                    <xsl:when 
test="msgbox_data != ''">
-                                                            <dt>
-                                                                            
<xsl:call-template name="msgbox"/>
-                                                            </dt>
-                                                    </xsl:when>
-                                            </xsl:choose>
-                                        </dl>
-                                       <xsl:variable name="form_action">
-                                               <xsl:value-of 
select="form_action"/>
-                                       </xsl:variable>
-                                       <form name="form" class="pure-form 
pure-form-aligned" method="post" id="form" action="{$form_action}">
-                                            <div id="tab-content">
-                                            <xsl:value-of 
disable-output-escaping="yes" select="tabs"/>
-                                                    <div id="general">
-                                               <table cellpadding="2" 
cellspacing="2" width="80%" align="center">
+       <dl>
+               <xsl:choose>
+                       <xsl:when test="msgbox_data != ''">
+                               <dt>
+                                       <xsl:call-template name="msgbox"/>
+                               </dt>
+                       </xsl:when>
+               </xsl:choose>
+       </dl>
+       <xsl:variable name="form_action">
+               <xsl:value-of select="form_action"/>
+       </xsl:variable>
+       <form name="form" class="pure-form pure-form-aligned" method="post" 
id="form" action="{$form_action}">
+               <div id="tab-content">
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+                       <div id="general">
+                               <table cellpadding="2" cellspacing="2" 
width="80%" align="center">
                                                     
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_entity"/>
+                                               </label>
+                                               <label>
+                                                       <xsl:value-of 
select="entity_name"/>
+                                               </label>
+                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when test="parent_list != 
''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="lang_entity"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'parent')"/>
                                                                </label>
-                                                               <label>
-                                                                       
<xsl:value-of select="entity_name"/>
+                                                               <label 
valign="top">
+                                                                       <select 
id="parent_id" name="values[parent_id]">
+                                                                               
<option value="">
+                                                                               
        <xsl:value-of select="php:function('lang', 'select parent')"/>
+                                                                               
</option>
+                                                                               
<xsl:apply-templates select="parent_list"/>
+                                                                       
</select>
                                                                </label>
-                                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="parent_list != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'parent')"/>
-                                                                               
</label>
-                                                                               
<label valign="top">
-                                                                               
        <select id="parent_id" name="values[parent_id]">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'select 
parent')"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="parent_list"/>
-                                                                               
        </select>
-                                                                               
</label>
-                                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'category')"/>
-                                                                               
</label>
-                                                                               
<xsl:value-of select="value_id"/>
-                                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="value_id != ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'name')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'category')"/>
                                                                </label>
+                                                               <xsl:value-of 
select="value_id"/>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'name')"/>
+                                               </label>
                                                                
-                                                                       <input 
type="text" data-validation="required" name="values[name]" value="{value_name}" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_name_standardtext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
+                                               <input type="text" 
data-validation="required" name="values[name]" value="{value_name}" 
onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_name_standardtext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
                                                                
-                                                        </div>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'descr')"/>
+                                               </label>
+                                               <textarea cols="60" rows="10" 
name="values[descr]" onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_descr_standardtext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_descr"/>
+                                               </textarea>
+                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when 
test="lang_location_form != ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'descr')"/>
+                                                                       
<xsl:value-of select="lang_location_form"/>
                                                                </label>
-                                                                       
<textarea cols="60" rows="10" name="values[descr]" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_descr_standardtext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="value_location_form = 1">
+                                                                               
<input type="checkbox" name="values[location_form]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                <xsl:value-of select="lang_location_form_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<input type="checkbox" name="values[location_form]" value="1" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                <xsl:value-of select="lang_location_form_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when 
test="lang_documentation != ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="lang_documentation"/>
+                                                               </label>
+                                                               <xsl:choose>
+                                                                       
<xsl:when test="value_documentation = 1">
+                                                                               
<input type="checkbox" name="values[documentation]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                <xsl:value-of select="lang_documentation_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:when>
+                                                                       
<xsl:otherwise>
+                                                                               
<input type="checkbox" name="values[documentation]" value="1" 
onMouseout="window.status='';return true;">
+                                                                               
        <xsl:attribute name="onMouseover">
+                                                                               
                <xsl:text>window.status='</xsl:text>
+                                                                               
                <xsl:value-of select="lang_documentation_statustext"/>
+                                                                               
                <xsl:text>'; return true;</xsl:text>
+                                                                               
        </xsl:attribute>
+                                                                               
</input>
+                                                                       
</xsl:otherwise>
+                                                               </xsl:choose>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when 
test="value_location_form = 1">
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_include_in_location_form"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:call-template name="include_list"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_include_this_entity"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:call-template name="include_list_2"/>
+                                                               </td>
+                                                       </tr>
+                                                       <tr>
+                                                               <td 
valign="top">
+                                                                       
<xsl:value-of select="lang_start_this_entity"/>
+                                                               </td>
+                                                               <td>
+                                                                       
<xsl:call-template name="include_list_3"/>
+                                                               </td>
+                                                       </tr>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="edit_prefix != 
''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'prefix')"/>
+                                                               </label>
+                                                               <input 
type="text" name="values[prefix]" value="{value_prefix}" 
onMouseout="window.status='';return true;">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_prefix_standardtext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="org_unit != ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:variable name="lang_org_unit">
+                                                                               
<xsl:value-of select="php:function('lang', 'department')"/>
+                                                                       
</xsl:variable>
+                                                                       
<xsl:value-of select="$lang_org_unit"/>
+                                                               </label>
+                                                               <input 
type="checkbox" name="values[org_unit]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'department')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_org_unit = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_descr"/>
-                                                                       
</textarea>
-                                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="lang_location_form != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="lang_location_form"/>
-                                                                               
</label>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="value_location_form = 1">
-                                                                               
                        <input type="checkbox" name="values[location_form]" 
value="1" checked="checked" onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="onMouseover">
-                                                                               
                                        <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of 
select="lang_location_form_statustext"/>
-                                                                               
                                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <input type="checkbox" name="values[location_form]" 
value="1" onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="onMouseover">
-                                                                               
                                        <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of 
select="lang_location_form_statustext"/>
-                                                                               
                                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="lang_documentation != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="lang_documentation"/>
-                                                                               
</label>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="value_documentation = 1">
-                                                                               
                        <input type="checkbox" name="values[documentation]" 
value="1" checked="checked" onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="onMouseover">
-                                                                               
                                        <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of 
select="lang_documentation_statustext"/>
-                                                                               
                                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <input type="checkbox" name="values[documentation]" 
value="1" onMouseout="window.status='';return true;">
-                                                                               
                                <xsl:attribute name="onMouseover">
-                                                                               
                                        <xsl:text>window.status='</xsl:text>
-                                                                               
                                        <xsl:value-of 
select="lang_documentation_statustext"/>
-                                                                               
                                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                                </xsl:attribute>
-                                                                               
                        </input>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_location_form = 1">
-                                                                       <tr>
-                                                                               
 <td valign="top">
-                                                                               
        <xsl:value-of select="lang_include_in_location_form"/>
-                                                                               
 </td>
-                                                                               
<td>
-                                                                               
        <xsl:call-template name="include_list"/>
-                                                                               
</td>
-                                                                       </tr>
-                                                                       <tr>
-                                                                               
<td valign="top">
-                                                                               
        <xsl:value-of select="lang_include_this_entity"/>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <xsl:call-template name="include_list_2"/>
-                                                                               
</td>
-                                                                       </tr>
-                                                                       <tr>
-                                                                               
<td valign="top">
-                                                                               
        <xsl:value-of select="lang_start_this_entity"/>
-                                                                               
</td>
-                                                                               
<td>
-                                                                               
        <xsl:call-template name="include_list_3"/>
-                                                                               
</td>
-                                                                       </tr>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="edit_prefix != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'prefix')"/>
-                                                                               
</label>
-                                                                               
        <input type="text" name="values[prefix]" value="{value_prefix}" 
onMouseout="window.status='';return true;">
-                                                                               
                <xsl:attribute name="onMouseover">
-                                                                               
                        <xsl:text>window.status='</xsl:text>
-                                                                               
                        <xsl:value-of select="lang_prefix_standardtext"/>
-                                                                               
                        <xsl:text>'; return true;</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="org_unit != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:variable name="lang_org_unit">
-                                                                               
                <xsl:value-of select="php:function('lang', 'department')"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <xsl:value-of select="$lang_org_unit"/>
-                                                                               
</label>
-                                                                               
        <input type="checkbox" name="values[org_unit]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 
'department')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_org_unit = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
 
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="lookup_tenant != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'lookup tenant')"/>
-                                                                               
 </label>
-                                                                               
        <input type="checkbox" name="values[lookup_tenant]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'If this 
entity type is to look up tenants')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_lookup_tenant = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="tracking != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'tracking helpdesk')"/>
-                                                                               
 </label>
-                                                                               
        <input type="checkbox" name="values[tracking]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'activate 
tracking of dates in helpdesk main list')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_tracking = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="fileupload != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'enable file upload')"/>
-                                                                               
</label>
-                                                                               
        <input type="checkbox" name="values[fileupload]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'If files 
can be uploaded for this category')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_fileupload = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="jasperupload != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'jasper upload')"/>
-                                                                               
</label>
-                                                                               
        <input type="checkbox" name="values[jasperupload]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'allow to 
upload definition of jasper reports')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_jasperupload = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                        </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="loc_link != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'Link from location')"/>
-                                                                               
 </label>
-                                                                               
        <input type="checkbox" name="values[loc_link]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'Enable link 
from location detail')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_loc_link = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div> 
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="start_project != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'start project')"/>
-                                                                               
</label>
-                                                                               
        <input type="checkbox" name="values[start_project]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'Enable 
start project from this category')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_start_project = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="start_ticket != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'start ticket')"/>
-                                                                               
</label>
-                                                                               
        <input type="checkbox" name="values[start_ticket]" value="1">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'Enable 
start ticket from this category')"/>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:if test="value_start_ticket = '1'">
-                                                                               
                        <xsl:attribute name="checked">
-                                                                               
                                <xsl:text>checked</xsl:text>
-                                                                               
                        </xsl:attribute>
-                                                                               
                </xsl:if>
-                                                                               
        </input>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="lookup_tenant 
!= ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'is eav')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'lookup tenant')"/>
                                                                </label>
-                                                                       <input 
type="checkbox" name="values[is_eav]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'This category is modelled 
in the database as a xml adapted entity attribute value model')"/>
+                                                               <input 
type="checkbox" name="values[lookup_tenant]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'If this entity type is to look up 
tenants')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_lookup_tenant = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:if test="value_is_eav = '1'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:if test="value_is_eav = '1' or value_id != ''">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text>disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                       </input>
-                                                                       
<xsl:choose>
-                                                                               
<xsl:when test="value_is_eav = '1'">
-                                                                               
        <input type="hidden" name="values[is_eav]" value="1"/>
-                                                                               
</xsl:when>
-                                                                       
</xsl:choose>
+                                                                       
</xsl:if>
+                                                               </input>
                                                        </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="tracking != ''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'enable bulk')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'tracking helpdesk')"/>
                                                                </label>
-                                                                       <input 
type="checkbox" name="values[enable_bulk]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'This category is allowed to 
reperesent bulk entities')"/>
+                                                               <input 
type="checkbox" name="values[tracking]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'activate tracking of dates in 
helpdesk main list')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_tracking = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:if test="value_enable_bulk = '1'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                       </input>
+                                                                       
</xsl:if>
+                                                               </input>
                                                        </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="fileupload != 
''">
                                                        <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'enable controller')"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'enable file upload')"/>
                                                                </label>
-                                                                       <input 
type="checkbox" name="values[enable_controller]" value="1">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'This category is allowed to 
link to controller')"/>
+                                                               <input 
type="checkbox" name="values[fileupload]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'If files can be uploaded for this 
category')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_fileupload = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:if test="value_enable_controller > '0'">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:if test="value_enable_controller > '1'">
-                                                                               
        <xsl:attribute name="disabled">
-                                                                               
                <xsl:text>disabled</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="jasperupload != 
''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'jasper upload')"/>
+                                                               </label>
+                                                               <input 
type="checkbox" name="values[jasperupload]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'allow to upload definition of 
jasper reports')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_jasperupload = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="loc_link != ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'Link from location')"/>
+                                                               </label>
+                                                               <input 
type="checkbox" name="values[loc_link]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'Enable link from location 
detail')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_loc_link = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="start_project 
!= ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'start project')"/>
+                                                               </label>
+                                                               <input 
type="checkbox" name="values[start_project]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'Enable start project from this 
category')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_start_project = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <xsl:choose>
+                                               <xsl:when test="start_ticket != 
''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'start ticket')"/>
+                                                               </label>
+                                                               <input 
type="checkbox" name="values[start_ticket]" value="1">
+                                                                       
<xsl:attribute name="title">
+                                                                               
<xsl:value-of select="php:function('lang', 'Enable start ticket from this 
category')"/>
+                                                                       
</xsl:attribute>
+                                                                       <xsl:if 
test="value_start_ticket = '1'">
+                                                                               
<xsl:attribute name="checked">
+                                                                               
        <xsl:text>checked</xsl:text>
+                                                                               
</xsl:attribute>
+                                                                       
</xsl:if>
+                                                               </input>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'is eav')"/>
+                                               </label>
+                                               <input type="checkbox" 
name="values[is_eav]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'This category is modelled in the database as a 
xml adapted entity attribute value model')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_is_eav = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                                       <xsl:if 
test="value_is_eav = '1' or value_id != ''">
+                                                               <xsl:attribute 
name="disabled">
+                                                                       
<xsl:text>disabled</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_is_eav = '1'">
+                                                               <input 
type="hidden" name="values[is_eav]" value="1"/>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'enable bulk')"/>
+                                               </label>
+                                               <input type="checkbox" 
name="values[enable_bulk]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'This category is allowed to reperesent bulk 
entities')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_enable_bulk = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'enable controller')"/>
+                                               </label>
+                                               <input type="checkbox" 
name="values[enable_controller]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               <xsl:value-of 
select="php:function('lang', 'This category is allowed to link to 
controller')"/>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_enable_controller > '0'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                                       <xsl:if 
test="value_enable_controller > '1'">
+                                                               <xsl:attribute 
name="disabled">
+                                                                       
<xsl:text>disabled</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
 
-                                                                       </input>
+                                               </input>
+                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when 
test="lang_location_level != ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="lang_location_level"/>
+                                                               </label>
+                                                               <xsl:variable 
name="lang_location_level_statustext">
+                                                                       
<xsl:value-of select="lang_location_level_statustext"/>
+                                                               </xsl:variable>
+                                                               <select 
name="values[location_level]" class="forms" 
onMouseover="window.status='{$lang_location_level_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                                       <option 
value="">
+                                                                               
<xsl:value-of select="lang_no_location_level"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="location_level_list/options"/>
+                                                               </select>
                                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="lang_location_level != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="lang_location_level"/>
-                                                                               
</label>
-                                                                               
        <xsl:variable name="lang_location_level_statustext">
-                                                                               
                <xsl:value-of select="lang_location_level_statustext"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <select name="values[location_level]" class="forms" 
onMouseover="window.status='{$lang_location_level_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="lang_no_location_level"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="location_level_list/options"/>
-                                                                               
        </select>
-                                                                       </div>
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="lang_location_link_level"/>
-                                                                               
</label>
-                                                                               
        <xsl:variable name="lang_location_link_level_statustext">
-                                                                               
                <xsl:value-of select="lang_location_link_level_statustext"/>
-                                                                               
        </xsl:variable>
-                                                                               
        <select name="values[location_link_level]" 
title="{$lang_location_link_level_statustext}">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="lang_no_location_link_level"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="location_link_level_list/options"/>
-                                                                               
        </select>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
                                                        <div 
class="pure-control-group">
-                                                               <xsl:variable 
name="lang_entity_group">
-                                                                       
<xsl:value-of select="php:function('lang', 'entity group')"/>
+                                                               <label>
+                                                                       
<xsl:value-of select="lang_location_link_level"/>
+                                                               </label>
+                                                               <xsl:variable 
name="lang_location_link_level_statustext">
+                                                                       
<xsl:value-of select="lang_location_link_level_statustext"/>
                                                                </xsl:variable>
+                                                               <select 
name="values[location_link_level]" 
title="{$lang_location_link_level_statustext}">
+                                                                       <option 
value="">
+                                                                               
<xsl:value-of select="lang_no_location_link_level"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="location_link_level_list/options"/>
+                                                               </select>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <div class="pure-control-group">
+                                               <xsl:variable 
name="lang_entity_group">
+                                                       <xsl:value-of 
select="php:function('lang', 'entity group')"/>
+                                               </xsl:variable>
+                                               <label>
+                                                       <xsl:value-of 
select="$lang_entity_group"/>
+                                               </label>
+                                               <select 
name="values[entity_group_id]" title="$lang_entity_group">
+                                                       <xsl:apply-templates 
select="entity_group_list/options"/>
+                                               </select>
+                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when test="category_list 
!= '' and value_id = ''">
+                                                       <div 
class="pure-control-group">
                                                                <label>
-                                                                       
<xsl:value-of select="$lang_entity_group"/>
+                                                                       
<xsl:value-of select="php:function('lang', 'template')"/>
                                                                </label>
-                                                               <select 
name="values[entity_group_id]" title="$lang_entity_group">
-                                                                       
<xsl:apply-templates select="entity_group_list/options"/>
+                                                               <select 
id="category_template" name="values[category_template]" 
onChange="get_template_attributes()">
+                                                                       <option 
value="">
+                                                                               
<xsl:value-of select="php:function('lang', 'select template')"/>
+                                                                       
</option>
+                                                                       
<xsl:apply-templates select="category_list"/>
                                                                </select>
                                                        </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="category_list != '' and value_id = ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'template')"/>
-                                                                               
</label>
-                                                                               
        <select id="category_template" name="values[category_template]" 
onChange="get_template_attributes()">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'select 
template')"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="category_list"/>
-                                                                               
        </select>
-                                                                       </div>
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'attributes')"/>
-                                                                               
</label>
-                                                                               
        <xsl:for-each select="datatable_def">
-                                                                               
                <xsl:if test="container = 'datatable-container_0'">
-                                                                               
                        <xsl:call-template name="table_setup">
-                                                                               
                                <xsl:with-param name="container" select 
='container'/>
-                                                                               
                                <xsl:with-param name="requestUrl" select 
='requestUrl'/>
-                                                                               
                                <xsl:with-param name="ColumnDefs" select 
='ColumnDefs'/>
-                                                                               
                                <xsl:with-param name="data" select ='data'/>
-                                                                               
                                <xsl:with-param name="config" select ='config'/>
-                                                                               
                        </xsl:call-template>
-                                                                               
                </xsl:if>
-                                                                               
        </xsl:for-each>
-                                                                               
        <input type="hidden" name="template_attrib" value=""/>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <tr height="50">
-                                                               <td>
-                                                                       <input 
type="submit" class="pure-button pure-button-primary" name="values[save]" 
value="{lang_save}" onClick="onActionsClick()">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'save')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </td>
-                                                       </tr>
-                                               </table>
-                                              </div>
-                                            </div>
-                                       </form>
-                                       <table>
-                                               <tr>
-                                                    <td>
-                                                            <xsl:variable 
name="done_action">
-                                                                    
<xsl:value-of select="done_action"/>
-                                                            </xsl:variable>
-                                                            <xsl:variable 
name="lang_done">
-                                                                    
<xsl:value-of select="lang_done"/>
-                                                            </xsl:variable>
-                                                            <form 
method="post" action="{$done_action}">
-                                                                    <input 
type="submit" class="pure-button pure-button-primary" name="done" 
value="{$lang_done}" onMouseout="window.status='';return true;">
-                                                                            
<xsl:attribute name="onMouseover">
-                                                                               
     <xsl:text>window.status='</xsl:text>
-                                                                               
     <xsl:value-of select="lang_done_standardtext"/>
-                                                                               
     <xsl:text>'; return true;</xsl:text>
-                                                                            
</xsl:attribute>
-                                                                    </input>
-                                                            </form>
-                                                    </td>
-                                               </tr>
-                                       </table>
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'attributes')"/>
+                                                               </label>
+                                                               <xsl:for-each 
select="datatable_def">
+                                                                       <xsl:if 
test="container = 'datatable-container_0'">
+                                                                               
<xsl:call-template name="table_setup">
+                                                                               
        <xsl:with-param name="container" select ='container'/>
+                                                                               
        <xsl:with-param name="requestUrl" select ='requestUrl'/>
+                                                                               
        <xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+                                                                               
        <xsl:with-param name="data" select ='data'/>
+                                                                               
        <xsl:with-param name="config" select ='config'/>
+                                                                               
</xsl:call-template>
+                                                                       
</xsl:if>
+                                                               </xsl:for-each>
+                                                               <input 
type="hidden" name="template_attrib" value=""/>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <tr height="50">
+                                               <td>
+                                                       <input type="submit" 
class="pure-button pure-button-primary" name="values[save]" value="{lang_save}" 
onClick="onActionsClick()">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'save')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </td>
+                                       </tr>
+                               </table>
+                       </div>
+               </div>
+       </form>
+       <table>
+               <tr>
+                       <td>
+                               <xsl:variable name="done_action">
+                                       <xsl:value-of select="done_action"/>
+                               </xsl:variable>
+                               <xsl:variable name="lang_done">
+                                       <xsl:value-of select="lang_done"/>
+                               </xsl:variable>
+                               <form method="post" action="{$done_action}">
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="done" value="{$lang_done}" 
onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_done_standardtext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </form>
+                       </td>
+               </tr>
+       </table>
        <!--  DATATABLE DEFINITIONS-->
        <script type="text/javascript">
                var base_java_url = <xsl:value-of select="base_java_url"/>;
@@ -955,7 +955,7 @@
 
 <!-- list attribute -->
 <xsl:template match="list_attribute">
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -981,7 +981,7 @@
                        </td>
                </tr>
        </table>
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <xsl:apply-templates select="table_header_attrib"/>
                <xsl:apply-templates select="values_attrib"/>
                <xsl:apply-templates select="table_add"/>
@@ -1069,7 +1069,7 @@
                        <xsl:value-of select="attrib_group"/>
                </td>
                <td>
-                       <table align="left">
+                       <table class="pure-table pure-table-bordered">
                                <tr>
                                        <td>
                                                <xsl:value-of select="sorting"/>
@@ -1117,7 +1117,7 @@
 <!-- New template-->
 <!-- list attribute_group -->
 <xsl:template match="list_attribute_group">
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -1265,130 +1265,130 @@
                <xsl:value-of select="lookup_functions"/>
        </script>
        
-                             <dl>
-                                <xsl:choose>
-                                        <xsl:when test="msgbox_data != ''">
-                                                <dt>
-                                                        <xsl:call-template 
name="msgbox"/>
-                                                </dt>
-                                        </xsl:when>
-                                </xsl:choose>
-                            </dl>
-                                       <xsl:variable name="form_action">
-                                               <xsl:value-of 
select="form_action"/>
-                                       </xsl:variable>
-                                       <form method="post" class="pure-form 
pure-form-aligned" id="form" name="form" action="{$form_action}">
-                                            <div id="tab-content">
-                                            <xsl:value-of 
disable-output-escaping="yes" select="tabs"/>
-                                                    <div id="general">
+       <dl>
+               <xsl:choose>
+                       <xsl:when test="msgbox_data != ''">
+                               <dt>
+                                       <xsl:call-template name="msgbox"/>
+                               </dt>
+                       </xsl:when>
+               </xsl:choose>
+       </dl>
+       <xsl:variable name="form_action">
+               <xsl:value-of select="form_action"/>
+       </xsl:variable>
+       <form method="post" class="pure-form pure-form-aligned" id="form" 
name="form" action="{$form_action}">
+               <div id="tab-content">
+                       <xsl:value-of disable-output-escaping="yes" 
select="tabs"/>
+                       <div id="general">
                                                    
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="lang_entity"/>
-                                                               </label>
-                                                                       
<xsl:value-of select="entity_name"/>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="lang_category"/>
-                                                               </label>
-                                                                       
<xsl:value-of select="category_name"/>
-                                                       </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="lang_id"/>
-                                                                               
</label>
-                                                                               
        <xsl:value-of select="value_id"/>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="parent_list != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'parent')"/>
-                                                                               
</label>
-                                                                               
        <select id="parent_id" name="values[parent_id]">
-                                                                               
                <option value="">
-                                                                               
                        <xsl:value-of select="php:function('lang', 'select 
parent')"/>
-                                                                               
                </option>
-                                                                               
                <xsl:apply-templates select="parent_list"/>
-                                                                               
        </select>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
+                               <div class="pure-control-group">
+                                       <label>
+                                               <xsl:value-of 
select="lang_entity"/>
+                                       </label>
+                                       <xsl:value-of select="entity_name"/>
+                               </div>
+                               <div class="pure-control-group">
+                                       <label>
+                                               <xsl:value-of 
select="lang_category"/>
+                                       </label>
+                                       <xsl:value-of select="category_name"/>
+                               </div>
+                               <xsl:choose>
+                                       <xsl:when test="value_id != ''">
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="lang_id"/>
+                                                       </label>
+                                                       <xsl:value-of 
select="value_id"/>
+                                               </div>
+                                       </xsl:when>
+                               </xsl:choose>
+                               <xsl:choose>
+                                       <xsl:when test="parent_list != ''">
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'parent')"/>
+                                                       </label>
+                                                       <select id="parent_id" 
name="values[parent_id]">
+                                                               <option 
value="">
+                                                                       
<xsl:value-of select="php:function('lang', 'select parent')"/>
+                                                               </option>
+                                                               
<xsl:apply-templates select="parent_list"/>
+                                                       </select>
+                                               </div>
+                                       </xsl:when>
+                               </xsl:choose>
 
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="lang_group_name"/>
-                                                               </label>
-                                                                       <input 
type="text" data-validation="required" name="values[group_name]" 
value="{value_group_name}" maxlength="100" onMouseout="window.status='';return 
true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_group_name_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="lang_descr"/>
-                                                               </label>
-                                                                       <input 
type="text" data-validation="required" name="values[descr]" 
value="{value_descr}" size="60" maxlength="150" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_descr_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="lang_remark"/>
-                                                               </label>
-                                                                       
<textarea cols="60" rows="10" name="values[remark]" 
onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_remark_statustext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_remark"/>
-                                                                       
</textarea>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                                       
<xsl:variable name="lang_save">
-                                                                               
<xsl:value-of select="lang_save"/>
-                                                                       
</xsl:variable>
-                                                                       <input 
type="submit" class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}" onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_save_attribtext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                                       </div>
+                               <div class="pure-control-group">
+                                       <label>
+                                               <xsl:value-of 
select="lang_group_name"/>
+                                       </label>
+                                       <input type="text" 
data-validation="required" name="values[group_name]" value="{value_group_name}" 
maxlength="100" onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_group_name_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </div>
+                               <div class="pure-control-group">
+                                       <label>
+                                               <xsl:value-of 
select="lang_descr"/>
+                                       </label>
+                                       <input type="text" 
data-validation="required" name="values[descr]" value="{value_descr}" size="60" 
maxlength="150" onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_descr_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </div>
+                               <div class="pure-control-group">
+                                       <label>
+                                               <xsl:value-of 
select="lang_remark"/>
+                                       </label>
+                                       <textarea cols="60" rows="10" 
name="values[remark]" onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_remark_statustext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                               <xsl:value-of 
select="value_remark"/>
+                                       </textarea>
+                               </div>
+                               <div class="pure-control-group">
+                                       <xsl:variable name="lang_save">
+                                               <xsl:value-of 
select="lang_save"/>
+                                       </xsl:variable>
+                                       <input type="submit" class="pure-button 
pure-button-primary" name="values[save]" value="{$lang_save}" 
onMouseout="window.status='';return true;">
+                                               <xsl:attribute 
name="onMouseover">
+                                                       
<xsl:text>window.status='</xsl:text>
+                                                       <xsl:value-of 
select="lang_save_attribtext"/>
+                                                       <xsl:text>'; return 
true;</xsl:text>
+                                               </xsl:attribute>
+                                       </input>
+                               </div>
+                       </div>
+               </div>
+       </form>
+       <div class="pure-control-group">
+               <xsl:variable name="done_action">
+                       <xsl:value-of select="done_action"/>
+               </xsl:variable>
+               <xsl:variable name="lang_done">
+                       <xsl:value-of select="lang_done"/>
+               </xsl:variable>
+               <form method="post" action="{$done_action}">
+                       <input type="submit" class="pure-button 
pure-button-primary" name="done" value="{$lang_done}" 
onMouseout="window.status='';return true;">
+                               <xsl:attribute name="onMouseover">
+                                       <xsl:text>window.status='</xsl:text>
+                                       <xsl:value-of 
select="lang_done_attribtext"/>
+                                       <xsl:text>'; return true;</xsl:text>
+                               </xsl:attribute>
+                       </input>
+               </form>
        </div>
-                                       </form>
-                                               <div class="pure-control-group">
-                                                               <xsl:variable 
name="done_action">
-                                                                       
<xsl:value-of select="done_action"/>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lang_done">
-                                                                       
<xsl:value-of select="lang_done"/>
-                                                               </xsl:variable>
-                                                               <form 
method="post" action="{$done_action}">
-                                                                       <input 
type="submit" class="pure-button pure-button-primary" name="done" 
value="{$lang_done}" onMouseout="window.status='';return true;">
-                                                                               
<xsl:attribute name="onMouseover">
-                                                                               
        <xsl:text>window.status='</xsl:text>
-                                                                               
        <xsl:value-of select="lang_done_attribtext"/>
-                                                                               
        <xsl:text>'; return true;</xsl:text>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </form>
-                                               </div>
 </xsl:template>
 
 <!-- add attribute / edit attribute -->
@@ -1406,326 +1406,326 @@
                                                <xsl:value-of 
select="form_action"/>
                                        </xsl:variable>
                                        <form method="post" class="pure-form 
pure-form-aligned" action="{$form_action}">
-                                                    <dl>
+                                               <dl>
                                                        <xsl:choose>
                                                                <xsl:when 
test="msgbox_data != ''">
-                                                                        <dt>
-                                                                               
 <xsl:call-template name="msgbox"/>
-                                                                        </dt>
+                                                                       <dt>
+                                                                               
<xsl:call-template name="msgbox"/>
+                                                                       </dt>
                                                                </xsl:when>
                                                        </xsl:choose>
-                                                    </dl>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'entity')"/>
-                                                               </label>
-                                                                       
<xsl:value-of select="entity_name"/>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'category')"/>
-                                                               </label>
-                                                                       
<xsl:value-of select="category_name"/>
-                                                       </div>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="value_id != ''">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'attribute id')"/>
-                                                                               
</label>
-                                                                               
        <xsl:value-of select="value_id"/>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'column name')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[column_name]" value="{value_column_name}" 
maxlength="50">
+                                               </dl>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'entity')"/>
+                                                       </label>
+                                                       <xsl:value-of 
select="entity_name"/>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'category')"/>
+                                                       </label>
+                                                       <xsl:value-of 
select="category_name"/>
+                                               </div>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_id != ''">
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'attribute id')"/>
+                                                                       </label>
+                                                                       
<xsl:value-of select="value_id"/>
+                                                               </div>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'column name')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[column_name]" value="{value_column_name}" maxlength="50">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter the name for the column')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'input text')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[input_text]" value="{value_input_text}" size="60" maxlength="255">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter the input text for 
records')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'statustext')"/>
+                                                       </label>
+                                                       <textarea cols="60" 
rows="10" name="values[statustext]" maxlength="255">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter a statustext for the 
inputfield in forms')"/>
+                                                               </xsl:attribute>
+                                                               <xsl:value-of 
select="value_statustext"/>
+                                                       </textarea>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'group')"/>
+                                                       </label>
+                                                       <select 
name="values[group_id]" class="forms">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'select a group')"/>
+                                                               </xsl:attribute>
+                                                               <option 
value="">
+                                                                       
<xsl:value-of select="php:function('lang', 'no group')"/>
+                                                               </option>
+                                                               
<xsl:apply-templates select="attrib_group_list"/>
+                                                       </select>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'datatype')"/>
+                                                       </label>
+                                                       <select 
name="values[column_info][type]" class="forms">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'select a datatype')"/>
+                                                               </xsl:attribute>
+                                                               <option 
value="">
+                                                                       
<xsl:value-of select="php:function('lang', 'no datatype')"/>
+                                                               </option>
+                                                               
<xsl:apply-templates select="datatype_list"/>
+                                                       </select>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'precision')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[column_info][precision]" value="{value_precision}">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter the record length')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'scale')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[column_info][scale]" value="{value_scale}">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter the scale if type is 
decimal')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'default')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[column_info][default]" value="{value_default}">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enter the default value')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'nullable')"/>
+                                                       </label>
+                                                       <select 
name="values[column_info][nullable]">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'chose if this column is 
nullable')"/>
+                                                               </xsl:attribute>
+                                                               <option 
value="">
+                                                                       
<xsl:value-of select="php:function('lang', 'select nullable')"/>
+                                                               </option>
+                                                               
<xsl:apply-templates select="nullable_list"/>
+                                                       </select>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'show in list')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="values[list]" value="1">
+                                                               <xsl:if 
test="value_list = 1">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'check to show this attribute in 
entity list')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'include in search')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="values[search]" value="1">
+                                                               <xsl:if 
test="value_search = 1">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'check to show this attribute in 
location list')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'history')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="values[history]" value="1">
+                                                               <xsl:if 
test="value_history = 1">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enable history for this 
attribute')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'disabled')"/>
+                                                       </label>
+                                                       <input type="checkbox" 
name="values[disabled]" value="1">
+                                                               <xsl:if 
test="value_disabled = 1">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:if>
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'this attribute turn up as disabled 
in the form')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'short description')"/>
+                                                       </label>
+                                                       <input type="text" 
name="values[short_description]" value="{value_short_description}" size = "2" 
maxlength= "2">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'optional order of field in a short 
description')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </div>
+
+                                               <div class="pure-control-group">
+                                                       <label>
+                                                               <xsl:value-of 
select="php:function('lang', 'help message')"/>
+                                                       </label>
+                                                       <textarea cols="60" 
rows="10" name="values[helpmsg]">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'enables help message for this 
attribute')"/>
+                                                               </xsl:attribute>
+                                                               <xsl:value-of 
select="value_helpmsg"/>
+                                                       </textarea>
+                                               </div>
+
+                                               <xsl:choose>
+                                                       <xsl:when 
test="datatype = 'link'">
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'action')"/>
+                                                                       </label>
+                                                                       
<textarea cols="60" rows="10" name="values[javascript_action]">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the name for the 
column')"/>
+                                                                               
        <xsl:text>optional javascript, __id__ is replaced by id</xsl:text>
                                                                                
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'input text')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[input_text]" value="{value_input_text}" size="60" 
maxlength="255">
+                                                                               
<xsl:value-of select="value_javascript_action"/>
+                                                                       
</textarea>
+                                                               </div>
+                                                       </xsl:when>
+                                               </xsl:choose>
+
+                                               <xsl:choose>
+                                                       <xsl:when 
test="multiple_choice = 1">
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'choice')"/>
+                                                                       </label>
+                                                                       
<xsl:call-template name="choice"/>
+                                                               </div>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="custom_get_list = 1">
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'custom get list function')"/>
+                                                                       </label>
+                                                                       <input 
type="text" name="values[get_list_function]" value="{value_get_list_function}" 
size="60">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the input text for 
records')"/>
+                                                                               
        <xsl:text>&lt;app&gt;.&lt;class&gt;.&lt;function&gt;</xsl:text>
                                                                                
</xsl:attribute>
                                                                        </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'statustext')"/>
-                                                               </label>
-                                                                       
<textarea cols="60" rows="10" name="values[statustext]" maxlength="255">
+                                                               </div>
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'get list function input')"/>
+                                                                       </label>
+                                                                       
<textarea cols="60" rows="10" name="values[get_list_function_input]">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter a statustext for the 
inputfield in forms')"/>
+                                                                               
        <xsl:text>parameter1 = value1, parameter2 = value2...</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_statustext"/>
+                                                                               
<xsl:value-of select="value_get_list_function_input"/>
                                                                        
</textarea>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'group')"/>
-                                                               </label>
-                                                                       <select 
name="values[group_id]" class="forms">
+                                                               </div>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="custom_get_single = 1">
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'custom get single function')"/>
+                                                                       </label>
+                                                                       <input 
type="text" name="values[get_single_function]" 
value="{value_get_single_function}" size="60">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'select a group')"/>
+                                                                               
        <xsl:text>&lt;app&gt;.&lt;class&gt;.&lt;function&gt;</xsl:text>
                                                                                
</xsl:attribute>
-                                                                               
<option value="">
-                                                                               
        <xsl:value-of select="php:function('lang', 'no group')"/>
-                                                                               
</option>
-                                                                               
<xsl:apply-templates select="attrib_group_list"/>
-                                                                       
</select>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'datatype')"/>
-                                                               </label>
-                                                                       <select 
name="values[column_info][type]" class="forms">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'select a datatype')"/>
-                                                                               
</xsl:attribute>
-                                                                               
<option value="">
-                                                                               
        <xsl:value-of select="php:function('lang', 'no datatype')"/>
-                                                                               
</option>
-                                                                               
<xsl:apply-templates select="datatype_list"/>
-                                                                       
</select>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'precision')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[column_info][precision]" value="{value_precision}">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the record length')"/>
-                                                                               
</xsl:attribute>
                                                                        </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'scale')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[column_info][scale]" value="{value_scale}">
+                                                               </div>
+                                                               <div 
class="pure-control-group">
+                                                                       <label>
+                                                                               
<xsl:value-of select="php:function('lang', 'get single function input')"/>
+                                                                       </label>
+                                                                       
<textarea cols="60" rows="10" name="values[get_single_function_input]">
                                                                                
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the scale if type is 
decimal')"/>
+                                                                               
        <xsl:text>parameter1 = value1, parameter2 = value2...</xsl:text>
                                                                                
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'default')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[column_info][default]" value="{value_default}">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enter the default value')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'nullable')"/>
-                                                               </label>
-                                                                       <select 
name="values[column_info][nullable]">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'chose if this column is 
nullable')"/>
-                                                                               
</xsl:attribute>
-                                                                               
<option value="">
-                                                                               
        <xsl:value-of select="php:function('lang', 'select nullable')"/>
-                                                                               
</option>
-                                                                               
<xsl:apply-templates select="nullable_list"/>
-                                                                       
</select>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'show in list')"/>
-                                                               </label>
-                                                                       <input 
type="checkbox" name="values[list]" value="1">
-                                                                               
<xsl:if test="value_list = 1">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'check to show this 
attribute in entity list')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'include in search')"/>
-                                                               </label>
-                                                                       <input 
type="checkbox" name="values[search]" value="1">
-                                                                               
<xsl:if test="value_search = 1">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'check to show this 
attribute in location list')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'history')"/>
-                                                               </label>
-                                                                       <input 
type="checkbox" name="values[history]" value="1">
-                                                                               
<xsl:if test="value_history = 1">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enable history for this 
attribute')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'disabled')"/>
-                                                               </label>
-                                                                       <input 
type="checkbox" name="values[disabled]" value="1">
-                                                                               
<xsl:if test="value_disabled = 1">
-                                                                               
        <xsl:attribute name="checked">
-                                                                               
                <xsl:text>checked</xsl:text>
-                                                                               
        </xsl:attribute>
-                                                                               
</xsl:if>
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'this attribute turn up as 
disabled in the form')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'short description')"/>
-                                                               </label>
-                                                                       <input 
type="text" name="values[short_description]" value="{value_short_description}" 
size = "2" maxlength= "2">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'optional order of field in 
a short description')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-
-                                                       <div 
class="pure-control-group">
-                                                               <label>
-                                                                       
<xsl:value-of select="php:function('lang', 'help message')"/>
-                                                               </label>
-                                                                       
<textarea cols="60" rows="10" name="values[helpmsg]">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'enables help message for 
this attribute')"/>
-                                                                               
</xsl:attribute>
-                                                                               
<xsl:value-of select="value_helpmsg"/>
+                                                                               
<xsl:value-of select="value_get_single_function_input"/>
                                                                        
</textarea>
-                                                       </div>
-
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="datatype = 'link'">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'action')"/>
-                                                                               
</label>
-                                                                               
        <textarea cols="60" rows="10" name="values[javascript_action]">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:text>optional javascript, __id__ is replaced by 
id</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:value-of select="value_javascript_action"/>
-                                                                               
        </textarea>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="multiple_choice = 1">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'choice')"/>
-                                                                               
</label>
-                                                                               
        <xsl:call-template name="choice"/>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="custom_get_list = 1">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'custom get list 
function')"/>
-                                                                               
</label>
-                                                                               
        <input type="text" name="values[get_list_function]" 
value="{value_get_list_function}" size="60">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        
<xsl:text>&lt;app&gt;.&lt;class&gt;.&lt;function&gt;</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                       </div>
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'get list function input')"/>
-                                                                               
</label>
-                                                                               
        <textarea cols="60" rows="10" name="values[get_list_function_input]">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:text>parameter1 = value1, parameter2 = 
value2...</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:value-of select="value_get_list_function_input"/>
-                                                                               
        </textarea>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <xsl:choose>
-                                                               <xsl:when 
test="custom_get_single = 1">
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'custom get single 
function')"/>
-                                                                               
</label>
-                                                                               
        <input type="text" name="values[get_single_function]" 
value="{value_get_single_function}" size="60">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        
<xsl:text>&lt;app&gt;.&lt;class&gt;.&lt;function&gt;</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
        </input>
-                                                                       </div>
-                                                                       <div 
class="pure-control-group">
-                                                                               
<label>
-                                                                               
        <xsl:value-of select="php:function('lang', 'get single function 
input')"/>
-                                                                               
</label>
-                                                                               
        <textarea cols="60" rows="10" name="values[get_single_function_input]">
-                                                                               
                <xsl:attribute name="title">
-                                                                               
                        <xsl:text>parameter1 = value1, parameter2 = 
value2...</xsl:text>
-                                                                               
                </xsl:attribute>
-                                                                               
                <xsl:value-of select="value_get_single_function_input"/>
-                                                                               
        </textarea>
-                                                                       </div>
-                                                               </xsl:when>
-                                                       </xsl:choose>
-                                                       <div 
class="pure-control-group">
-                                                                       
<xsl:variable name="lang_save">
-                                                                               
<xsl:value-of select="php:function('lang', 'save')"/>
-                                                                       
</xsl:variable>
-                                                                       <input 
type="submit" class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'save the attribute')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                       </div>
-                                       </form>
+                                                               </div>
+                                                       </xsl:when>
+                                               </xsl:choose>
                                                <div class="pure-control-group">
-                                                               <xsl:variable 
name="done_action">
-                                                                       
<xsl:value-of select="done_action"/>
-                                                               </xsl:variable>
-                                                               <xsl:variable 
name="lang_done">
-                                                                       
<xsl:value-of select="php:function('lang', 'done')"/>
-                                                               </xsl:variable>
-                                                               <form 
method="post" action="{$done_action}">
-                                                                       <input 
type="submit" class="pure-button pure-button-primary" name="done" 
value="{$lang_done}">
-                                                                               
<xsl:attribute name="title">
-                                                                               
        <xsl:value-of select="php:function('lang', 'back to the list')"/>
-                                                                               
</xsl:attribute>
-                                                                       </input>
-                                                               </form>
+                                                       <xsl:variable 
name="lang_save">
+                                                               <xsl:value-of 
select="php:function('lang', 'save')"/>
+                                                       </xsl:variable>
+                                                       <input type="submit" 
class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'save the attribute')"/>
+                                                               </xsl:attribute>
+                                                       </input>
                                                </div>
+                                       </form>
+                                       <div class="pure-control-group">
+                                               <xsl:variable 
name="done_action">
+                                                       <xsl:value-of 
select="done_action"/>
+                                               </xsl:variable>
+                                               <xsl:variable name="lang_done">
+                                                       <xsl:value-of 
select="php:function('lang', 'done')"/>
+                                               </xsl:variable>
+                                               <form method="post" 
action="{$done_action}">
+                                                       <input type="submit" 
class="pure-button pure-button-primary" name="done" value="{$lang_done}">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'back to the list')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </form>
+                                       </div>
                                </div>
                        </div>
                </div>
@@ -1734,7 +1734,7 @@
 
 <!-- list custom_function -->
 <xsl:template match="list_custom_function">
-       <table width="100%" cellpadding="2" cellspacing="2" align="center">
+       <table class="pure-table pure-table-bordered">
                <tr>
                        <td align="right">
                                <xsl:call-template name="search_field"/>
@@ -1887,151 +1887,151 @@
 
 <!-- add custom_function / edit custom_function -->
 <xsl:template match="edit_custom_function" xmlns:php="http://php.net/xsl";>
-    <script type="text/javascript">
-                       self.name="first_Window";
-                       <xsl:value-of select="lookup_functions"/>
-    </script>
-    <div id="tab-content">
-        <xsl:value-of disable-output-escaping="yes" select="tabs"/>
-        <div id="general">
-            <div align="left">
-                    <xsl:variable name="form_action">
-                            <xsl:value-of select="form_action"/>
-                    </xsl:variable>
-                    <form method="post" class="pure-form pure-form-aligned" 
action="{$form_action}">
-                                <dl>
-                                    <xsl:choose>
-                                            <xsl:when test="msgbox_data != ''">
-                                                            <dt>
-                                                                    
<xsl:call-template name="msgbox"/>
-                                                            </dt>
-                                            </xsl:when>
-                                    </xsl:choose>
-                                </dl>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="lang_entity"/>
-                                            </label>
+       <script type="text/javascript">
+               self.name="first_Window";
+               <xsl:value-of select="lookup_functions"/>
+       </script>
+       <div id="tab-content">
+               <xsl:value-of disable-output-escaping="yes" select="tabs"/>
+               <div id="general">
+                       <div align="left">
+                               <xsl:variable name="form_action">
+                                       <xsl:value-of select="form_action"/>
+                               </xsl:variable>
+                               <form method="post" class="pure-form 
pure-form-aligned" action="{$form_action}">
+                                       <dl>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="msgbox_data != ''">
+                                                               <dt>
+                                                                       
<xsl:call-template name="msgbox"/>
+                                                               </dt>
+                                                       </xsl:when>
+                                               </xsl:choose>
+                                       </dl>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_entity"/>
+                                               </label>
 
-                                                    <xsl:value-of 
select="entity_name"/>
-                                    </div>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="lang_category"/>
-                                            </label>
-                                                    <xsl:value-of 
select="category_name"/>
-                                    </div>
-                                    <xsl:choose>
-                                            <xsl:when test="value_id != ''">
-                                                    <div 
class="pure-control-group">
-                                                            <label>
-                                                                    
<xsl:value-of select="lang_id"/>
-                                                            </label>
-                                                                    
<xsl:value-of select="value_id"/>
-                                                    </div>
-                                            </xsl:when>
-                                    </xsl:choose>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="lang_descr"/>
-                                            </label>
-                                                    <textarea cols="60" 
rows="10" name="values[descr]" onMouseout="window.status='';return true;">
-                                                            <xsl:attribute 
name="onMouseover">
-                                                                    
<xsl:text>window.status='</xsl:text>
-                                                                    
<xsl:value-of select="lang_descr_custom_functiontext"/>
-                                                                    
<xsl:text>'; return true;</xsl:text>
-                                                            </xsl:attribute>
-                                                            <xsl:value-of 
select="value_descr"/>
-                                                    </textarea>
-                                    </div>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="lang_custom_function"/>
-                                            </label>
-                                                    <xsl:variable 
name="lang_custom_function_statustext">
-                                                            <xsl:value-of 
select="lang_custom_function_statustext"/>
-                                                    </xsl:variable>
-                                                    <select 
name="values[custom_function_file]" class="forms" 
onMouseover="window.status='{$lang_custom_function_statustext}'; return true;" 
onMouseout="window.status='';return true;">
-                                                            <option value="">
-                                                                    
<xsl:value-of select="lang_no_custom_function"/>
-                                                            </option>
-                                                            
<xsl:apply-templates select="custom_function_list"/>
-                                                    </select>
-                                    </div>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="lang_active"/>
-                                            </label>
-                                                    <xsl:choose>
-                                                            <xsl:when 
test="value_active = 1">
-                                                                    <input 
type="checkbox" name="values[active]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
-                                                                            
<xsl:attribute name="onMouseover">
-                                                                               
     <xsl:text>window.status='</xsl:text>
-                                                                               
     <xsl:value-of select="lang_active_statustext"/>
-                                                                               
     <xsl:text>'; return true;</xsl:text>
-                                                                            
</xsl:attribute>
-                                                                    </input>
-                                                            </xsl:when>
-                                                            <xsl:otherwise>
-                                                                    <input 
type="checkbox" name="values[active]" value="1" 
onMouseout="window.status='';return true;">
-                                                                            
<xsl:attribute name="onMouseover">
-                                                                               
     <xsl:text>window.status='</xsl:text>
-                                                                               
     <xsl:value-of select="lang_active_statustext"/>
-                                                                               
     <xsl:text>'; return true;</xsl:text>
-                                                                            
</xsl:attribute>
-                                                                    </input>
-                                                            </xsl:otherwise>
-                                                    </xsl:choose>
-                                    </div>
-                                    <div class="pure-control-group">
-                                            <label>
-                                                    <xsl:value-of 
select="php:function('lang', 'client-side')"/>
-                                            </label>
-                                                    <input type="checkbox" 
name="values[client_side]" value="1">
-                                                            <xsl:attribute 
name="title">
-                                                                    
<xsl:text>otherwise: server-side</xsl:text>
-                                                            </xsl:attribute>
-                                                            <xsl:if 
test="value_client_side = '1'">
-                                                                    
<xsl:attribute name="checked">
-                                                                            
<xsl:text>checked</xsl:text>
-                                                                    
</xsl:attribute>
-                                                            </xsl:if>
-                                                    </input>
-                                    </div>
-                                    <div class="pure-control-group">
-                                                    <xsl:variable 
name="lang_save">
-                                                            <xsl:value-of 
select="lang_save"/>
-                                                    </xsl:variable>
-                                                    <input type="submit" 
class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}" onMouseout="window.status='';return true;">
-                                                            <xsl:attribute 
name="onMouseover">
-                                                                    
<xsl:text>window.status='</xsl:text>
-                                                                    
<xsl:value-of select="lang_save_custom_functiontext"/>
-                                                                    
<xsl:text>'; return true;</xsl:text>
-                                                            </xsl:attribute>
-                                                    </input>
-                                    </div>
-                    </form>
-                            <div class="pure-control-group">
+                                               <xsl:value-of 
select="entity_name"/>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_category"/>
+                                               </label>
+                                               <xsl:value-of 
select="category_name"/>
+                                       </div>
+                                       <xsl:choose>
+                                               <xsl:when test="value_id != ''">
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="lang_id"/>
+                                                               </label>
+                                                               <xsl:value-of 
select="value_id"/>
+                                                       </div>
+                                               </xsl:when>
+                                       </xsl:choose>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_descr"/>
+                                               </label>
+                                               <textarea cols="60" rows="10" 
name="values[descr]" onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_descr_custom_functiontext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:value-of 
select="value_descr"/>
+                                               </textarea>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_custom_function"/>
+                                               </label>
+                                               <xsl:variable 
name="lang_custom_function_statustext">
+                                                       <xsl:value-of 
select="lang_custom_function_statustext"/>
+                                               </xsl:variable>
+                                               <select 
name="values[custom_function_file]" class="forms" 
onMouseover="window.status='{$lang_custom_function_statustext}'; return true;" 
onMouseout="window.status='';return true;">
+                                                       <option value="">
+                                                               <xsl:value-of 
select="lang_no_custom_function"/>
+                                                       </option>
+                                                       <xsl:apply-templates 
select="custom_function_list"/>
+                                               </select>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="lang_active"/>
+                                               </label>
+                                               <xsl:choose>
+                                                       <xsl:when 
test="value_active = 1">
+                                                               <input 
type="checkbox" name="values[active]" value="1" checked="checked" 
onMouseout="window.status='';return true;">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_active_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:when>
+                                                       <xsl:otherwise>
+                                                               <input 
type="checkbox" name="values[active]" value="1" 
onMouseout="window.status='';return true;">
+                                                                       
<xsl:attribute name="onMouseover">
+                                                                               
<xsl:text>window.status='</xsl:text>
+                                                                               
<xsl:value-of select="lang_active_statustext"/>
+                                                                               
<xsl:text>'; return true;</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </xsl:otherwise>
+                                               </xsl:choose>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label>
+                                                       <xsl:value-of 
select="php:function('lang', 'client-side')"/>
+                                               </label>
+                                               <input type="checkbox" 
name="values[client_side]" value="1">
+                                                       <xsl:attribute 
name="title">
+                                                               
<xsl:text>otherwise: server-side</xsl:text>
+                                                       </xsl:attribute>
+                                                       <xsl:if 
test="value_client_side = '1'">
+                                                               <xsl:attribute 
name="checked">
+                                                                       
<xsl:text>checked</xsl:text>
+                                                               </xsl:attribute>
+                                                       </xsl:if>
+                                               </input>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <xsl:variable name="lang_save">
+                                                       <xsl:value-of 
select="lang_save"/>
+                                               </xsl:variable>
+                                               <input type="submit" 
class="pure-button pure-button-primary" name="values[save]" 
value="{$lang_save}" onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_save_custom_functiontext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </div>
+                               </form>
+                               <div class="pure-control-group">
 
-                                            <xsl:variable name="done_action">
-                                                    <xsl:value-of 
select="done_action"/>
-                                            </xsl:variable>
-                                            <xsl:variable name="lang_done">
-                                                    <xsl:value-of 
select="lang_done"/>
-                                            </xsl:variable>
-                                            <form method="post" 
action="{$done_action}">
-                                                    <input type="submit" 
class="pure-button pure-button-primary" name="done" value="{$lang_done}" 
onMouseout="window.status='';return true;">
-                                                            <xsl:attribute 
name="onMouseover">
-                                                                    
<xsl:text>window.status='</xsl:text>
-                                                                    
<xsl:value-of select="lang_done_custom_functiontext"/>
-                                                                    
<xsl:text>'; return true;</xsl:text>
-                                                            </xsl:attribute>
-                                                    </input>
-                                            </form>
-                            </div>
-            </div>
-        </div>
-    </div>
+                                       <xsl:variable name="done_action">
+                                               <xsl:value-of 
select="done_action"/>
+                                       </xsl:variable>
+                                       <xsl:variable name="lang_done">
+                                               <xsl:value-of 
select="lang_done"/>
+                                       </xsl:variable>
+                                       <form method="post" 
action="{$done_action}">
+                                               <input type="submit" 
class="pure-button pure-button-primary" name="done" value="{$lang_done}" 
onMouseout="window.status='';return true;">
+                                                       <xsl:attribute 
name="onMouseover">
+                                                               
<xsl:text>window.status='</xsl:text>
+                                                               <xsl:value-of 
select="lang_done_custom_functiontext"/>
+                                                               <xsl:text>'; 
return true;</xsl:text>
+                                                       </xsl:attribute>
+                                               </input>
+                                       </form>
+                               </div>
+                       </div>
+               </div>
+       </div>
 </xsl:template>
 
 <!-- attrib_group_list -->
@@ -2135,7 +2135,7 @@
 
 <!-- New template-->
 <xsl:template xmlns:php="http://php.net/xsl"; name="choice">
-       <table cellpadding="2" cellspacing="2" width="80%" align="left">
+       <table class="pure-table pure-table-bordered">
                <xsl:choose>
                        <xsl:when test="value_choice!=''">
                                <tr class="th">
@@ -2199,7 +2199,14 @@
                        <td valign="top" colspan="2">
                                <xsl:value-of select="php:function('lang', 'new 
value')"/>
                        </td>
-                       <td valign="top" colspan="2">
+                       <td valign="top">
+                               <input type="text" name="values[new_choice_id]" 
size = '3'>
+                                       <xsl:attribute name="title">
+                                               <xsl:value-of 
select="php:function('lang', 'new id for multiple choice')"/>
+                                       </xsl:attribute>
+                               </input>
+                       </td>
+                       <td valign="top">
                                <input type="text" name="values[new_choice]">
                                        <xsl:attribute name="title">
                                                <xsl:value-of 
select="php:function('lang', 'new value for multiple choice')"/>
@@ -2212,7 +2219,7 @@
 
 <!-- New template-->
 <xsl:template name="include_list">
-       <table cellpadding="2" cellspacing="2" width="80%" align="left">
+       <table class="pure-table pure-table-bordered">
                <tr class="th">
                        <td class="th_text" width="85%" align="left">
                                <xsl:value-of select="lang_name"/>
@@ -2268,7 +2275,7 @@
 
 <!-- New template-->
 <xsl:template name="include_list_2">
-       <table cellpadding="2" cellspacing="2" width="80%" align="left">
+       <table class="pure-table pure-table-bordered">
                <tr class="th">
                        <td class="th_text" width="85%" align="left">
                                <xsl:value-of select="lang_name"/>
@@ -2324,7 +2331,7 @@
 
 <!-- New template-->
 <xsl:template name="include_list_3">
-       <table cellpadding="2" cellspacing="2" width="80%" align="left">
+       <table class="pure-table pure-table-bordered">
                <tr class="th">
                        <td class="th_text" width="85%" align="left">
                                <xsl:value-of select="lang_name"/>
@@ -2381,4 +2388,4 @@
                </xsl:if>
                <xsl:value-of disable-output-escaping="yes" select="name"/>
        </option>
-</xsl:template>
\ No newline at end of file
+</xsl:template>

Modified: branches/dev-syncromind/sms/bin/default/config_STATUS_log
===================================================================
--- branches/dev-syncromind/sms/bin/default/config_STATUS_log   2015-08-25 
09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/sms/bin/default/config_STATUS_log   2015-08-25 
13:29:40 UTC (rev 13774)
@@ -24,6 +24,4 @@
        (
                'menuaction' => 'property.uiworkorder.view',
                'id'            => $param[0]
-       );
-
-?>
+       );
\ No newline at end of file

Modified: branches/dev-syncromind/sms/bin/default/set_workorder_status.php
===================================================================
--- branches/dev-syncromind/sms/bin/default/set_workorder_status.php    
2015-08-25 09:16:26 UTC (rev 13773)
+++ branches/dev-syncromind/sms/bin/default/set_workorder_status.php    
2015-08-25 13:29:40 UTC (rev 13774)
@@ -57,7 +57,44 @@
                                        }
                                }
 
-                               
execMethod('property.soworkorder.check_project_status',$workorder_id);
+//                             
execMethod('property.soworkorder.check_project_status',$workorder_id);
+
+                               $project_status_on_last_order_closed = 'utført';
+
+                               $this->db->query("SELECT count(id) AS 
orders_at_project FROM fm_workorder WHERE project_id= {$project_id}", __LINE__, 
__FILE__);
+                               $this->db->next_record();
+                               $orders_at_project = (int) 
$this->db->f('orders_at_project');
+
+                               $this->db->query("SELECT count(fm_workorder.id) 
AS closed_orders_at_project"
+                               . " FROM fm_workorder"
+                               . " {$this->join} fm_workorder_status ON 
(fm_workorder.status = fm_workorder_status.id)"
+                               . " WHERE project_id= {$project_id}"
+                               . " AND (fm_workorder_status.closed = 1 OR 
fm_workorder_status.delivered = 1)", __LINE__, __FILE__);
+
+                               $this->db->next_record();
+                               $closed_orders_at_project = (int) 
$this->db->f('closed_orders_at_project');
+
+                               $this->db->query("SELECT 
fm_project_status.closed AS closed_project, fm_project.status as old_status"
+                               . " FROM fm_project"
+                               . " {$this->join} fm_project_status ON 
(fm_project.status = fm_project_status.id)"
+                               . " WHERE fm_project.id= {$project_id}", 
__LINE__, __FILE__);
+
+                               $this->db->next_record();
+                               $closed_project  = 
!!$this->db->f('closed_project');
+                               $old_status              = 
$this->db->f('old_status');
+
+                               if($status == 'utført'
+                                       && $orders_at_project == 
$closed_orders_at_project
+                                       && $old_status != 
$project_status_on_last_order_closed)
+                               {
+                                       $this->db->query("UPDATE fm_project SET 
status = '{$project_status_on_last_order_closed}' WHERE id= {$project_id}", 
__LINE__, __FILE__);
+
+                                       $historylog_project = 
CreateObject('property.historylog', 'project');
+
+                                       $historylog_project->add('S', 
$project_id, $project_status_on_last_order_closed, $old_status);
+                                       $historylog_project->add('RM', 
$project_id, 'Status endret ved at siste bestilling er satt til utført');
+                               }
+                       
                                $command_output = 'success';
                        }
                }




reply via email to

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