fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [9093] Merge 9070:9092 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [9093] Merge 9070:9092 from trunk
Date: Tue, 03 Apr 2012 11:27:06 +0000

Revision: 9093
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=9093
Author:   sigurdne
Date:     2012-04-03 11:27:05 +0000 (Tue, 03 Apr 2012)
Log Message:
-----------
Merge 9070:9092 from trunk

Modified Paths:
--------------
    
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
    branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
    branches/Version-1_0-branch/controller/js/controller/ajax.js
    branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js
    
branches/Version-1_0-branch/controller/templates/base/check_list/print_check_list.xsl
    
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
    
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_items.xsl
    
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
    
branches/Version-1_0-branch/controller/templates/base/control_item/sort_check_list.xsl
    branches/Version-1_0-branch/controller/templates/base/css/base.css
    
branches/Version-1_0-branch/controller/templates/base/procedure/view_procedures_for_control.xsl
    branches/Version-1_0-branch/messenger/setup/setup.inc.php
    branches/Version-1_0-branch/property/inc/class.botts.inc.php
    branches/Version-1_0-branch/property/inc/class.sotts.inc.php
    branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
    branches/Version-1_0-branch/property/inc/class.uitts.inc.php
    branches/Version-1_0-branch/property/setup/phpgw_no.lang
    branches/Version-1_0-branch/property/setup/setup.inc.php
    branches/Version-1_0-branch/property/setup/tables_current.inc.php
    branches/Version-1_0-branch/property/setup/tables_update.inc.php
    branches/Version-1_0-branch/registration/inc/class.bopending.inc.php
    branches/Version-1_0-branch/registration/inc/class.boreg.inc.php
    branches/Version-1_0-branch/registration/inc/class.sopending.inc.php
    branches/Version-1_0-branch/registration/inc/class.soreg.inc.php
    branches/Version-1_0-branch/registration/inc/class.uicommon.inc.php
    branches/Version-1_0-branch/registration/inc/class.uipending.inc.php
    branches/Version-1_0-branch/registration/inc/class.uireg.inc.php
    branches/Version-1_0-branch/registration/inc/hook_logout.inc.php
    branches/Version-1_0-branch/registration/templates/base/config.tpl
    branches/Version-1_0-branch/registration/templates/base/pending_users.xsl
    branches/Version-1_0-branch/registration/templates/base/user_edit.xsl

Added Paths:
-----------
    branches/Version-1_0-branch/messenger/inc/class.hook_helper.inc.php
    
branches/Version-1_0-branch/registration/templates/base/confirm_pending_approval.tpl
    branches/Version-1_0-branch/registration/templates/base/yui_phpgw_i18n.xsl

Removed Paths:
-------------
    branches/Version-1_0-branch/messenger/inc/hook_registration.inc.php
    branches/Version-1_0-branch/registration/templates/base/yui_booking_i18n.xsl

Property Changed:
----------------
    branches/Version-1_0-branch/


Property changes on: branches/Version-1_0-branch
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068
   + 
/trunk:6439-6441,6443,6445-6447,6449-6464,6466-6468,6470-6474,6476-6477,6479-6480,6483-6488,6490-6491,6493-6494,6496-6501,6503-6504,6506,6508,6510-6511,6513,6515-6516,6518,6520-6524,6526-6528,6533-6534,6536-6541,6543-6565,6567,6569,6571-6576,6578,6580-6586,6588-6596,6598-6600,6602-6604,6606-6607,6609-6611,6613-6625,6629-6639,6641-6643,6645-6646,6648,6650-6654,6656-6659,6661-6663,6665-6666,6668-6669,6672-6673,6675,6677-6678,6680,6682-6686,6688-6717,6719,6721-6722,6724-6728,6730,6732-6734,6736-6739,6741,6743,6745-6746,6748-6756,6758-6762,6764,6766-6788,6790,6792-6798,6800-6814,6816-6819,6821-6822,6824-6826,6828-6837,6839,6841,6843-6849,6851,6853-6869,6871-6874,6876-6877,6879,6881,6883,6885-6886,6888-6893,6895-6897,6899-6901,6903,6905-6907,6909,6911-6929,6931-6936,6938-6947,6949,6951,6953,6955-6956,6958-6959,6961-6968,6970-6971,6973-6974,6976-6978,6980,6982-7017,7019-7025,7027-7035,7037-7039,7041-7045,7047-7055,7057,7059-7065,7067-7069,7071,7073,7075-7076,7078,7080-7081,7083,7085,7087,7089-7097,7099-7102,7104-7105,7107-7111,7113-7120,7122-7124,7126-7129,7131,7133-7141,7143,7145-7146,7148-7150,7152-7153,7155-7158,7160-7164,7166-7167,7169-7170,7172,7174,7176,7178,7180-7181,7183,7185,7187-7188,7190,7192-7196,7198-7199,7201-7203,7205,7207,7209-7210,7212,7214,7216-7217,7219-7222,7224-7226,7228-7229,7231,7233-7234,7236-7238,7240-7241,7243-7244,7246,7248,7250,7252-7256,7258-7259,7261-7264,7266-7273,7275-7279,7281-7332,7334-7338,7340-7348,7350,7352-7353,7355-7361,7363-7366,7368-7370,7372,7374,7376,7378,7380-7386,7388-7400,7402,7404-7433,7435-7439,7441-7446,7448-7458,7460-7469,7471-7483,7485-7487,7489-7490,7492,7494,7496-7497,7499,7501-7502,7504,7506-7507,7509-7511,7513-7517,7519-7521,7523,7525,7527-7529,7531,7533,7535-7538,7540-7542,7544-7549,7551-7552,7554-7561,7563,7565,7567-7573,7575-7578,7580-7584,7586-7591,7593-7624,7627-7636,7638-7656,7658-7718,7720-7732,7734,7736,7738-7750,7754-7759,7761-7767,7769-7780,7782,7784-7809,7811-7812,7814-7835,7837-7847,7849-7887,7889-7895,7897,7899,7901,7903-7905,7907-7921,7923-7925,7927-7933,7935,7937-7952,7954-7968,7970-7974,7976,7978-7979,7981-7982,7984-7988,7990-7992,7994-8041,8043-8066,8068-8087,8089,8091-8108,8110-8124,8126-8129,8131,8133-8150,8152-8154,8156-8162,8164-8167,8169-8170,8172-8179,8181,8183-8196,8198-8207,8209-8211,8213-8214,8216-8217,8219-8220,8222,8224-8225,8227-8247,8249,8251,8253-8282,8284-8352,8354-8368,8370-8396,8398-8430,8432,8434-8440,8442-8445,8447-8453,8455-8456,8458,8460,8462-8464,8466-8473,8475-8479,8481,8483-8501,8503-8523,8525,8527-8531,8533,8535-8536,8538-8550,8552-8554,8556-8557,8559-8579,8581-8587,8589,8591-8592,8594-8595,8597-8601,8603-8610,8612-8613,8615,8617,8619-8645,8647-8650,8652-8661,8663-8666,8668-8669,8671-8683,8685-8691,8693-8730,8732-8737,8739,8741-8767,8769,8771-8772,8774,8776-8797,8799-8812,8814-8819,8821,8823-8833,8835-8837,8839,8841,8843-8849,8852-8858,8860-8867,8869-8870,8872,8874-8877,8879,8881,8883-8888,8890,8892-8901,8903-8911,8913-8917,8920-8923,8925-8933,8935-8938,8940-8943,8945,8947-8948,8950,8952-8953,8955-8962,8964,8966,8968-8970,8972-8975,8977-8983,8985-8993,8995-9001,9003,9005,9007,9009,9011-9019,9021-9023,9025,9027-9028,9030-9044,9046-9047,9049-9050,9052-9056,9058-9059,9061,9063-9064,9066-9068,9071-9092

Modified: 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php
===================================================================
--- 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php   
    2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/activitycalendar/inc/model/class.activity.inc.php   
    2012-04-03 11:27:05 UTC (rev 9093)
@@ -258,8 +258,9 @@
                                else
                                {
                                        $group_name = 
activitycalendar_sogroup::get_instance()->get_group_name($this->get_group_id());
-                                       $contact_1 = 
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_1());
-                                       $contact_2 = 
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_2());
+                                       
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($this->get_group_id(),
 true));
+                                       $contact_1 = 
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_1()->get_id());
+                                       $contact_2 = 
activitycalendar_socontactperson::get_instance()->get_group_contact_name($this->get_contact_person_2()->get_id());
                                        $desc = 
activitycalendar_sogroup::get_instance()->get_description($this->get_group_id());
                                }
                                $org_name = 
activitycalendar_soorganization::get_instance()->get_organization_name($this->get_organization_id());
@@ -276,8 +277,9 @@
                                else
                                {
                                        $org_name = 
activitycalendar_soorganization::get_instance()->get_organization_name($this->get_organization_id());
-                                       $contact_1 = 
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_1());
-                                       $contact_2 = 
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_2());
+                                       
$this->set_contact_persons(activitycalendar_socontactperson::get_instance()->get_booking_contact_persons($this->get_organization_id()));
+                                       $contact_1 = 
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_1()->get_id());
+                                       $contact_2 = 
activitycalendar_socontactperson::get_instance()->get_org_contact_name($this->get_contact_person_2()->get_id());
                                        $desc = 
activitycalendar_soorganization::get_instance()->get_description($this->get_organization_id());
                                }
                        } 

Modified: branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/inc/class.uicalendar.inc.php 
2012-04-03 11:27:05 UTC (rev 9093)
@@ -168,6 +168,9 @@
                        $location_code = phpgw::get_var('location_code');
                        $year = phpgw::get_var('year');
                        
+                       // Array that should conatain control and calendar 
objects that will be sent to view            
+                       $controls_calendar_array = array();
+                       
                        if(empty($year)){
                                $year = date("Y");
                        }
@@ -177,7 +180,7 @@
                        $from_date_ts = strtotime("01/01/$year");
                        $to_year = $year + 1;
                        $to_date_ts = strtotime("01/01/$to_year");
-                       
+                                               
                        $criteria = array
                        (
                                'user_id' => 
$GLOBALS['phpgw_info']['user']['account_id'],
@@ -192,23 +195,25 @@
                        if(empty($location_code)){
                                $location_code = 
$my_locations[0]["location_code"];
                        }
+                                               
+                       // Fetches all controls for the location within time 
period
+                       $controls_for_location_array = 
$this->so_control->get_controls_by_location($location_code, $from_date_ts, 
$to_date_ts,  $repeat_type = null);
+
+                       // Creates a calendar object for time period
+                       $this->calendar_builder = new 
calendar_builder($from_date_ts, $to_date_ts);
                        
-                       $repeat_type = null;
-                       
-                       $controls_for_location_array = 
$this->so_control->get_controls_by_location($location_code, $from_date_ts, 
$to_date_ts, $repeat_type);
-                       
-                       $this->calendar_builder = new 
calendar_builder($from_date_ts, $to_date_ts);
-               
-                       $controls_calendar_array = array();
-               
+                       // Loops through controls with repeat type: day or week 
in controls_for_location_array 
+                       // and populates array that contains aggregate open 
cases pr month.             
                        foreach($controls_for_location_array as $control){
                                if($control->get_repeat_type() == 0 | 
$control->get_repeat_type() == 1){
+                                       
+                                       // Loops through controls in 
controls_for_location_array and populates aggregate open cases pr month array.
                                        $agg_open_cases_pr_month_array = 
$this->build_agg_open_cases_pr_month_array($control, $location_code, $year);
                                                                                
                                        
$control->set_agg_open_cases_pr_month_array( $agg_open_cases_pr_month_array );
                                }
                        }
-               
+                       
                        $repeat_type = 2;
                        // Fetches control ids with check lists for specified 
time period
                        $control_id_with_check_list_array = 
$this->so->get_check_lists_for_location_2($location_code, $from_date_ts, 
$to_date_ts, $repeat_type);
@@ -346,13 +351,17 @@
                        return $controls_with_check_list;
                }
                
+               // Generates array of aggregated number of open cases for each 
month in time period 
                function build_agg_open_cases_pr_month_array($control, 
$location_code, $year){
+                               
+                       // Checks if control starts in the year that will be 
shown 
                        if( date("Y", $control->get_start_date()) == $year ){
                                $from_month = date("n", 
$control->get_start_date());    
                        }else{
                                $from_month = 1;
                        }
                        
+                       // Checks if control ends in the year that will be shown
                        if( date("Y", $control->get_end_date()) == $year ){
                                $to_month = date("n", $control->get_end_date());
                        }else{
@@ -361,16 +370,18 @@
                                        
                        $agg_open_cases_pr_month_array = array();
                        
+                       // Fetches aggregate value for open cases in each month 
in time period                  
                        for($from_month;$from_month<=$to_month;$from_month++){
                
                                $trail_from_date_ts = 
strtotime("$from_month/01/$year");
-                               
                                $trail_to_date_ts = 
strtotime("$to_month/01/$year");
-                               $so_check_list = 
CreateObject('controller.socheck_list');
-                                       
+                                                                       
                                $num_open_cases_for_control_array = array();
-                               $num_open_cases_for_control_array = 
$so_check_list->get_num_open_cases_for_control( $control->get_id(), 
$location_code, $trail_from_date_ts, $trail_to_date_ts );       
+                               
+                               // Fetches aggregate value for open cases in a 
month from db    
+                               $num_open_cases_for_control_array = 
$this->so_check_list->get_num_open_cases_for_control( $control->get_id(), 
$location_code, $trail_from_date_ts, $trail_to_date_ts ); 
                
+                               // If there is a aggregated value for the 
month, add aggregated status object to agg_open_cases_pr_month_array
                                if( !empty($num_open_cases_for_control_array) ){
                                        $status_agg_month_info = new 
status_agg_month_info();
                                        
$status_agg_month_info->set_month_nr(date("n", $from_month));

Modified: 
branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_group.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -49,13 +49,13 @@
 
                public $public_functions = array
                (
-                       'index' =>      true,
-                       'query' =>      true,
-                       'edit'  =>      true,
-                       'view'  =>      true,
-                       'add'   =>      true,
-                       'save_group_order'      =>      true,
-                       'get_control_groups_by_control_area' => true
+                       'index'                                                 
                =>      true,
+                       'query'                                                 
                =>      true,
+                       'edit'                                                  
                =>      true,
+                       'view'                                                  
                =>      true,
+                       'add'                                                   
                =>      true,
+                       'save_group_and_item_order'                             
=>      true,
+                       'get_control_groups_by_control_area'    => true
                );
 
                public function __construct()
@@ -530,30 +530,80 @@
                        }
                }
 
-               public function save_group_order(){
-                       $control_group_id = phpgw::get_var('control_group_id');
+               public function save_group_and_item_order(){
                        $control_id = phpgw::get_var('control_id');
-                       $group_order_nr = phpgw::get_var('group_order_nr');
-
-                       $status = true;
-
-                       $control_group_list = 
$this->so_control_group_list->get_group_list_by_control_and_group($control_id, 
$control_group_id);
-
-                       if( $control_group_list == null ){
-                               $control_group_list = new 
controller_control_group_list();
-                               
$control_group_list->set_control_id($control_id);
-                               
$control_group_list->set_control_group_id($control_group_id);
-                               $control_group_list->set_order_nr( 
$group_order_nr );
-                               $this->so_control_group_list->add( 
$control_group_list );
-                       }else{
-                               $control_group_list->set_order_nr( 
$group_order_nr );
-                               $this->so_control_group_list->update( 
$control_group_list );
+                       $item_order_str = phpgw::get_var('item_order');
+                       $group_order_str = phpgw::get_var('group_order');
+                       
+                       $status = 1;
+                       
+                       $group_order_arr = explode(",", $group_order_str);
+                       $item_order_arr = explode(",", $item_order_str);
+                       
+                       $db_control_group_list = 
$this->so_control_group_list->get_db();
+                                       
+                       // Saves order for control groups
+                       foreach($group_order_arr as $group_id_order){
+                               $group_id_order_arr = explode(":", 
$group_id_order);
+                               $group_id = $group_id_order_arr[0];
+                               $group_order_nr = $group_id_order_arr[1];
+                               
+                               // Gets control_group_list object from db if it 
exists
+                               $control_group_list = 
$this->so_control_group_list->get_group_list_by_control_and_group($control_id, 
$group_id);
+                               
+                               $db_control_group_list->transaction_begin();
+                               
+                               // Updates group order if control_group_list 
object exists      
+                               if( $control_group_list != null ){
+                                       
+                                       $control_group_list->set_order_nr( 
$group_order_nr );
+                                       $id = 
$this->so_control_group_list->update( $control_group_list );
+                                       
+                                       if($id > 0)
+                                               
$db_control_group_list->transaction_commit();
+                                       else
+                                               
$db_control_group_list->transaction_abort();
+                               }
+                               // If group is not in db, report error
+                               else{
+                                       echo "Error: group not found";
+                                       $status  = 0;
+                               }
+                       }                       
+                       
+                       $db_control_item_list = 
$this->so_control_item_list->get_db();
+               
+                       // Saves order for control items        
+                       foreach($item_order_arr as $item_id_order){
+                               $item_id_order_arr = explode(":", 
$item_id_order);
+                               $control_item_id = $item_id_order_arr[0];
+                               $item_order_nr = $item_id_order_arr[1];
+                               
+                               $control_item_list = 
$this->so_control_item_list->get_single_2($control_id, $control_item_id);
+                               
+                               $db_control_item_list->transaction_begin();
+                               $status = 0;
+                               
+                               // Updates item order if control_item_list 
object exists        
+                               if( $control_item_list != null ){
+                                       $control_item_list->set_order_nr( 
$item_order_nr );
+                                       $id = 
$this->so_control_item_list->update( $control_item_list );
+                                       
+                                       if($id > 0)
+                                               
$db_control_item_list->transaction_commit();
+                                       else
+                                               
$db_control_item_list->transaction_abort();
+                               }
+                               // if item does not exists report error
+                               else{
+                                       echo "Error: item not found";
+                                       $status  = 0;                           
        
+                               }
                        }
-
-                       return status;
+                       
+                       return $status;
                }
 
-
                public function query()
                {
                        $params = array(

Modified: 
branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/inc/class.uicontrol_item.inc.php     
2012-04-03 11:27:05 UTC (rev 9093)
@@ -53,7 +53,6 @@
                        'view'  =>      true,
                        'add'   =>      true,
                        'display_control_items' => true,
-                       'save_item_order'       => true,
                        'delete_item_list'      => true
                );
 
@@ -184,38 +183,6 @@
                        $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'controller.uicontrol_item.edit'));
                }
 
-               public function save_item_order(){
-
-                       $control_id = phpgw::get_var('control_id');
-                       $control_group_id = phpgw::get_var('control_group_id');
-                       $order_tags = phpgw::get_var('order_tags');
-
-                                               
-                       $status = true;
-                       foreach($order_tags as $order_tag){
-                               $control_item_id =      substr($order_tag, 
strpos($order_tag, ":")+1, strlen($order_tag));
-                               $order_nr = substr($order_tag, 0, 
strpos($order_tag, ":"));
-
-                               $control_item_list = 
$this->so_control_item_list->get_single_2($control_id, $control_item_id);
-       
-                               if($order_nr != 
$control_item_list->get_order_nr() ){
-                                       
$control_item_list->set_order_nr($order_nr);
-
-                                       if( 
!$this->so_control_item_list->update( $control_item_list )){
-                                               $status = false;
-                                       }
-                               }
-                       }
-
-                       return $status;
-                       
-                       if($status)
-                               return json_encode( array( "status" => 
"order_updated" ) );
-                       else
-                               return json_encode( array( "status" => 
"order_not_updated" ) );
-                       
-               }
-
                public function delete_item_list(){
 
                        $control_id = phpgw::get_var('control_id');

Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -12,16 +12,14 @@
                 if(period_type == 'view_month')
                 {
                         var oArgs = 
{menuaction:'controller.uicalendar.view_calendar_for_month'};
-                        var baseUrl = phpGWLink('index.php', oArgs, true);
+                        var baseUrl = phpGWLink('index.php', oArgs, false);
                         var requestUrl = baseUrl + "&location_code=" + 
location_code + "&year=" + year + "&month=" + month;
-                //var requestUrl = 
"index.php?menuaction=controller.uicalendar.view_calendar_for_month&location_code="
 + location_code + "&year=" + year + "&month=" + month;
                 }
                 else
                 {
                         var oArgs = 
{menuaction:'controller.uicalendar.view_calendar_for_year'};
-                        var baseUrl = phpGWLink('index.php', oArgs, true);
+                        var baseUrl = phpGWLink('index.php', oArgs, false);
                         var requestUrl = baseUrl +  "&location_code=" + 
location_code + "&year=" + year;
-                        //var requestUrl = 
"index.php?menuaction=controller.uicalendar.view_calendar_for_year&location_code="
 + location_code + "&year=" + year;
                 }
                
                 window.location.href = requestUrl;
@@ -33,7 +31,6 @@
                var location_type_id = $(this).val();
                 var oArgs = 
{menuaction:'controller.uicontrol_location.get_location_category'};
                 var requestUrl = phpGWLink('index.php', oArgs, true);
-         //var requestUrl = 
"index.php?menuaction=controller.uicontrol.get_controls_by_control_area&phpgw_return_as=json"
          
          var htmlString = "";
          
@@ -87,8 +84,7 @@
                                        $("#part_of_town_id").html( htmlString 
);
                                }
                          }  
-                       });
-                       
+         });
     });
        
        // file: uicheck_list.xsl
@@ -603,7 +599,8 @@
        
        $("a.quick_edit").live("click", function(e){
                var clickElem = $(this);
-               var clickRow = $(this).parents("li.check_item_case");
+               var clickRow = $(this).closest("li");
+               var order_nr = $(clickRow).find("span.order_nr").text();
                                
                var case_info = $(clickRow).find(".case_info");
                var case_id = $(case_info).find(".case_id").text();
@@ -617,7 +614,7 @@
                
                $(clickRow).attr("id", "case_" + case_id);
                
-               var quickEditRowTagStr = "<li class='quick_edit 
check_item_case'><fieldset><h3>Hurtigendring</h3><hr><form 
class='frm_update_case' action='" + requestUrl + "'>";
+               var quickEditRowTagStr = "<li class='quick_edit 
check_item_case'><h4>" + order_nr + ": " + "Hurtigendring</h4><fieldset><form 
class='frm_update_case' action='" + requestUrl + "'>";
                        
                if(case_type == "control_item_type_2")
                        quickEditRowTagStr += "<label>Måleverdi</label><input 
type='text' name='case_measurement'>" + case_measurement + "</input>";
@@ -630,7 +627,7 @@
                quickEditRowTagStr += "<label>Beskrivelse</label><textarea 
name='case_descr'>" + case_descr + "</textarea>";
                
                
-               quickEditRowTagStr += "<input type='submit' value='Oppdater' 
/>";
+               quickEditRowTagStr += "<input class='btn_m focus' type='submit' 
value='Oppdater' /><input class='btn_m cancel' type='button' value='Avbryt' />";
                
                quickEditRowTagStr += "</fieldset></form></li>";
                

Modified: 
branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/js/controller/custom_drag_drop.js    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -30,31 +30,31 @@
        $("#frmSaveOrder").submit(function(e){
                e.preventDefault();
 
-               var group_order_str = "";
-               var item_order_str = "";
+               var control_id = $("#control_id").val();
+               
+               var group_order_arr = new Array();
+               var item_order_arr = new Array();
                $('ul.groups li.drag_group').each(function(){
                        
                        var group_order_nr = 
$(this).find("span.group_order_nr").text();
                        var group_id = 
$(this).find("input[name=group_id]").val();
                        
-                       group_order_str += group_id + ":" + group_order_nr + 
",";
-                       //alert("Group id: " + group_id  + ", " + "Order nr: " 
+ group_order_nr);
+                       group_order_arr.push( group_id + ":" + group_order_nr );
                        
                        $(this).find("ul.items li").each(function(){
                                var item_order_nr = 
$(this).find("span.item_order_nr").text();
                                var item_id = 
$(this).find("input[name=item_id]").val();
                                
-                               item_order_str += item_id + ":" + item_order_nr 
+ ",";
-                               
-                               //alert("Item id: " + item_id  + ", " + "Item 
nr: " + item_order_nr);
+                               item_order_arr.push( item_id + ":" + 
item_order_nr );
                        });
                });
+       
+               var requestUrl = 
"index.php?menuaction=controller.uicontrol_group.save_group_and_item_order";
                
-               var requestUrl = 
"index.php?menuaction=controller.uicontrol_group.save_group_and_item_order";
-                       
+               // Saves order for groups and items to db
                $.ajax({
                          type: 'POST',
-                         url: requestUrl + "&group_order=" + group_order_str + 
"&item_order=" + item_order_str,
+                         url: requestUrl + "&control_id=" + control_id + 
"&group_order=" + group_order_arr.toString() + "&item_order=" + 
item_order_arr.toString(),
                          success: function() {
                                  alert("Lagret");
                          }
@@ -62,6 +62,7 @@
        });
 });
 
+// Initialises drag. Sets placeholder, next, previous and cloned drag row. 
 function init_drag(placeholder, e){
                adj_y = e.pageY - $(placeholder).position().top;
                

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/print_check_list.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/print_check_list.xsl
       2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/print_check_list.xsl
       2012-04-03 11:27:05 UTC (rev 9093)
@@ -7,7 +7,6 @@
                <li class="drag_group list_item">
                        <h3><span class="group_order_nr"><xsl:number/></span>. 
<xsl:value-of select="control_group/group_name"/></h3>
        
-                       <form 
action="index.php?menuaction=controller.uicontrol_item.save_item_order" 
class="frm_save_order">
                                <xsl:variable 
name="control_group_id"><xsl:value-of select="control_group/id"/></xsl:variable>
                                <input type="hidden" name="control_group_id" 
value="{$control_group_id}" />
                
@@ -32,7 +31,6 @@
                                                </li>
                                        </xsl:for-each>
                                </ul>
-                       </form>
                </li>
        </xsl:for-each>
 </ul>

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
   2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_details.xsl
   2012-04-03 11:27:05 UTC (rev 9093)
@@ -3,14 +3,10 @@
 
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
        
-
-       <fieldset>
-               <dl class="proplist-col">
-               <dt>
+       <fieldset id="control_details">
+               <div>
                        <label>Kontrollområde</label>
-               </dt>
-               <dd>
-               <xsl:choose>
+                       <xsl:choose>
                        <xsl:when test="editable">
                                <select id="control_area_id" 
name="control_area_id">
                                        <xsl:apply-templates 
select="control_areas_array2/options"/>
@@ -20,17 +16,13 @@
                                <xsl:value-of 
select="control/control_area_name" />
                        </xsl:otherwise>
                </xsl:choose>
-               </dd>
-               <dt>
+               </div>
+               <div>
                        <label>Prosedyre</label>
-               </dt>
-               <dd>
-                       <xsl:value-of select="control/procedure_name" />        
-               </dd>
-               <dt>
+                       <xsl:value-of select="control/procedure_name" />
+               </div>
+               <div>
                        <label for="title">Tittel</label>
-               </dt>
-               <dd>
                        <xsl:choose>
                                <xsl:when test="editable">
                                        <input type="text" name="title" 
id="title" value="{control/title}" size="80"/>
@@ -39,11 +31,9 @@
                                        <xsl:value-of select="control/title" />
                                </xsl:otherwise>
                        </xsl:choose>
-               </dd>
-               <dt>
+               </div>
+               <div>
                        <label for="start_date">Startdato</label>
-               </dt>
-               <dd>
                        <xsl:choose>
                      <xsl:when test="not(control/start_date = '0') or 
not(control/start_date = '')">
                        <xsl:value-of select="php:function('date', 
$date_format, number(control/start_date))"/>
@@ -52,12 +42,10 @@
                        Dato ikke angitt
                      </xsl:otherwise>
              </xsl:choose>
-               </dd>
-               <dt>
+               </div>
+               <div>
                        <label for="end_date">Sluttdato</label>
-               </dt>
-               <dd>
-             <xsl:choose>
+                       <xsl:choose>
                      <xsl:when test="not(control/end_date = '0') or 
not(control/end_date = '')">
                        Løpende
                      </xsl:when>
@@ -65,65 +53,55 @@
                        <xsl:value-of select="php:function('date', 
$date_format, number(control/end_date))"/>
                      </xsl:otherwise>
              </xsl:choose>
-               </dd>
-               <dt>
+               </div>
+               <div>
                        <label>Frekvenstype</label>
-               </dt>
-               <dd>
-               
                        <xsl:choose>
                      <xsl:when test="control/repeat_type = 0">Dag</xsl:when>
                      <xsl:when test="control/repeat_type = 1">Uke</xsl:when>
                      <xsl:when test="control/repeat_type = 2">Måned</xsl:when>
                      <xsl:when test="control/repeat_type = 3">År</xsl:when>
              </xsl:choose>
-               </dd>
-               <dt>
+               </div>
+               <div>
                        <label>Frekvens</label>
-               </dt>
-               <dd>
-               <xsl:choose>
-                       <xsl:when test="editable">
-                               <input size="2" type="text" 
name="repeat_interval" value="{control/repeat_interval}" />
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="control/repeat_interval" 
/>
-                       </xsl:otherwise>
-               </xsl:choose>
-               </dd>
-               <dt>
+                       <xsl:choose>
+                               <xsl:when test="editable">
+                                       <input size="2" type="text" 
name="repeat_interval" value="{control/repeat_interval}" />
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of 
select="control/repeat_interval" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
+               <div>
                        <label>Rolle</label>
-               </dt>
-               <dd>
-               <xsl:choose>
-                       <xsl:when test="editable">
-                               <select id="responsibility_id" 
name="responsibility_id">
-                                       <xsl:for-each select="role_array">
-                                               <option value="{id}">
-                                                       <xsl:value-of 
disable-output-escaping="yes" select="name"/>
-                                               </option>
-                                       </xsl:for-each>
-                               </select>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="control/role_name" />
-                       </xsl:otherwise>
-               </xsl:choose>
-               </dd>
-               <dt>
+                       <xsl:choose>
+                               <xsl:when test="editable">
+                                       <select id="responsibility_id" 
name="responsibility_id">
+                                               <xsl:for-each 
select="role_array">
+                                                       <option value="{id}">
+                                                               <xsl:value-of 
disable-output-escaping="yes" select="name"/>
+                                                       </option>
+                                               </xsl:for-each>
+                                       </select>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of 
select="control/role_name" />
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
+               <div>
                        <label for="description">Beskrivelse</label>
-               </dt>
-               <dd>
-               <xsl:choose>
-                       <xsl:when test="editable">
-                               <textarea cols="70" rows="5" name="description" 
id="description"><xsl:value-of select="control/description" /></textarea>
-                       </xsl:when>
-                       <xsl:otherwise>
-                               <xsl:value-of select="control/description" 
disable-output-escaping="yes"/>
-                       </xsl:otherwise>
-               </xsl:choose>
-               </dd>
-       </dl>
+                       <xsl:choose>
+                               <xsl:when test="editable">
+                                       <textarea cols="70" rows="5" 
name="description" id="description"><xsl:value-of select="control/description" 
/></textarea>
+                               </xsl:when>
+                               <xsl:otherwise>
+                                       <xsl:value-of 
select="control/description" disable-output-escaping="yes"/>
+                               </xsl:otherwise>
+                       </xsl:choose>
+               </div>
        </fieldset>
        
 </xsl:template>

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_items.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_items.xsl
     2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/view_control_items.xsl
     2012-04-03 11:27:05 UTC (rev 9093)
@@ -7,7 +7,6 @@
                <li>
                        <h3><xsl:value-of 
select="control_group/group_name"/></h3>
        
-                       <form 
action="index.php?menuaction=controller.uicontrol_item.save_item_order" 
class="frm_save_order">
                                <xsl:variable 
name="control_group_id"><xsl:value-of select="control_group/id"/></xsl:variable>
                                <input type="hidden" name="control_group_id" 
value="{$control_group_id}" />
                
@@ -32,7 +31,6 @@
                                                </li>
                                        </xsl:for-each>
                                </ul>
-                       </form>
                </li>
        </xsl:for-each>
 </ul>

Modified: 
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
        2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/check_list/view_open_cases.xsl
        2012-04-03 11:27:05 UTC (rev 9093)
@@ -28,25 +28,6 @@
                                                                                
                <xsl:when test="status = 1">Utført</xsl:when>
                                                                                
                <xsl:when test="status = 2">Venter på tilbakemelding</xsl:when>
                                                                                
        </xsl:choose>
-                                                                               
        
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="location_item_id > 0">
-                                                                               
                        <div style="float:right;">
-                                                                               
                                <a target="_blank">
-                                                                               
                                        <xsl:attribute name="href">
-                                                                               
                                                
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
-                                                                               
                                                <xsl:text>&amp;id=</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="location_item_id"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                        Vis melding
-                                                                               
                                </a>
-                                                                               
                        </div>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <div style="float:right;"><span style="color:red">Ingen 
melding registrert</span></div>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
-                                                                               
        
                                                                                
        <div class="quick_menu">
                                                                                
                <a class="quick_edit">
                                                                                
                        <xsl:attribute name="href">
@@ -85,6 +66,21 @@
                                                                                
                                </a>
                                                                                
                        </xsl:when>
                                                                                
                </xsl:choose>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="location_item_id > 0">
+                                                                               
                                <a target="_blank">
+                                                                               
                                                <xsl:attribute name="href">
+                                                                               
                                                        
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+                                                                               
                                                        
<xsl:text>&amp;id=</xsl:text>
+                                                                               
                                                        <xsl:value-of 
select="location_item_id"/>
+                                                                               
                                                </xsl:attribute>
+                                                                               
                                                Vis melding
+                                                                               
                                        </a>
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                <span class="message">Ingen melding</span>
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>
                                                                                
        </div>
                                                                                
        <div style="display:none;" class="case_info">
                                                                                
                <div class="case_id"><xsl:value-of select="id"/></div>
@@ -121,23 +117,6 @@
                                                                        
<xsl:for-each select="cases_array">
                                                                                
<xsl:variable name="cases_id"><xsl:value-of select="id"/></xsl:variable>
                                                                                
<li><span class="order_nr"><xsl:number /></span>. <span 
class="case_descr"><xsl:value-of select="descr"/></span>
-                                                                               
        <xsl:choose>
-                                                                               
                <xsl:when test="location_item_id > 0">
-                                                                               
                        <div style="float:right;">
-                                                                               
                                <a target="_blank">
-                                                                               
                                        <xsl:attribute name="href">
-                                                                               
                                                
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
-                                                                               
                                                <xsl:text>&amp;id=</xsl:text>
-                                                                               
                                                <xsl:value-of 
select="location_item_id"/>
-                                                                               
                                        </xsl:attribute>
-                                                                               
                                        Vis melding
-                                                                               
                                </a>
-                                                                               
                        </div>
-                                                                               
                </xsl:when>
-                                                                               
                <xsl:otherwise>
-                                                                               
                        <div style="float:right;"><span style="color:red">Ingen 
melding registrert</span></div>
-                                                                               
                </xsl:otherwise>
-                                                                               
        </xsl:choose>
                                                                                
        <div class="quick_menu">
                                                                                
                <a class="quick_edit">
                                                                                
                        <xsl:attribute name="href">
@@ -176,6 +155,21 @@
                                                                                
                                </a>
                                                                                
                        </xsl:when>
                                                                                
                </xsl:choose>
+                                                                               
                <xsl:choose>
+                                                                               
                        <xsl:when test="location_item_id > 0">
+                                                                               
                                <a target="_blank">
+                                                                               
                                                <xsl:attribute name="href">
+                                                                               
                                                        
<xsl:text>index.php?menuaction=property.uitts.view</xsl:text>
+                                                                               
                                                        
<xsl:text>&amp;id=</xsl:text>
+                                                                               
                                                        <xsl:value-of 
select="location_item_id"/>
+                                                                               
                                                </xsl:attribute>
+                                                                               
                                                Vis melding
+                                                                               
                                        </a>
+                                                                               
                        </xsl:when>
+                                                                               
                        <xsl:otherwise>
+                                                                               
                                <span class="message">Ingen melding</span>
+                                                                               
                        </xsl:otherwise>
+                                                                               
                </xsl:choose>
                                                                                
        </div>
                                                                                
        <div style="display:none;" class="case_info">
                                                                                
                <div class="case_id"><xsl:value-of select="id"/></div>

Modified: 
branches/Version-1_0-branch/controller/templates/base/control_item/sort_check_list.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/control_item/sort_check_list.xsl
      2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/control_item/sort_check_list.xsl
      2012-04-03 11:27:05 UTC (rev 9093)
@@ -6,9 +6,8 @@
 <div class="yui-content tab_content">
                
          <!-- ===========================  SHOWS CONTROL ITEMS RECEIPT   
=============================== -->
-               <input type="hidden" id="control_id" name="control_id" 
value="{$control_id}" />
-               
-               <form action="#" id="frmSaveOrder"> 
+               <form action="#" id="frmSaveOrder">
+                       <input type="hidden" id="control_id" name="control_id" 
value="{$control_id}" /> 
                        <ul class="groups">
                                <xsl:for-each 
select="saved_groups_with_items_array">
                                <xsl:choose>

Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-04-03 11:27:05 UTC (rev 9093)
@@ -16,9 +16,7 @@
 }
 form#invoice_run td { 
        border: 1px solid #CDCDCD;
-       }
-
-
+}
 div#invoice_details dt{
        float:left;
         font-weight: bolder;
@@ -27,16 +25,13 @@
 div.content {
        margin: 2em;    
 }
-
 .hd {
        margin-bottom: 0;
        text-align: center;
-       }
-       
+}      
 .hd img {
        vertical-align: middle;
-       }
-
+}
 fieldset {
        margin-top: 0.5em;      
 }
@@ -207,7 +202,7 @@
 
 table.datatableToolbar {
        padding: .3em;
-       }
+}
 
 
 #controller_user_error {
@@ -406,8 +401,6 @@
 label {
        line-height:1.5em;
 }
-
-
        
 fieldset {
        border-bottom:0px solid #ccc;
@@ -417,7 +410,9 @@
 h1 em {
        font-style:italic;
 }
-
+a{
+       color: #0066CC;
+}
 div.info, div.error, div.warning {
        font-weight: normal;
        margin:20px;
@@ -472,74 +467,60 @@
 }
 
 
-/* =======================================  ITEM LIST  
========================================= */
-/*
-ul.itemlist {
-    position: relative;
+.yui-content input[type="submit"] {
+    margin: 15px 0 0;
+    padding: 1px 15px;
 }
-ul.itemlist li {
-    padding: 3px 0;
-}
+h1 img{
+       margin-right:5px;
+ }
 
-ul.itemlist li.odd{
-    background: none repeat scroll 0 0 #DBE7F5;
+.yui-content h2{
+    margin:0 0 10px;
 }
 
-ul.itemlist h3 {
-    font-size: 18px;
-    margin: 0 0 5px;
+/* =======================================  CONTROL TAB VIEW  
========================================= */
+#control_tabview .yui-navset, #control_location_tabview .yui-navset{
+       margin:0;
 }
 
-ul.groups {
-    position: relative;
+#control_tabview .identifier-header, #control_location_tabview 
.identifier-header {
+       padding-left:0;
 }
-ul.groups li {
-    padding: 3px 0;
-}
 
-ul.groups li.odd{
-    background: none repeat scroll 0 0 #DBE7F5;
+#control_tabview .yui-content{
+       padding:20px;
 }
 
-ul.groups h3 {
-    font-size: 18px;
-    margin: 0 0 5px;
-}
 
-.drag_group {
-       width: 650px;
-}
-*/
-
 /* =======================================  ITEM LIST  
========================================= */
 ul.groups {
     padding: 0;
        margin:0;
     position: relative;
 }
-ul.groups li {
-    padding: 3px 0;
-}
 ul.groups li.odd{
     background: none repeat scroll 0 0 #DBE7F5;
 }
 ul.groups h3 {
     font-size: 18px;
-    margin: 0 0 5px;
+    margin: 0;
 }
-
-ul.groups a{
-       text-decoration:none;
-       color:#000;
+ul.groups a {
+    color: #000000;
+    display: block;
+    padding: 3px 0;
+    text-decoration: none;
 }
 ul.groups a:visited{
        color:#000;
 }
-
+.drag_group{
+  margin-bottom: 10px;
+}
 .drag_group a:hover{
   cursor: move;
 }
-
 .drag_elem{
   z-index: 100;
   position:absolute;
@@ -549,14 +530,12 @@
   padding-left:0;
   background: #dedede;
 }
-
 ul.items {
     list-style: none outside none;
     margin: 0 20px;
     padding: 0;
     position: relative;
 }
-
 ul.items li.list_item{
   position:relative;
   z-index: 1;
@@ -594,30 +573,6 @@
     vertical-align: middle;
 }
 
-.yui-content input[type="submit"] {
-    margin: 15px 0 0;
-    padding: 1px 15px;
-}
-h1 img{
-       margin-right:5px;
- }
- 
-#control_tabview .yui-navset, #control_location_tabview .yui-navset{
-       margin:0;
-}
-
-#control_tabview .identifier-header, #control_location_tabview 
.identifier-header {
-       padding-left:0;
-}
-
-#control_tabview .yui-content{
-       padding:20px;
-}
-
-.yui-content h2{
-    margin:0 0 10px;
-}
-
 #frm_control_items{
        clear:left;
        margin-top:10px;        
@@ -628,31 +583,6 @@
     padding-left: 0;
 }
 
-.drag_elem{
-  z-index: 100;
-  position:absolute;
-  opacity: .50;
-  filter: alpha(opacity=50);
-}
-
-#list{
-  width: 650px;
-  position:relative;
-}
-
-.list_item{
-  position:relative;
-  z-index: 1;
-  opacity: 1;
-  filter: alpha(opacity=100);
-  top: 0px;
-  left: 0px;
-}
-
-.list_item:hover, .drag_group:hover{
-  cursor: move;
-}
-
 .frm_save_order input[type='submit']{
        margin: 10px 0 15px 0;
     width: 120px;
@@ -732,6 +662,8 @@
     width: 100px;
 }
 
+/* =======================================  MAIN CONTENT  
========================================= */
+
 #main_content {
     padding: 20px;
     width: 1150px;
@@ -749,13 +681,6 @@
        margin-top:0;
 }
 
-.check_list li div {
-    float: left;
-    margin: 5px;
-    padding: 2px;
-    text-align: center;
-    width: 190px;
-}
 #main_content fieldset.check_list_details {
     background: none repeat scroll 0 0 #EDF5FF;
     border: 1px solid #A3A3A3;
@@ -767,6 +692,16 @@
     padding: 15px;
 }
 
+/* =======================================  CHECK LIST  
========================================= */
+
+.check_list li div {
+    float: left;
+    margin: 5px;
+    padding: 2px;
+    text-align: center;
+    width: 190px;
+}
+
 .check_list li.heading {
     background: 
url("../../../../phpgwapi/js/yahoo/assets/skins/sam/sprite.png") repeat-x 
scroll 0 0 #D8D8D8;
     height: 20px;
@@ -793,6 +728,9 @@
 .check_list li{
        overflow:hidden;
 }
+
+/* =======================================  CHECK LIST DETAILS 
========================================= */
+
 fieldset.check_list_details{
        clear: both;
 }
@@ -804,7 +742,6 @@
        clear:left;
        margin:5px 0;
 }
-
 fieldset.tab_check_list_details label {
     display: inline-block;
     font-weight: bold;
@@ -813,8 +750,6 @@
 fieldset.tab_check_list_details {
     padding: 0 0 10px 0;
 }
-
-
 fieldset.check_list_details textarea{
        width:400px;
        height:100px;
@@ -834,6 +769,9 @@
     font-weight: bold;
     width: 150px;
 }
+
+/* =======================================  CHECK ITEM  
========================================= */
+
 .check_item{
     margin: 25px 0;
 }
@@ -850,7 +788,8 @@
 }
 .check_item label{
        width:150px;    
-}
+}
+
 .new_item a#innertoolbar-button{
        background: grey;
        font-weight: bold;
@@ -979,6 +918,24 @@
     padding: 40px 20px;        
 }
 
+/* ======================  CALENDAR  DATES ========================== */
+
+#calendar_dates{
+       margin:25px 0;  
+}
+#calendar_dates p{
+       font-weight: bold;
+       margin: 5px 0;  
+}
+#calendar_dates span {
+    border: 2px solid black;
+    margin-right: 10px;
+    padding: 1px 4px;
+    cursor: pointer;
+}
+
+/* ======================  CALENDAR INFO BOX ========================== */
+
 #info_box {
     background: none repeat scroll 0 0 #EDF5FF;
     border: 1px solid #243356;
@@ -1021,6 +978,7 @@
     font-weight: bold;
     padding: 0 0 5px;
 }
+
 .yui-pg-first{
        margin-left: 14px;
     margin-top: 5px;   
@@ -1054,19 +1012,7 @@
        display:inline-table;
        width:120px;
 }
-#calendar_dates{
-       margin:25px 0;  
-}
-#calendar_dates p{
-       font-weight: bold;
-       margin: 5px 0;  
-}
-#calendar_dates span {
-    border: 2px solid black;
-    margin-right: 10px;
-    padding: 1px 4px;
-    cursor: pointer;
-}
+
 textarea{
        padding: 4px;   
 }
@@ -1226,6 +1172,9 @@
        position:absolute;
     z-index: 1;
 }
+
+/* ======================  CASE DETAILS ========================== */
+
 #main_content #case_details {
     background: none repeat scroll 0 0 #EDF5FF;
     border: 1px solid #DDDDDD;
@@ -1250,7 +1199,7 @@
 #case_details h3.last {
     margin-bottom:0;
 }
-.btn{
+.btn, .btn_m, .btn_sm{
        background: none repeat scroll 0 0 #2647A0;
     color: #FFFFFF;
     display: inline-block;
@@ -1260,8 +1209,20 @@
     border: 1px solid #173073;
     cursor: pointer;
 }
-
-.btn.focus{
+.btn_m{
+    padding: 2px 10px;
+    font-size: 12px;
+}
+.btn_sm{
+    font-size: 11px;
+    padding: 1px 4px;
+}
+.btn.cancel{
+       background: none repeat scroll 0 0 #DDDDDD;
+    border: 1px solid #AAAAAA;
+    color: #333333;
+}
+.btn.focus, .btn_m.focus{
        background: none repeat scroll 0 0 #DD624B;
     border-bottom: 1px solid #CB563F;
     border-top: 1px solid #EE836F;
@@ -1350,14 +1311,24 @@
     margin-bottom: 20px;
 }
 li.check_item_case ul li {
+    background: none repeat scroll 0 0 #E7EFF8;
     border: 1px solid #DDDDDD;
-    margin: 5px 0 0;
+    margin: 10px 0 0;
     padding: 5px;
 }
+li.check_item_case ul li.quick_edit {
+    padding: 0;
+}
 
+li.check_item_case .quick_edit h4 {
+    background: none repeat scroll 0 0 #CCCCCC;
+    color: #000000;
+    margin: 0;
+    padding: 2px 10px;
+}
+
 #main_content .quick_edit fieldset {
-       padding: 10px;
-       border: 1px solid #DDDDDD;
+    padding: 5px;
 }
 .frm_update_case label {
        display: block; 
@@ -1369,8 +1340,9 @@
 .quick_edit hr {
        color:#fafafa;
 }
-.frm_update_case input[type=submit]{
-       float:right;    
+.frm_update_case input[type="submit"], .frm_update_case input[type="button"] {
+    float: left;
+    margin-top: 10px;
 }
 a.view_check_list{
        color: #FFFFFF;
@@ -1395,12 +1367,16 @@
 .quick_menu {
     font-size: 12px;
     margin-left: 10px;
-    padding: 2px;
-    text-decoration: underline;
+    padding: 10px 2px 0;
 }
 .quick_menu a{
-       margin: 0 5px;  
+       margin: 0 5px;
+       text-decoration: underline;     
 }
+.quick_menu .message {
+    color: #333333;
+    margin-left: 30px;
+}
 ul#groups {
     margin-left: 10px;
     margin-top: 5px;
@@ -1451,4 +1427,12 @@
     background: none repeat scroll 0 0 #DDDDDD;
     padding: 3px 6px;
     display: none;
+}
+
+/* ======================== CONTROL DETAILS ============================== */
+
+#control_details label {
+    display: inline-block;
+    font-weight: bold;
+    width: 100px;
 }
\ No newline at end of file

Modified: 
branches/Version-1_0-branch/controller/templates/base/procedure/view_procedures_for_control.xsl
===================================================================
--- 
branches/Version-1_0-branch/controller/templates/base/procedure/view_procedures_for_control.xsl
     2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/controller/templates/base/procedure/view_procedures_for_control.xsl
     2012-04-03 11:27:05 UTC (rev 9093)
@@ -1,10 +1,10 @@
 <!-- $Id: procedure_item.xsl 8485 2012-01-05 08:21:03Z erikhl $ -->
 
 <xsl:template match="data">
-       <h3 style="margin:5px 0;">Prosedyre for kontroll</h3>
+       <h3 style="margin:5px 0;">Prosedyre for <xsl:value-of 
select="control_procedure/title"/></h3>
        
-       <div><span>Tittel: </span><xsl:value-of 
select="control_procedure/title"/>
-               <a style="margin-left:5px;" id="print_control_items" 
target="_blank">
+       <div>
+               <a class="btn_m" id="print_control_items" target="_blank">
                        <xsl:attribute name="href">
                                
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
                                <xsl:text>&amp;procedure_id=</xsl:text>
@@ -15,7 +15,7 @@
                                <xsl:value-of select="location/location_code"/>
                                
<xsl:text>&amp;phpgw_return_as=stripped_html</xsl:text>
                        </xsl:attribute>
-                       Skriv ut
+                       Skriv ut prosedyre
                </a>
        </div>
        <xsl:if test="control_procedure/documents/child::node()">
@@ -37,7 +37,7 @@
                                <h4 style="margin:2px 0;"><xsl:value-of 
select="procedure/title"/></h4>
                                <div style="margin-bottom:10px;">
                                        <span>Gruppe: </span><xsl:value-of 
select="control_group/group_name"/>
-                                       <a style="margin-left:5px;" 
id="print_control_items" target="_blank">
+                                       <a class="btn_sm" 
style="margin-left:5px;" id="print_control_items" target="_blank">
                                                <xsl:attribute name="href">
                                                        
<xsl:text>index.php?menuaction=controller.uiprocedure.print_procedure</xsl:text>
                                                        
<xsl:text>&amp;procedure_id=</xsl:text>

Copied: branches/Version-1_0-branch/messenger/inc/class.hook_helper.inc.php 
(from rev 9092, trunk/messenger/inc/class.hook_helper.inc.php)
===================================================================
--- branches/Version-1_0-branch/messenger/inc/class.hook_helper.inc.php         
                (rev 0)
+++ branches/Version-1_0-branch/messenger/inc/class.hook_helper.inc.php 
2012-04-03 11:27:05 UTC (rev 9093)
@@ -0,0 +1,50 @@
+<?php
+       /**
+        * messenger - Hook helper
+        *
+        * @author Dave Hall <address@hidden>
+        * @author Sigurd Nes <address@hidden>
+        * @copyright Copyright (C) 2007,2008 Free Software Foundation, Inc. 
http://www.fsf.org/
+        * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+        * @package messenger
+        * @version $Id: class.hook_helper.inc.php 8281 2011-12-13 09:24:03Z 
sigurdne $
+        */
+
+       /*
+          This program 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.
+
+          This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
+        */
+
+
+       /**
+        * Hook helper
+        *
+        * @package messenger
+        */
+       class messenger_hook_helper
+       {
+               /**
+                * Add welkome message to new users
+                *
+                * @return void
+                */
+               public function add_welkome_message($data)
+               {
+                       $message['to']      = $data['account_lid'];
+                       $message['subject'] = lang('Welcome');
+                       $message['content'] = $data['message'];
+
+                       $so = createobject('messenger.somessenger');
+                       $so->send_message($message,True);
+               }
+       }

Deleted: branches/Version-1_0-branch/messenger/inc/hook_registration.inc.php
===================================================================
--- branches/Version-1_0-branch/messenger/inc/hook_registration.inc.php 
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/messenger/inc/hook_registration.inc.php 
2012-04-03 11:27:05 UTC (rev 9093)
@@ -1,15 +0,0 @@
-<?php
-       // Note: This is temp sample data, I will make a config option for it 
soon.
-
-       global $reg_info;
-
-       $message['to']      = $reg_info['lid'];
-       $message['subject'] = 'Welcome!';
-       $message['content'] = '
-
-Thanks for signing up for your new account, blah blah blah blah
-
-';
-
-       $so = createobject('messenger.somessenger');
-       $so->send_message($message,True);

Modified: branches/Version-1_0-branch/messenger/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/messenger/setup/setup.inc.php   2012-04-03 
11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/messenger/setup/setup.inc.php   2012-04-03 
11:27:05 UTC (rev 9093)
@@ -34,7 +34,8 @@
                'home',
                'after_navbar',
                'config',
-               'menu'  => 'messenger.menu.get_menu'
+               'menu'  => 'messenger.menu.get_menu',
+               'registration'  => 'messenger.hook_helper.add_welkome_message'
        );
 
        /* Dependencies for this app to work */

Modified: branches/Version-1_0-branch/property/inc/class.botts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.botts.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/inc/class.botts.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -52,6 +52,8 @@
                public $total_records   = 0;
                public $sum_budget              = 0;
                public $sum_actual_cost = 0;
+               public $show_finnish_date = false;
+               public $simple = false;
 
                var $public_functions = array
                (
@@ -63,6 +65,7 @@
 
                function property_botts($session=false)
                {
+                       $this->account                          = 
$GLOBALS['phpgw_info']['user']['account_id'];
                        $this->so                                       = 
CreateObject('property.sotts');
                        $this->custom                           = & 
$this->so->custom;
                        $this->bocommon                         = 
CreateObject('property.bocommon');
@@ -75,6 +78,29 @@
 
                        $this->config->read();
 
+
+                       $user_groups =  
$GLOBALS['phpgw']->accounts->membership($this->account);
+                       $simple_group = 
isset($this->config->config_data['fmttssimple_group']) ? 
$this->config->config_data['fmttssimple_group'] : array();
+                       foreach ( $user_groups as $group => $dummy)
+                       {
+                               if ( in_array($group, $simple_group))
+                               {
+                                       $this->simple = true;
+                                       break;
+                               }
+                       }
+
+                       reset($user_groups);
+                       $group_finnish_date = 
isset($this->config->config_data['fmtts_group_finnish_date']) ? 
$this->config->config_data['fmtts_group_finnish_date'] : array();
+                       foreach ( $user_groups as $group => $dummy)
+                       {
+                               if ( in_array($group, $group_finnish_date))
+                               {
+                                       $this->show_finnish_date = true;
+                                       break;
+                               }
+                       }
+
                        if ($session)
                        {
                                $this->read_sessiondata();
@@ -163,8 +189,37 @@
                        $filter = array('list' => ''); // translates to "list 
IS NULL"
                        $columns = array();
 
+
                        $columns[] = array
                                (
+                                       'id'            => 'modified_date',
+                                       'name'          => lang('modified 
date'),
+//                                     'sortable'      => true
+                               );
+
+                       $columns[] = array
+                               (
+                                       'id' => 'status',
+                                       'name'=> lang('status')
+                               );
+                       $columns[] = array
+                               (
+                                       'id' => 'address',
+                                       'name'=> lang('address')
+                               );
+                       $columns[] = array
+                               (
+                                       'id' => 'user',
+                                       'name'=> lang('user')
+                               );
+                       $columns[] = array
+                               (
+                                       'id' => 'assignedto',
+                                       'name'=> lang('assignedto')
+                               );
+
+                       $columns[] = array
+                               (
                                        'id' => 'vendor',
                                        'name'=> lang('vendor')
                                );
@@ -178,6 +233,32 @@
                                        'id' => 'district',
                                        'name'=> lang('district')
                                );
+
+                       $this->get_origin_entity_type();
+
+                       foreach($this->uicols_related as $related)
+                       {
+                               $columns[] = array
+                               (
+                                               'id' => $related,
+                                               'name'=> 
ltrim(lang(str_replace('_', ' ', $related)),'!')
+                               );
+                       }
+
+                       if( $this->show_finnish_date )
+                       {
+                               $columns[] = array
+                                       (
+                                               'id' => 'finnish_date',
+                                               'name'=> lang('finnish_date')
+                                       );
+                               $columns[] = array
+                                       (
+                                               'id' => 'delay',
+                                               'name'=> lang('delay')
+                                       );
+                       }
+
                        
$column_list=$this->bocommon->select_multi_list($selected,$columns);
                        return $column_list;
                }
@@ -399,7 +480,7 @@
                                }
 
                                $ticket['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($ticket['entry_date'],$this->dateformat);
-
+                               $ticket['modified_date'] = 
$GLOBALS['phpgw']->common->show_date($ticket['modified_date'],$this->dateformat);
                                if($ticket['finnish_date2'])
                                {
                                        $ticket['delay'] = 
round(($ticket['finnish_date2']-$ticket['finnish_date'])/(24*3600));

Modified: branches/Version-1_0-branch/property/inc/class.sotts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.sotts.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/inc/class.sotts.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -436,7 +436,7 @@
 
                        $return_fields = 
"fm_tts_tickets.id,fm_tts_tickets.assignedto,fm_tts_tickets.status,fm_tts_tickets.user_id,"
                        . 
"fm_tts_tickets.subject,fm_tts_tickets.address,fm_tts_tickets.location_code,fm_tts_tickets.priority,fm_tts_tickets.cat_id,fm_tts_tickets.group_id,"
-                       . 
"fm_tts_tickets.entry_date,fm_tts_tickets.finnish_date,fm_tts_tickets.finnish_date2,fm_tts_tickets.order_id,fm_tts_tickets.vendor_id,fm_tts_tickets.actual_cost,"
+                       . 
"fm_tts_tickets.entry_date,fm_tts_tickets.modified_date,fm_tts_tickets.finnish_date,fm_tts_tickets.finnish_date2,fm_tts_tickets.order_id,fm_tts_tickets.vendor_id,fm_tts_tickets.actual_cost,"
                        . 
"fm_tts_tickets.budget,fm_tts_tickets.billable_hours,fm_district.descr as 
district,fm_tts_views.id as view,fm_location1.loc1_name {$result_order_field}";
 
                        //fm_tts_tickets.* ,fm_location1.loc1_name, 
fm_tts_views.id as view {$result_order_field},fm_district.descr as district
@@ -525,6 +525,7 @@
                                                        'cat_id'                
        => $this->db->f('cat_id'),
                                                        'group_id'              
        => $this->db->f('group_id'),
                                                        'entry_date'            
=> $this->db->f('entry_date'),
+                                                       'modified_date'         
=> $this->db->f('modified_date'),
                                                        'finnish_date'          
=> $this->db->f('finnish_date'),
                                                        'finnish_date2'         
=> $this->db->f('finnish_date2'),
                                                        'order_id'              
        => $this->db->f('order_id'),
@@ -609,6 +610,8 @@
                                $ticket['billable_hours']       = 
$this->db->f('billable_hours');
                                $ticket['branch_id']            = 
$this->db->f('branch_id');
                                $ticket['entry_date']           = 
$this->db->f('entry_date');
+                               $ticket['modified_date']        = 
$this->db->f('modified_date');
+
                                $user_id=(int)$this->db->f('user_id');
 
                                $ticket['user_name']    = 
$GLOBALS['phpgw']->accounts->get($user_id)->__toString();
@@ -731,6 +734,7 @@
                        $value_set['location_code']     = 
$ticket['location_code'];
                        $value_set['address']           = $address;
                        $value_set['entry_date']        = time();
+                       $value_set['modified_date']     = time();
                        $value_set['finnish_date']      = 
$ticket['finnish_date'];
                        $value_set['contact_id']        = $ticket['contact_id'];
                        $value_set['publish_note']      = 1;
@@ -872,13 +876,14 @@
                                }
                        }
 
-                       $this->db->transaction_commit();
-
                        if ($this->fields_updated)
                        {
+                               $this->db->query('UPDATE fm_tts_tickets SET 
modified_date= ' . time() . " WHERE id={$id}",__LINE__,__FILE__);
                                $receipt['message'][]= array('msg' => 
lang('Ticket %1 has been updated',$id));
                        }
 
+                       $this->db->transaction_commit();
+
                        return $receipt;
 
                }
@@ -901,15 +906,18 @@
                                
$this->historylog->add('P',$id,$ticket['priority'],$oldpriority);
                        }
 
-                       $this->db->transaction_commit();
-
                        if ($this->fields_updated)
                        {
+                               $this->db->query('UPDATE fm_tts_tickets SET 
modified_date= ' . time() . " WHERE id={$id}",__LINE__,__FILE__);
                                $receipt['message'][]= array('msg' => 
lang('Ticket %1 has been updated',$id));
                        }
+
+                       $this->db->transaction_commit();
+
                        return $receipt;
                }
 
+
                function update_ticket(&$ticket,$id = 0, $receipt = array(), 
$values_attribute = array())
                {
                        $this->fields_updated = array();
@@ -1301,6 +1309,7 @@
                                }
                        }
 
+                       $value_set['modified_date']     = time();
                        $value_set['vendor_id']         = $ticket['vendor_id'];
                        $value_set['b_account_id']      = 
$ticket['b_account_id'];
                        $value_set['order_descr']       = 
$this->db->db_addslashes($ticket['order_descr']);
@@ -1313,35 +1322,9 @@
 
                        $this->db->transaction_commit();
 
-                       if (isset($this->fields_updated))
+                       if (isset($this->fields_updated) && 
$this->fields_updated)
                        {
                                $receipt['message'][]= array('msg' => 
lang('Ticket has been updated'));
-
-/*
-                               $criteria = array
-                                       (
-                                               'appname'       => 'property',
-                                               'location'      => 
$this->acl_location,
-                                               'allrows'       => true
-                                       );
-
-                               $custom_functions = 
$GLOBALS['phpgw']->custom_functions->find($criteria);
-
-                               foreach ( $custom_functions as $entry )
-                               {
-                                       // prevent path traversal
-                                       if ( preg_match('/\.\./', 
$entry['file_name']) )
-                                       {
-                                               continue;
-                                       }
-
-                                       $file = PHPGW_SERVER_ROOT . 
"/property/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}/{$entry['file_name']}";
-                                       if ( $entry['active'] && is_file($file) 
)
-                                       {
-                                               require_once $file;
-                                       }
-                               }
-*/
                        }
                        return $receipt;
                }

Modified: branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/inc/class.soworkorder.inc.php  
2012-04-03 11:27:05 UTC (rev 9093)
@@ -769,7 +769,7 @@
                                                'billable_hours'                
=> $this->db->f('billable_hours'),
                                                'contract_sum'                  
=> $this->db->f('contract_sum'),
                                                'approved'                      
        => $this->db->f('approved'),
-                                               'mail_recipients'               
=> explode(',', $this->db->f('mail_recipients')),
+                                               'mail_recipients'               
=> explode(',', trim($this->db->f('mail_recipients'),',')),
                                        );
                        }
 

Modified: branches/Version-1_0-branch/property/inc/class.uitts.inc.php
===================================================================
--- branches/Version-1_0-branch/property/inc/class.uitts.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/inc/class.uitts.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -105,28 +105,9 @@
                        $this->end_date                         = 
$this->bo->end_date;
                        $this->location_code            = 
$this->bo->location_code;
                        $this->p_num                            = 
$this->bo->p_num;
-                       $user_groups =  
$GLOBALS['phpgw']->accounts->membership($this->account);
-                       $simple_group = 
isset($this->bo->config->config_data['fmttssimple_group']) ? 
$this->bo->config->config_data['fmttssimple_group'] : array();
-                       foreach ( $user_groups as $group => $dummy)
-                       {
-                               if ( in_array($group, $simple_group))
-                               {
-                                       $this->_simple = true;
-                                       break;
-                               }
-                       }
+                       $this->simple                           = 
$this->bo->simple;
+                       $this->show_finnish_date        = 
$this->bo->show_finnish_date;
 
-                       reset($user_groups);
-                       $group_finnish_date = 
isset($this->bo->config->config_data['fmtts_group_finnish_date']) ? 
$this->bo->config->config_data['fmtts_group_finnish_date'] : array();
-                       foreach ( $user_groups as $group => $dummy)
-                       {
-                               if ( in_array($group, $group_finnish_date))
-                               {
-                                       $this->_show_finnish_date = true;
-                                       break;
-                               }
-                       }
-
                        $this->_category_acl = 
isset($this->bo->config->config_data['acl_at_tts_category']) ? 
$this->bo->config->config_data['acl_at_tts_category'] : false;
                }
 
@@ -531,7 +512,7 @@
                                $default_value = array 
('id'=>'','name'=>lang('Open'));
                                array_unshift 
($values_combo_box[3],$default_value);
 
-                               if(!$this->_simple)
+                               if(!$this->simple)
                                {
                                        $values_combo_box[0] = 
$this->cats->formatted_xslt_list(array('format'=>'filter','selected' => 
$this->cat_id,'globals' => true,'use_acl' => $this->_category_acl));
                                        $default_value = array 
('cat_id'=>'','name'=> lang('no category'));
@@ -945,19 +926,18 @@
                                }
                        }
 
-//                     $uicols['name'][] = 'loc1_name';
-
-                       $uicols['name'][] = 'address';
-                       $uicols['descr'][]      = lang('address');
-//                     $uicols['name'][] = 'user';
-//                     $uicols['descr'][]      = lang('user');
-                       $uicols['name'][] = 'assignedto';
-                       $uicols['descr'][]      = lang('assignedto');
                        $uicols['name'][] = 'entry_date';
                        $uicols['descr'][]      = lang('entry date');
-                       $uicols['name'][] = 'status';
-                       $uicols['descr'][]      = lang('status');
 
+                       $custom_cols = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'] 
? $GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'] : 
array();
+
+                       foreach ($custom_cols as $col)
+                       {
+                               $uicols['name'][]               = $col;
+                               $uicols['descr'][]              = 
lang(str_replace('_', ' ', $col));
+                       }
+
+
                        if( $order_read )
                        {
                                $uicols['name'][] = 'order_id';
@@ -974,20 +954,15 @@
                                $uicols['descr'][]      = lang('actual cost');
                        }
 
-                       foreach($uicols_related as $related)
+/*
+                       if( $this->show_finnish_date )
                        {
-                               $uicols['name'][] = $related;                   
-                               $uicols['descr'][]      = lang(str_replace('_', 
' ', $related));
-                       }
-
-                       if( $this->_show_finnish_date )
-                       {
                                $uicols['name'][] = 'finnish_date';
                                $uicols['descr'][]      = lang('finnish date');
                                $uicols['name'][] = 'delay';
                                $uicols['descr'][]      = lang('delay');
                        }
-
+*/
                        $uicols['name'][] = 'child_date';
                        $uicols['descr'][]      = lang('child date');
                        $uicols['name'][] = 'link_view';
@@ -997,17 +972,6 @@
                        $uicols['name'][] = 'text_view';
                        $uicols['descr'][]      = lang('text view');
 
-                       $custom_cols = 
isset($GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'])
 && $GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'] 
? $GLOBALS['phpgw_info']['user']['preferences']['property']['ticket_columns'] : 
array();
-
-                       foreach ($custom_cols as $col)
-                       {
-       //                      $uicols['input_type'][] = 'text';
-                               $uicols['name'][]               = $col;
-                               $uicols['descr'][]              = 
lang(str_replace('_', ' ', $col));
-       //                      $uicols['statustext'][] = $col;
-                       }
-
-
                        $count_uicols_name = count($uicols['name']);
 
 
@@ -1257,7 +1221,9 @@
                                        
$datatable['headers']['header'][$i]['visible']                  = true;
                                        
$datatable['headers']['header'][$i]['sortable']                 = false;
 //                                     
$datatable['headers']['header'][$i]['width']                    = 
(int)$uicols['width'][$i];
-                                       if($uicols['name'][$i]=='priority' || 
$uicols['name'][$i]=='id' || $uicols['name'][$i]=='assignedto' || 
$uicols['name'][$i]=='finnish_date'|| $uicols['name'][$i]=='user'|| 
$uicols['name'][$i]=='entry_date' || $uicols['name'][$i]=='order_id')
+                                       if($uicols['name'][$i]=='priority' || 
$uicols['name'][$i]=='id' || $uicols['name'][$i]=='assignedto'
+                                        || 
$uicols['name'][$i]=='finnish_date'|| $uicols['name'][$i]=='user'|| 
$uicols['name'][$i]=='entry_date'
+                                        || $uicols['name'][$i]=='order_id'|| 
$uicols['name'][$i]=='modified_date')
                                        {
                                                
$datatable['headers']['header'][$i]['sortable']         = true;
                                                
$datatable['headers']['header'][$i]['sort_field']   = $uicols['name'][$i];
@@ -1412,7 +1378,7 @@
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('property') . ' - ' . $appname . ': ' . $function_msg;
 
-                       $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
$this->_simple ? 'tts.index.simple' : 'tts.index' , 'property' );
+                       $GLOBALS['phpgw']->js->validate_file( 'yahoo', 
$this->simple ? 'tts.index.simple' : 'tts.index' , 'property' );
                }
 
                function index2()
@@ -2033,7 +1999,7 @@
                        $msgbox_data = 
(isset($receipt)?$this->bocommon->msgbox_data($receipt):'');
 
 
-                       if(!$this->_simple && $this->_show_finnish_date)
+                       if(!$this->simple && $this->show_finnish_date)
                        {
                                $jscal = CreateObject('phpgwapi.jscalendar');
                                $jscal->add_listener('values_finnish_date');
@@ -2044,8 +2010,8 @@
                                        'custom_attributes'                     
        => array('attributes' => $values['attributes']),
                                        'lookup_functions'                      
        => isset($values['lookup_functions'])?$values['lookup_functions']:'',
                                        'contact_data'                          
        => $contact_data,
-                                       'simple'                                
                => $this->_simple,
-                                       'show_finnish_date'                     
        => $this->_show_finnish_date,
+                                       'simple'                                
                => $this->simple,
+                                       'show_finnish_date'                     
        => $this->show_finnish_date,
                                        'value_origin'                          
        => isset($values['origin']) ? $values['origin'] : '',
                                        'value_origin_type'                     
        => (isset($origin)?$origin:''),
                                        'value_origin_id'                       
        => (isset($origin_id)?$origin_id:''),
@@ -2672,7 +2638,7 @@
                                        'id'            => $id
                                );
 
-                       if(!$this->_simple && $this->_show_finnish_date)
+                       if(!$this->simple && $this->show_finnish_date)
                        {
                                $jscal = CreateObject('phpgwapi.jscalendar');
                                $jscal->add_listener('values_finnish_date');
@@ -3186,8 +3152,8 @@
 
                                        'contact_data'                          
        => $contact_data,
                                        'lookup_type'                           
        => $lookup_type,
-                                       'simple'                                
                => $this->_simple,
-                                       'show_finnish_date'                     
        => $this->_show_finnish_date,
+                                       'simple'                                
                => $this->simple,
+                                       'show_finnish_date'                     
        => $this->show_finnish_date,
                                        'tabs'                                  
                => self::_generate_tabs(true),
                                        'td_count'                              
                => '""',
                                        'base_java_url'                         
        => "{menuaction:'property.uitts.update_data',id:{$id}}",

Modified: branches/Version-1_0-branch/property/setup/phpgw_no.lang
===================================================================
--- branches/Version-1_0-branch/property/setup/phpgw_no.lang    2012-04-03 
11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/setup/phpgw_no.lang    2012-04-03 
11:27:05 UTC (rev 9093)
@@ -1917,6 +1917,7 @@
 serious symptoms       property        no      Kraftige Symptomer
 low probability        property        no      Liten sannsynlighet
 medium probability     property        no      Middels sannsynlighet
+modified date  property        no      Oppdatert dato
 high probability       property        no      Stor sannsynlighet
 weight property        no      Vekt
 risk   property        no      Risiko

Modified: branches/Version-1_0-branch/property/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/setup.inc.php    2012-04-03 
11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/setup/setup.inc.php    2012-04-03 
11:27:05 UTC (rev 9093)
@@ -12,7 +12,7 @@
        */
 
        $setup_info['property']['name']                 = 'property';
-       $setup_info['property']['version']              = '0.9.17.637';
+       $setup_info['property']['version']              = '0.9.17.638';
        $setup_info['property']['app_order']    = 8;
        $setup_info['property']['enable']               = 1;
        $setup_info['property']['app_group']    = 'office';

Modified: branches/Version-1_0-branch/property/setup/tables_current.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/setup/tables_current.inc.php   
2012-04-03 11:27:05 UTC (rev 9093)
@@ -929,7 +929,7 @@
                                'loc3' => array('type' => 'varchar','precision' 
=> '4','nullable' => True),
                                'loc4' => array('type' => 'varchar','precision' 
=> '4','nullable' => True),
                                'floor' => array('type' => 
'varchar','precision' => '6','nullable' => True),
-                               'address' => array('type' => 
'varchar','precision' => '150','nullable' => True),
+                               'address' => array('type' => 
'varchar','precision' => '255','nullable' => True),
                                'contact_phone' => array('type' => 
'varchar','precision' => '20','nullable' => True),
                                'contact_email' => array('type' => 
'varchar','precision' => '64','nullable' => True),
                                'tenant_id' => array('type' => 
'int','precision' => '4','nullable' => True),
@@ -948,7 +948,8 @@
                                'building_part'=> array('type' => 
'varchar','precision' => 4,'nullable' => True),
                                'order_dim1'=> array('type' => 
'int','precision' => 4,'nullable' => True),
                                'publish_note'=> array('type' => 
'int','precision' => 2,'nullable' => True),
-                               'branch_id' => array('type' => 
'int','precision' => '4','nullable' => True)
+                               'branch_id' => array('type' => 
'int','precision' => '4','nullable' => True),
+                               'modified_date' => array('type' => 
'int','precision' => '4','nullable' => True),
                        ),
                        'pk' => array('id'),
                        'ix' => array(),

Modified: branches/Version-1_0-branch/property/setup/tables_update.inc.php
===================================================================
--- branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/property/setup/tables_update.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -6022,11 +6022,9 @@
                }
        }
 
-
-
        /**
-       * Update property version from 0.9.17.635 to 0.9.17.636
-       * Add percent value to tax-code
+       * Update property version from 0.9.17.636 to 0.9.17.637
+       * Add approve tag and mail recipients to workorders
        * 
        */
        $test[] = '0.9.17.636';
@@ -6044,26 +6042,54 @@
                }
        }
 
-
-
        /**
-       * Update property version from 0.9.17.607 to 0.9.17.608
-       * Add more room for address at tickets
+       * Update property version from 0.9.17.637 to 0.9.17.638
+       * Modified timestamp til tickets
        * 
        */
-
-/*
-       $test[] = '0.9.17.607';
-       function property_upgrade0_9_17_608()
+       $test[] = '0.9.17.637';
+       function property_upgrade0_9_17_637()
        {
+               date_default_timezone_set('UTC');
                $GLOBALS['phpgw_setup']->oProc->m_odb->transaction_begin();
 
+               $GLOBALS['phpgw_setup']->oProc->query("DELETE FROM fm_cache");
+
+               
$GLOBALS['phpgw_setup']->oProc->AddColumn('fm_tts_tickets','modified_date',array('type'
 => 'int','precision' => 4, 'nullable' => True));
                
$GLOBALS['phpgw_setup']->oProc->AlterColumn('fm_tts_tickets','address',array('type'
 => 'varchar','precision' => '255','nullable' => True));
+               
+               $sql = 'SELECT id, entry_date FROM fm_tts_tickets';
+               $GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+
+               $tickets = array();
+               while ($GLOBALS['phpgw_setup']->oProc->next_record())
+               {
+                       $tickets[] = array
+                       (
+                               'id'                    => 
$GLOBALS['phpgw_setup']->oProc->f('id'),
+                               'entry_date'    => 
$GLOBALS['phpgw_setup']->oProc->f('entry_date')
+                       );
+               }
+
+               foreach ($tickets as $ticket)
+               {
+                       $sql = "SELECT history_timestamp FROM fm_tts_history 
WHERE history_record_id = {$ticket['id']} ORDER BY history_timestamp DESC";
+                       
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+                       if($GLOBALS['phpgw_setup']->oProc->next_record())
+                       {
+                               $modified_date = 
(int)strtotime($GLOBALS['phpgw_setup']->oProc->f('history_timestamp'));
+                       }
+                       else
+                       {
+                               $modified_date = (int)$ticket['entry_date'];
+                       }
+                       $sql = "UPDATE fm_tts_tickets SET modified_date = 
{$modified_date} WHERE id = {$ticket['id']}";
+                       
$GLOBALS['phpgw_setup']->oProc->query($sql,__LINE__,__FILE__);
+               }
+
                if($GLOBALS['phpgw_setup']->oProc->m_odb->transaction_commit())
                {
-                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.608';
+                       $GLOBALS['setup_info']['property']['currentver'] = 
'0.9.17.638';
                        return $GLOBALS['setup_info']['property']['currentver'];
                }
        }
-*/
-

Modified: branches/Version-1_0-branch/registration/inc/class.bopending.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.bopending.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.bopending.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -227,7 +227,20 @@
 
                        return $receipt;
                }
+
                /**
+                * Process a list of pending and approved users
+                *
+                * @param array   $values  the array users to process
+                *
+                * @return array receipt
+                */
+
+               function process_users($values)
+               {
+               }
+
+               /**
                 * Edit single user
                 *
                 * @param array   $values  the array of values to edit

Modified: branches/Version-1_0-branch/registration/inc/class.boreg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.boreg.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.boreg.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -236,7 +236,6 @@
 
                function step4()
                {
-//                     global $reg_id;
                        $reg_id = phpgw::get_var('reg_id');
                        $so = createobject('registration.soreg');
                        $ui = createobject('registration.uireg');

Modified: branches/Version-1_0-branch/registration/inc/class.sopending.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.sopending.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.sopending.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -163,9 +163,14 @@
 
                public function update_pending_user($values)
                {
+                       if(!isset($values['id']) || !$values['id'])
+                       {
+                               throw new 
Exception("registration_sopending::update_pending_user() - missing 'id' in 
valueset");
+                       }
+
                        $ret = false;
                        $this->db->transaction_begin();
-                       if (isset($values['location']) && $values['location'] 
&& $values['id'])
+                       if (isset($values['location']) && $values['location'])
                        {
                                $this->db->query("SELECT reg_info FROM 
phpgw_reg_accounts WHERE reg_id = '{$values['id']}'",__LINE__,__FILE__);
                                if ($this->db->next_record())
@@ -173,10 +178,14 @@
                                        $reg_info = 
unserialize(base64_decode($this->db->f('reg_info')));
                                        $reg_info['location_code'] = 
implode('-', $values['location']);
                                }
-                               $ret = $this->db->query("UPDATE 
phpgw_reg_accounts SET  reg_info='" . base64_encode(serialize($reg_info)) . "' 
WHERE reg_id='{$values['id']}'",__LINE__,__FILE__);
+                               $this->db->query("UPDATE phpgw_reg_accounts SET 
 reg_info='" . base64_encode(serialize($reg_info)) . "' WHERE 
reg_id='{$values['id']}'",__LINE__,__FILE__);
                        }
+
+                       $value_set['reg_approved']      = $values['approve'];
+                       $value_set                                      = 
$this->db->validate_update($value_set);
+                       $ret = $this->db->query("UPDATE phpgw_reg_accounts SET 
$value_set WHERE reg_id='{$values['id']}'",__LINE__,__FILE__);
+
                        $this->db->transaction_commit();
                        return $ret;
                }
-
        }

Modified: branches/Version-1_0-branch/registration/inc/class.soreg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.soreg.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.soreg.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -57,8 +57,6 @@
 
                function step2($fields)
                {
-                       $smtp = createobject('phpgwapi.send');
-
                        $this->reg_id = md5(time() . $account_lid . 
$GLOBALS['phpgw']->common->randomstring(32));
                        $account_lid  = 
$GLOBALS['phpgw']->session->appsession('loginid','registration');
 
@@ -66,6 +64,14 @@
                                . time() . "', reg_info='" . 
base64_encode(serialize($fields))
                                . "' WHERE 
reg_lid='$account_lid'",__LINE__,__FILE__);
 
+
+                       if ($this->config['activate_account'] == 
'pending_approval')
+                       {
+                               return $this->reg_id;
+                       }
+
+                       $smtp = createobject('phpgwapi.send');
+
                        $GLOBALS['phpgw']->template->set_file(array(
                                'message' => 'confirm_email.tpl'
                        ));
@@ -345,9 +351,12 @@
                        $GLOBALS['phpgw']->accounts->account = $account;
                        $GLOBALS['phpgw']->accounts->save_repository();
 
-                       if(@stat(PHPGW_SERVER_ROOT . 
'/messenger/inc/hook_registration.inc.php'))
+                       if(isset($this->config['messenger_welcome_message']) && 
$this->config['messenger_welcome_message'] && 
isset($GLOBALS['phpgw_info']['apps']['messenger']))
                        {
-                               include(PHPGW_SERVER_ROOT . 
'/messenger/inc/hook_registration.inc.php');
+                               if(@stat(PHPGW_SERVER_ROOT . 
'/messenger/inc/hook_registration.inc.php'))
+                               {
+                                       include(PHPGW_SERVER_ROOT . 
'/messenger/inc/hook_registration.inc.php');
+                               }
                        }
                }
        }

Modified: branches/Version-1_0-branch/registration/inc/class.uicommon.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.uicommon.inc.php 
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.uicommon.inc.php 
2012-04-03 11:27:05 UTC (rev 9093)
@@ -393,11 +393,11 @@
 
                public function add_yui_translation(&$data)
                {
-                       $this->add_template_file('yui_booking_i18n');
+                       $this->add_template_file('yui_phpgw_i18n');
                        $previous = lang('prev');
                        $next = lang('next');
                        
-                       $data['yui_booking_i18n'] = array(
+                       $data['yui_phpgw_i18n'] = array(
                                'Calendar' => array(
                                        'WEEKDAYS_SHORT' => 
json_encode(lang_array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa')),
                                        'WEEKDAYS_FULL' => 
json_encode(lang_array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 
'Friday', 'Saturday')),

Modified: branches/Version-1_0-branch/registration/inc/class.uipending.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.uipending.inc.php        
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.uipending.inc.php        
2012-04-03 11:27:05 UTC (rev 9093)
@@ -84,7 +84,11 @@
                                $values['pending_users'] = 
isset($values['pending_users']) && $values['pending_users'] ? 
array_unique($values['pending_users']) : array();
                                $values['pending_users_orig'] = 
isset($values['pending_users_orig']) && $values['pending_users_orig'] ? 
array_unique($values['pending_users_orig']) : array();
                                
-                               $receipt = $this->bo->approve_users($values);
+                               $this->bo->approve_users($values);
+                               if(isset($values['process_user']) && 
$values['process_user'])
+                               {
+                                       $this->bo->process_users($values);
+                               }
                                $GLOBALS['phpgw']->redirect_link('/index.php', 
array('menuaction' => 'registration.uipending.index'));
                        }
                        else
@@ -212,7 +216,7 @@
                                $values = 
$this->bocommon->collect_locationdata($values,$insert_record);
 
                                $values['id'] = $id;
-
+//_debug_array($values);die();
                                if($this->bo->update_pending_user($values))
                                {
                                        $message = lang('messages_saved_form');
@@ -260,14 +264,6 @@
                        $bolocation     = CreateObject('property.bolocation');
                        $user['location_data'] = 
isset($user['reg_info']['location_code']) && $user['reg_info']['location_code'] 
? $bolocation->read_single($user['reg_info']['location_code'],array('view' => 
true)) : '';
                                
-
-/*
-_debug_array($user);
-_debug_array($user_data);
-_debug_array($fields);
-die();
-*/
-
                        $location_data=$bolocation->initiate_ui_location(array(
                                'values'        => $user['location_data'],
                                'type_id'       => -1,
@@ -282,10 +278,9 @@
                        $data = array
                        (
                                'value_id'                              => $id,
-                               'img_go_home'                   => 
'rental/templates/base/images/32x32/actions/go-home.png',
-                               'editable'                              => true,
                                'user_data'                             => 
$user_data,
-                               'location_data'                 => 
$location_data
+                               'location_data'                 => 
$location_data,
+                               'value_approved'                => 
$user['reg_approved']
                        );
 
                        $GLOBALS['phpgw_info']['flags']['app_header'] = 
lang('registration') . '::' . lang('edit user');

Modified: branches/Version-1_0-branch/registration/inc/class.uireg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.uireg.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/class.uireg.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -435,13 +435,16 @@
 
                function ready_to_activate()
                {
-//                     global $reg_id;
                        $reg_id = phpgw::get_var('reg_id');
 
                        if ($this->config['activate_account'] == 'email')
                        {
                                $this->simple_screen('confirm_email_sent.tpl');
                        }
+                       else if ($this->config['activate_account'] == 
'pending_approval')
+                       {
+                               
$this->simple_screen('confirm_pending_approval.tpl');
+                       }
                        else
                        {
                                /* ($this->config['activate_account'] == 
'immediately') */

Modified: branches/Version-1_0-branch/registration/inc/hook_logout.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/hook_logout.inc.php    
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/inc/hook_logout.inc.php    
2012-04-03 11:27:05 UTC (rev 9093)
@@ -14,5 +14,11 @@
 
        /* $Id$ */
 
-       $GLOBALS['phpgw']->db->query("delete from phpgw_reg_accounts where 
reg_dla <= '"
+       $c = createobject('phpgwapi.config','registration');
+       $c->read();
+
+       if(!$c->config_data['activate_account'] == 'pending_approval')
+       {
+               $GLOBALS['phpgw']->db->query("DELETE FROM phpgw_reg_accounts 
WHERE reg_dla <= '"
                . (time() - 7200) . "'",__LINE__,__FILE__);
+       }

Modified: branches/Version-1_0-branch/registration/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/config.tpl  
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/templates/base/config.tpl  
2012-04-03 11:27:05 UTC (rev 9093)
@@ -49,6 +49,7 @@
     <td>{lang_Activate_account}:</td>
     <td>
      <select name="newsettings[activate_account]">
+      <option 
value="pending_approval"{selected_activate_account_pending_approval}>{lang_pending_approval}</option>
       <option 
value="email"{selected_activate_account_email}>{lang_Send_Email}</option>
       <option 
value="immediately"{selected_activate_account_immediately}>{lang_Immediately}</option>
      </select>
@@ -92,7 +93,13 @@
    <td>{lang_Subject_for_confirmation_email}:</td>
    <td><input name="newsettings[subject_confirm]" 
value="{value_subject_confirm}"></td>
   </tr>
-  <tr bgcolor="{row_off}">
+       <tr class="row_off">
+               <td>{lang_messenger_welcome_message}</td>
+               <td>
+                       <textarea cols="40" rows="4" 
name="newsettings[messenger_welcome_message]" 
wrap="virtual">{value_messenger_welcome_message}</textarea>
+               </td>
+       </tr>
+  <tr bgcolor="{row_on}">
 
 <!-- END body -->
 

Copied: 
branches/Version-1_0-branch/registration/templates/base/confirm_pending_approval.tpl
 (from rev 9092, trunk/registration/templates/base/confirm_pending_approval.tpl)
===================================================================
--- 
branches/Version-1_0-branch/registration/templates/base/confirm_pending_approval.tpl
                                (rev 0)
+++ 
branches/Version-1_0-branch/registration/templates/base/confirm_pending_approval.tpl
        2012-04-03 11:27:05 UTC (rev 9093)
@@ -0,0 +1,5 @@
+<center>
+ <p>
+  Din påmelding er registert og du vil få en epost når den er behandlet og 
godkjent.
+ </p>
+</center>

Modified: 
branches/Version-1_0-branch/registration/templates/base/pending_users.xsl
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/pending_users.xsl   
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/templates/base/pending_users.xsl   
2012-04-03 11:27:05 UTC (rev 9093)
@@ -35,7 +35,7 @@
 
        <div class="yui-content">
                <div id="control_details">
-                       <xsl:call-template name="yui_booking_i18n"/>
+                       <xsl:call-template name="yui_phpgw_i18n"/>
                        <xsl:apply-templates select="filter_form" />
                        <xsl:apply-templates select="paging"/>
                        <xsl:apply-templates select="datatable"/>
@@ -88,11 +88,15 @@
        
        <xsl:call-template name="datasource-definition" />
        <xsl:variable name="label_submit"><xsl:value-of 
select="php:function('lang', 'save')" /></xsl:variable>
+       <xsl:variable name="label_process"><xsl:value-of 
select="php:function('lang', 'process')" /></xsl:variable>
        <xsl:variable name="label_checkAll"><xsl:value-of 
select="php:function('lang', 'invert_checkboxes')" /></xsl:variable>
        <div><input type="button" id="select_all" value="{$label_checkAll}" 
onclick="checkAll('mychecks')"/></div>
        
        <form action="#" name="user_form" id="user_form" method="post">
-               <div class="user_submit"><input type="submit" 
name="values[save_user]" id="save_user" value="{$label_submit}" onclick="return 
onSave()"/></div>
+               <div class="user_submit">
+                       <input type="submit" name="values[save_user]" 
id="save_user" value="{$label_submit}" onclick="return onSave()"/>
+                       <input type="submit" name="values[process_user]" 
id="process_user" value="{$label_process}" onclick="return onSave()"/>
+               </div>
        </form>
 </xsl:template>
 

Modified: branches/Version-1_0-branch/registration/templates/base/user_edit.xsl
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/user_edit.xsl       
2012-04-03 11:23:21 UTC (rev 9092)
+++ branches/Version-1_0-branch/registration/templates/base/user_edit.xsl       
2012-04-03 11:27:05 UTC (rev 9093)
@@ -3,7 +3,7 @@
 
 <xsl:template match="data" xmlns:php="http://php.net/xsl";>
 
-<xsl:call-template name="yui_booking_i18n"/>
+<xsl:call-template name="yui_phpgw_i18n"/>
 <div class="identifier-header">
 <h1><img src="{img_go_home}" /> 
                <xsl:value-of select="php:function('lang', 'edit user')" />
@@ -26,20 +26,41 @@
                                                </tr>
                                        </xsl:for-each>
                                        <xsl:call-template 
name="location_form"/>                       
+                                       <tr>
+                                               <td>
+                                                       <xsl:value-of 
select="php:function('lang', 'approve')" />
+                                               </td>
+                                               <td>
+                                                       <input type="checkbox" 
name="values[approve]" value="1">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'approve')"/>
+                                                               </xsl:attribute>
+                                                               <xsl:if 
test="value_approved = '1'">
+                                                                       
<xsl:attribute name="checked">
+                                                                               
<xsl:text>checked</xsl:text>
+                                                                       
</xsl:attribute>
+                                                               </xsl:if>
+                                                       </input>
+                                               </td>
+                                       </tr>
+                                       <tr>
+                                               <td>
+                                                       <xsl:value-of 
select="php:function('lang', 'process')" />
+                                               </td>
+                                               <td>
+                                                       <input type="checkbox" 
name="values[process]" value="1">
+                                                               <xsl:attribute 
name="title">
+                                                                       
<xsl:value-of select="php:function('lang', 'process approved')"/>
+                                                               </xsl:attribute>
+                                                       </input>
+                                               </td>
+                                       </tr>
                                </table>
                                <div class="form-buttons">
-                                       <xsl:choose>
-                                               <xsl:when test="editable">
-                                                       <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
-                                                       <xsl:variable 
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')" 
/></xsl:variable>
-                                                       <input type="submit" 
name="save" value="{$lang_save}" title = "{$lang_save}" />
-                                                       <input type="submit" 
name="cancel" value="{$lang_cancel}" title = "{$lang_cancel}" />
-                                               </xsl:when>
-                                               <xsl:otherwise>
-                                                       <xsl:variable 
name="lang_edit"><xsl:value-of select="php:function('lang', 'edit')" 
/></xsl:variable>
-                                                       <input type="submit" 
name="edit" value="{$lang_edit}" title = "{$lang_edit}" />
-                                               </xsl:otherwise>
-                                       </xsl:choose>
+                                       <xsl:variable 
name="lang_save"><xsl:value-of select="php:function('lang', 'save')" 
/></xsl:variable>
+                                       <xsl:variable 
name="lang_cancel"><xsl:value-of select="php:function('lang', 'cancel')" 
/></xsl:variable>
+                                       <input type="submit" name="save" 
value="{$lang_save}" title = "{$lang_save}" />
+                                       <input type="submit" name="cancel" 
value="{$lang_cancel}" title = "{$lang_cancel}" />
                                </div>
                        </form>                 
                </div>

Deleted: 
branches/Version-1_0-branch/registration/templates/base/yui_booking_i18n.xsl
===================================================================
--- 
branches/Version-1_0-branch/registration/templates/base/yui_booking_i18n.xsl    
    2012-04-03 11:23:21 UTC (rev 9092)
+++ 
branches/Version-1_0-branch/registration/templates/base/yui_booking_i18n.xsl    
    2012-04-03 11:27:05 UTC (rev 9093)
@@ -1,17 +0,0 @@
-<!-- $Id: yui_booking_i18n.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
-       <xsl:template name="yui_booking_i18n" xmlns:php="http://php.net/xsl";>
-               <xsl:if test="yui_booking_i18n">
-                       <script type="text/javascript">
-                               YAHOO.portico.i18n = {};
-                               <xsl:for-each select="yui_booking_i18n/*">
-                                       YAHOO.portico.i18n.<xsl:value-of 
select="local-name()"/> = function(cfg)
-                                       {
-                                               cfg = cfg || {};
-                                               <xsl:for-each select="./*">
-                                                       cfg["<xsl:value-of 
select="local-name()"/>"] = <xsl:value-of disable-output-escaping="yes" 
select="."/>;
-                                               </xsl:for-each>
-                                       };
-                               </xsl:for-each>
-                       </script>
-               </xsl:if>
-       </xsl:template>

Copied: 
branches/Version-1_0-branch/registration/templates/base/yui_phpgw_i18n.xsl 
(from rev 9092, trunk/registration/templates/base/yui_phpgw_i18n.xsl)
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/yui_phpgw_i18n.xsl  
                        (rev 0)
+++ branches/Version-1_0-branch/registration/templates/base/yui_phpgw_i18n.xsl  
2012-04-03 11:27:05 UTC (rev 9093)
@@ -0,0 +1,17 @@
+<!-- $Id: yui_booking_i18n.xsl 8267 2011-12-11 12:27:18Z sigurdne $ -->
+       <xsl:template name="yui_phpgw_i18n" xmlns:php="http://php.net/xsl";>
+               <xsl:if test="yui_phpgw_i18n">
+                       <script type="text/javascript">
+                               YAHOO.portico.i18n = {};
+                               <xsl:for-each select="yui_phpgw_i18n/*">
+                                       YAHOO.portico.i18n.<xsl:value-of 
select="local-name()"/> = function(cfg)
+                                       {
+                                               cfg = cfg || {};
+                                               <xsl:for-each select="./*">
+                                                       cfg["<xsl:value-of 
select="local-name()"/>"] = <xsl:value-of disable-output-escaping="yes" 
select="."/>;
+                                               </xsl:for-each>
+                                       };
+                               </xsl:for-each>
+                       </script>
+               </xsl:if>
+       </xsl:template>




reply via email to

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