fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [8976] Merge 8971:8975 from trunk


From: Sigurd Nes
Subject: [Fmsystem-commits] [8976] Merge 8971:8975 from trunk
Date: Wed, 14 Mar 2012 07:49:15 +0000

Revision: 8976
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=8976
Author:   sigurdne
Date:     2012-03-14 07:49:14 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Merge 8971:8975 from trunk

Modified Paths:
--------------
    branches/Version-1_0-branch/addressbook/inc/class.soaddressbook.inc.php
    branches/Version-1_0-branch/addressbook/inc/class.uiaddressbook.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
    branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php
    branches/Version-1_0-branch/controller/js/controller/ajax.js
    branches/Version-1_0-branch/controller/templates/base/css/base.css
    branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.account.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.country.inc.php
    branches/Version-1_0-branch/phpgwapi/inc/class.sbox.inc.php
    branches/Version-1_0-branch/registration/inc/class.bomanagefields.inc.php
    branches/Version-1_0-branch/registration/inc/class.boreg.inc.php
    branches/Version-1_0-branch/registration/inc/class.somanagefields.inc.php
    branches/Version-1_0-branch/registration/inc/class.soreg.inc.php
    branches/Version-1_0-branch/registration/inc/class.uimanagefields.inc.php
    branches/Version-1_0-branch/registration/inc/class.uireg.inc.php
    branches/Version-1_0-branch/registration/main.php
    branches/Version-1_0-branch/registration/setup/setup.inc.php
    branches/Version-1_0-branch/registration/templates/base/config.tpl
    branches/Version-1_0-branch/registration/templates/base/fields.tpl

Added Paths:
-----------
    branches/Version-1_0-branch/registration/inc/class.menu.inc.php
    branches/Version-1_0-branch/registration/inc/hook_config.inc.php

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
   + 
/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

Modified: 
branches/Version-1_0-branch/addressbook/inc/class.soaddressbook.inc.php
===================================================================
--- branches/Version-1_0-branch/addressbook/inc/class.soaddressbook.inc.php     
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/addressbook/inc/class.soaddressbook.inc.php     
2012-03-14 07:49:14 UTC (rev 8976)
@@ -402,6 +402,8 @@
 
                function edit_person($person_id, $fields)
                {
+                       $fields['tab_address'] = 
isset($fields['tab_address']['tmp_data']['addr']) ? 
$fields['tab_address']['tmp_data']['addr'] : array();
+
                        $principal['owner'] = $fields['owner'];
                        $principal['access'] = 
$fields['tab_person_data']['ispublic'];
                        $preferred_force_addr = 
isset($fields['tab_address']['addr_preferred']) ? 
$fields['tab_address']['addr_preferred'] : 0;
@@ -420,6 +422,10 @@
 
                        $principal['cat_id'] = $cats;
                        $person = array_merge($fields['tab_person_data'], 
$fields['tab_extra']);
+//                     $person = array_merge($person, $fields['tab_address']);
+//_debug_array($person);
+//_debug_array($fields);die();
+                       
                        $orgs = $fields['edit_orgs'];
                        $orgs['preferred_org'] = 
isset($fields['tab_orgs']['preferred_org']) ? 
$fields['tab_orgs']['preferred_org'] : 0;
                        $queries = $fields['transactions'];
@@ -430,17 +436,17 @@
                        unset($fields['edit_orgs']);
                        unset($fields['tab_cats']);
                        unset($fields['old_my_orgs']);
-                       unset($fields['tab_address']);
+//                     unset($fields['tab_address']);
                        unset($fields['addr_data']);
                        unset($fields['transactions']);
                        //unset($fields['tab_comms']);
                        unset($fields['old_comm']);
 
-                       $this->contacts->edit_contact($person_id, $principal, 
PHPGW_SQL_RUN_SQL);
-                       $this->contacts->edit_person($person_id, $person, 
PHPGW_SQL_RUN_SQL);
+                       $queries[] = $this->contacts->edit_contact($person_id, 
$principal, PHPGW_SQL_RETURN_SQL);
+                       $queries[] = $this->contacts->edit_person($person_id, 
$person, PHPGW_SQL_RETURN_SQL);
                        foreach($orgs['delete'] as $org_id)
                        {
-                               
$this->contacts->delete_org_person_relation($org_id, $person_id, 
PHPGW_SQL_RUN_SQL);
+                               $queries[] = 
$this->contacts->delete_org_person_relation($org_id, $person_id, 
PHPGW_SQL_RETURN_SQL);
                        }
 
                        if($orgs['preferred_org'])
@@ -463,10 +469,10 @@
                                }
 
                                $data =  array('my_preferred' => 'N');
-                               $this->contacts->edit_org_person_relation('', 
$person_id, $data, PHPGW_SQL_RUN_SQL);
+                               $queries[] = 
$this->contacts->edit_org_person_relation('', $person_id, $data, 
PHPGW_SQL_RETURN_SQL);
                                $data = array('my_preferred' => 'Y',
                                              'my_addr_id' => 
$fields['preferred_address']);
-                               
$this->contacts->edit_org_person_relation($orgs['preferred_org'], $person_id, 
$data, PHPGW_SQL_RUN_SQL);
+                               $queries[] = 
$this->contacts->edit_org_person_relation($orgs['preferred_org'], $person_id, 
$data, PHPGW_SQL_RETURN_SQL);
                        }
                        
                        $comm_preferred = $fields['tab_comms']['preferred'];
@@ -482,24 +488,30 @@
                                              $fields['edit_others']['delete'],
                                              $fields['edit_others']['edit'],
                                              
$fields['tab_others']['other_value'], $person_id);
-                       
-                       $this->execute_queries($queries);
-                       
+
                        if($preferred_force_addr && $preferred_force_addr!='')
-                        {
-                                $preferred_force_addr = 
$this->get_preferred_location($person_id, $preferred_force_addr);
+                       {
+                               $preferred_force_addr = 
$this->get_preferred_location($person_id, $preferred_force_addr);
 
-                                $this->contacts->edit_location_by_contact(
-                                       $person_id,
-                                       array('addr_preferred' => 'N'),
-                                       PHPGW_SQL_RUN_SQL);
+                               $queries[] = 
$this->contacts->edit_location_by_contact(
+                                               $person_id,
+                                               array('addr_preferred' => 'N'),
+                                               PHPGW_SQL_RETURN_SQL);
 
-                                $this->contacts->edit_location(
+
+                               $queries[] = $this->contacts->edit_location(
                                        $preferred_force_addr,
-                                       array('addr_preferred' => 'Y'),
-                                       PHPGW_SQL_RUN_SQL);
-                        }
-
+                                       $fields['tab_address'],
+                                       //array('addr_preferred' => 'Y'),
+                                       PHPGW_SQL_RETURN_SQL);
+                       }
+                       else
+                       {
+//_debug_array($fields['tab_address']);die();
+                               $queries[] = 
$this->add_location($fields['tab_address'], $person_id, PHPGW_SQL_RETURN_SQL);
+                       }
+//_debug_array($queries);die();
+                       $this->execute_queries($queries);
                        /* Update the first and last name in accounts */
                        if($fields['tab_person_data'])
                        {
@@ -516,6 +528,8 @@
                        }
                        
                        $this->contacts->finalize_edit($person_id);
+
+
                }
                
                function edit_org($org_id, $fields)
@@ -566,27 +580,27 @@
                        $this->execute_queries($queries);
 
                        if($preferred_force_addr && $preferred_force_addr!='')
-                        {
-                                $preferred_force_addr = 
$this->get_preferred_location($org_id, $preferred_force_addr);
+                       {
+                               $preferred_force_addr = 
$this->get_preferred_location($org_id, $preferred_force_addr);
 
-                                $this->contacts->edit_location_by_contact(
+                               $this->contacts->edit_location_by_contact(
                                        $org_id,
                                        array('addr_preferred' => 'N'),
                                        PHPGW_SQL_RUN_SQL);
 
-                                $this->contacts->edit_location(
+                               $this->contacts->edit_location(
                                        $preferred_force_addr,
                                        array('addr_preferred' => 'Y'),
                                        PHPGW_SQL_RUN_SQL);
-                        }
+                       }
                }
 
                function get_preferred_location($contact_id, $preferred_forced)
-                {
-                        $addr_tmp = 
$this->contacts->get_addr_contact_data($contact_id);
-                        if(is_array($addr_tmp))
-                        {
-                                foreach($addr_tmp as $data)
+               {
+                       $addr_tmp = 
$this->contacts->get_addr_contact_data($contact_id);
+                       if(is_array($addr_tmp))
+                       {
+                               foreach($addr_tmp as $data)
                                {
                                        
if($preferred_forced==$data['key_addr_id'])
                                        {
@@ -597,11 +611,11 @@
                                                
$locations[$data['key_addr_id']] = $data;
                                        }
                                }
-                        }
-                        ksort($locations);
-                        end($locations);
-                        return key($locations);
-                }
+                       }
+                       ksort($locations);
+                       end($locations);
+                       return key($locations);
+               }
 
                /**
                * This function call to edit_location from contact object
@@ -934,7 +948,7 @@
                                
                                $this->add_communication_media($fields, 
$contact_id, PHPGW_SQL_RUN_SQL);
                        }
-                       $this->unlock();
+//                     $this->unlock();
                }
 
                function upgrade_others($add_others=array(), 
$del_others=array(), $edit_others=array(), $data=array(), $contact_id)
@@ -967,7 +981,7 @@
                                $this->add_others($fields, $contact_id, 
PHPGW_SQL_RUN_SQL);
                        }
                        
-                       $this->unlock();
+//                     $this->unlock();
                }
 
                /**

Modified: 
branches/Version-1_0-branch/addressbook/inc/class.uiaddressbook.inc.php
===================================================================
--- branches/Version-1_0-branch/addressbook/inc/class.uiaddressbook.inc.php     
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/addressbook/inc/class.uiaddressbook.inc.php     
2012-03-14 07:49:14 UTC (rev 8976)
@@ -1389,23 +1389,19 @@
         */
        function address_form($fields)
        {
+               $this->form_start();
+
+               $addresstype='<select name="entry[tmp_data][addr][addr_type]">'
+                       . 
$this->get_addr_type($fields['tmp_data']['addr']['addr_type']) . '</select>';
+               $addr_preferred = '<input type="hidden" 
name="entry[tmp_data][addr][addr_preferred]" value="'
+                       .$fields['tmp_data']['addr']['addr_preferred'].'">';
+
+
                if ( isset($fields['tmp_data']['addr']) 
                        && is_array($fields['tmp_data']['addr'])  
                        && isset($fields['tmp_data']['addr']['addr_add1']) )
                {
-                       echo '<pre>' . print_r($fields['tmp_data']['addr'], 
true) . '</pre>';
-                       $this->set_form_fields(array
-                       (
-                                1 => array('Address 1', 
'entry[tmp_data][addr][addr_add1]', $fields['tmp_data']['addr']['addr_add1']),
-                                2 => array('Address 2', 
'entry[tmp_data][addr][addr_add2]', $fields['tmp_data']['addr']['addr_add2']),
-                                3 => array('City', 
'entry[tmp_data][addr][addr_city]', $fields['tmp_data']['addr']['addr_city']),
-                                4 => array('State', 
'entry[tmp_data][addr][addr_state]', $fields['tmp_data']['addr']['addr_state']),
-                                5 => array('Postal Code', 
'entry[tmp_data][addr][addr_postal_code]', 
$fields['tmp_data']['addr']['addr_postal_code']),
-                                6 => array('Country', 
'entry[tmp_data][addr][addr_country]', 
$fields['tmp_data']['addr']['addr_country']),
-                                7 => array(lang('Type'), $addresstype, 
'special'),
-                                8 => array('', $addr_preferred, 'special')
-                       ));
-
+//                     echo '<pre>' . print_r($fields['tmp_data']['addr'], 
true) . '</pre>';
                        if ( isset($fields['addr_preferred']) && 
isset($this->array_data[$fields['addr_preferred']]) )
                        {
                                
$this->array_data[$fields['addr_preferred']]['addr_preferred'] = 'Y';
@@ -1428,16 +1424,22 @@
                        );
                }
 
-               $addresstype='<select name="entry[tmp_data][addr][addr_type]">'
-                       . 
$this->get_addr_type($fields['tmp_data']['addr']['addr_type']) . '</select>';
-               $addr_preferred = '<input type="hidden" 
name="entry[tmp_data][addr][addr_preferred]" value="'
-                       .$fields['tmp_data']['addr']['addr_preferred'].'">';
+               $this->set_form_fields(array
+               (
+                        1 => array('Address 1', 
'entry[tmp_data][addr][addr_add1]', $fields['tmp_data']['addr']['addr_add1']),
+                        2 => array('Address 2', 
'entry[tmp_data][addr][addr_add2]', $fields['tmp_data']['addr']['addr_add2']),
+                        3 => array('City', 'entry[tmp_data][addr][addr_city]', 
$fields['tmp_data']['addr']['addr_city']),
+                        4 => array('State', 
'entry[tmp_data][addr][addr_state]', $fields['tmp_data']['addr']['addr_state']),
+                        5 => array('Postal Code', 
'entry[tmp_data][addr][addr_postal_code]', 
$fields['tmp_data']['addr']['addr_postal_code']),
+                        6 => array('Country', 
'entry[tmp_data][addr][addr_country]', 
$fields['tmp_data']['addr']['addr_country']),
+                        7 => array('Type', $addresstype, 'special'),
+                        8 => array('', $addr_preferred, 'special')
+               ));
 
 
                $key_addr_id_name = 'entry[tmp_data][addr][key_addr_id]';
                $key_addr_id = $fields['tmp_data']['addr']['key_addr_id'];
 
-               $this->form_start();
 
                $this->template->set_var('lang_general_data', lang('Address 
Data for').' '.$this->record_name);
 
@@ -1454,12 +1456,12 @@
                        'link1' => array('type'  => 'link', 'mode'  => 'edit', 
'key'   => 'key_addr_id', 'action'=> 'addr_edit_row', 'extra' => array('owner' 
=> $this->owner, 'ab_id' => $this->contact_id, 'record_name' => 
$this->record_name) ),
                        'link2' => array('type'  => 'link', 'mode'  => 
'delete', 'key'   => 'key_addr_id', 'action'=> 'addr_del_row', 'extra' => 
array('owner' => $this->owner, 'ab_id' => $this->contact_id, 'record_name' => 
$this->record_name))
                );
-               $this->array_data = $this->read_tab_session('addr_data');
+//             $this->array_data = $this->read_tab_session('addr_data');
                //var_export($fields);
                //var_export($this->array_data);
 
-               $this->template->set_var('detail_fields', 
-                       $this->get_detail_form('address', array('Type', 
'Address', 'Preferred', 'Edit','Delete'), 'array_data', $types_data, 
'key_addr_id'));
+//             $this->template->set_var('detail_fields', 
+//                     $this->get_detail_form('address', array('Type', 
'Address', 'Preferred', 'Edit','Delete'), 'array_data', $types_data, 
'key_addr_id'));
                return $this->template->fp('out', 'tab_body_general_data');
        }
 
@@ -3232,13 +3234,13 @@
        {
                if ($col==1)
                {
-                       $this->template->set_var('field_name_one', 
lang($field_name));
+                       $this->template->set_var('field_name_one', $field_name 
? lang($field_name) : '');
                        $this->template->set_var('input_name_one', $input_name);
                        $this->template->set_var('input_value_one', 
$input_value);
                }
                else
                {
-                       $this->template->set_var('field_name_two', 
lang($field_name));
+                       $this->template->set_var('field_name_two',  $field_name 
? lang($field_name) : '');
                        $this->template->set_var('input_name_two', $input_name);
                        $this->template->set_var('input_value_two', 
$input_value);
                }
@@ -3248,12 +3250,12 @@
        {
                if ($col==1)
                {
-                       $this->template->set_var('field_other_name1', 
lang($field_name));
+                       $this->template->set_var('field_other_name1',  
$field_name ? lang($field_name) : '');
                        $this->template->set_var('value_other_name1', 
$field_value);
                }
                else
                {
-                       $this->template->set_var('field_other_name2', 
lang($field_name));
+                       $this->template->set_var('field_other_name2',  
$field_name ? lang($field_name) : '');
                        $this->template->set_var('value_other_name2', 
$field_value);
                }
        }

Modified: 
branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php   
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/controller/inc/model/class.check_list.inc.php   
2012-03-14 07:49:14 UTC (rev 8976)
@@ -33,7 +33,11 @@
        class controller_check_list extends controller_model
        {
                public static $so;
-
+               /*
+               const STATUS_OPEN = 0;
+               const STATUS_CLOSED = 1;
+               const STATUS_PENDING = 2;
+               */
                protected $id;
                protected $control_id;
                protected $status;

Modified: 
branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php
===================================================================
--- branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php 
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/controller/inc/model/class.control_item.inc.php 
2012-03-14 07:49:14 UTC (rev 8976)
@@ -33,7 +33,10 @@
        class controller_control_item extends controller_model
        {
                public static $so;
-               
+               /*
+               const CONTROL_ITEM_TYPE_MAALING = "control_item_type_1";
+               const CONTROL_ITEM_TYPE_MAALING = "control_item_type_1";
+               */      
                protected $id;
                protected $title;
                protected $required;

Modified: branches/Version-1_0-branch/controller/js/controller/ajax.js
===================================================================
--- branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/controller/js/controller/ajax.js        
2012-03-14 07:49:14 UTC (rev 8976)
@@ -617,7 +617,7 @@
                
                $(clickRow).attr("id", "case_" + case_id);
                
-               var quickEditRowTagStr = "<li class='quick_edit 
check_item_case'><h3>Hurtigendring</h3><fieldset><form class='frm_update_case' 
action='" + requestUrl + "'>";
+               var quickEditRowTagStr = "<li class='quick_edit 
check_item_case'><fieldset><h3>Hurtigendring</h3><hr><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>";

Modified: branches/Version-1_0-branch/controller/templates/base/css/base.css
===================================================================
--- branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/controller/templates/base/css/base.css  
2012-03-14 07:49:14 UTC (rev 8976)
@@ -1293,11 +1293,29 @@
 li.check_item_case ul{
     margin-bottom: 20px;
 }
-li.check_item_case ul li, li.quick_edit fieldset {
-    border: 1px solid #AAAAAA;
+li.check_item_case ul li {
+    border: 1px solid #DDDDDD;
     margin: 5px 0 0;
     padding: 5px;
 }
+
+#main_content .quick_edit fieldset {
+       padding: 10px;
+       border: 1px solid #DDDDDD;
+}
+.frm_update_case label {
+       display: block; 
+}
+.frm_update_case textarea {
+       width: 500px;
+       display: block;
+}
+.quick_edit hr {
+       color:#fafafa;
+}
+.frm_update_case input[type=submit]{
+       float:right;    
+}
 a.view_check_list{
        color: #FFFFFF;
     display: block;
@@ -1307,11 +1325,14 @@
     text-decoration: none;
     width: 24px;       
 }
-li.quick_edit label{
+.quick_edit label{
        font-weight:bold;
        vertical-align:top;
 }
-li.quick_edit textarea, li.quick_edit select{
+.quick_edit h3{
+       margin:0;
+}
+.quick_edit select{
        display: inline-block;
        vertical-align:top;
 }

Modified: 
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_.inc.php   
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_.inc.php   
2012-03-14 07:49:14 UTC (rev 8976)
@@ -45,7 +45,7 @@
                /**
                 * @var object $account the currently selected user object
                 */
-               protected $account;
+               public $account;
 
                /**
                 * @var integer $account_id track the current account_id - 
which may not match the this->account->id
@@ -231,7 +231,7 @@
                 *
                 * @return void
                 */
-               abstract protected function read_repository();
+               abstract public function read_repository();
 
                /**
                 * Save/update account information to database
@@ -263,7 +263,7 @@
                {
                        if ($expiredate)
                        {
-                               $expires = (int) $expiry;
+                               $expires = (int) $expiredate;
                        }
                        else if ( 
isset($GLOBALS['phpgw_info']['server']['auto_create_expire']) )
                        {

Modified: 
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php
===================================================================
--- 
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php    
    2012-03-13 18:33:18 UTC (rev 8975)
+++ 
branches/Version-1_0-branch/phpgwapi/inc/accounts/class.accounts_sql.inc.php    
    2012-03-14 07:49:14 UTC (rev 8976)
@@ -738,7 +738,7 @@
                *
                * @return object phpgwapi_account derived object containing 
account data
                */
-               protected function read_repository()
+               public function read_repository()
                {
                        $this->account = $this->get($this->account_id, false);
                        return $this->account;

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.account.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.account.inc.php      
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.account.inc.php      
2012-03-14 07:49:14 UTC (rev 8976)
@@ -477,7 +477,8 @@
                public function toArray()
                {
                        $array = $this->_data;
-                       unset($array['passwd'], $array['passwd_hash']);
+       //              unset($array['passwd'], $array['passwd_hash']);
+                       unset($array['passwd']);
                        return $array;
                }
 

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php 
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.contacts_sql.inc.php 
2012-03-14 07:49:14 UTC (rev 8976)
@@ -2648,11 +2648,11 @@
                        {
                                if ( $this->db->get_transaction() )
                                {
-                                       $this->global_lock = true;
+//                                     $this->global_lock = true;
                                }
                                else
                                {
-                                       
$this->lock_table($this->location->table, '', true);
+//                                     
$this->lock_table($this->location->table, '', true);
                                }
                        }
                        if(count($addr[0]) == 0)

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.country.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.country.inc.php      
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.country.inc.php      
2012-03-14 07:49:14 UTC (rev 8976)
@@ -304,7 +304,7 @@
                                        {
                                                $translated = $name;
                                        }
-                                       $translated_list[$code] = $translated;
+                                       $translated_list[$code] = 
ltrim($translated,'!');
                                 }
                                 asort($translated_list);
                        }

Modified: branches/Version-1_0-branch/phpgwapi/inc/class.sbox.inc.php
===================================================================
--- branches/Version-1_0-branch/phpgwapi/inc/class.sbox.inc.php 2012-03-13 
18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/phpgwapi/inc/class.sbox.inc.php 2012-03-14 
07:49:14 UTC (rev 8976)
@@ -11,6 +11,7 @@
        */
 
        phpgw::import_class('phpgwapi.datetime');
+       phpgw::import_class('phpgwapi.country');
 
        /**
        * Class for creating predefines select boxes
@@ -420,7 +421,7 @@
                        }
                        $selected = trim($selected);
 
-                       $slctd = !$selected ? '' : ' selected';
+                       $slctd = $selected ? '' : ' selected';
                        $lang_select1 = lang('Select One');
                        $select = <<<HTML
                                <select name="{$name}">
@@ -429,7 +430,7 @@
 HTML;
                        foreach ( phpgwapi_country::get_translated_list() as 
$code => $country )
                        {
-                               $slctd = $code == $selected ? '' : ' selected';
+                               $slctd = $code == $selected ? ' selected' : '' ;
                                $select .= <<<HTML
                                        <option 
value="{$code}"{$slctd}>{$country}</option>
 

Modified: 
branches/Version-1_0-branch/registration/inc/class.bomanagefields.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.bomanagefields.inc.php   
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.bomanagefields.inc.php   
2012-03-14 07:49:14 UTC (rev 8976)
@@ -28,12 +28,12 @@
                function bomanagefields()
                {
                        $this->so = CreateObject 
('registration.somanagefields');
-                       $this->fields = $this->get_field_list ();
+                       $this->fields = $this->get_field_list();
                }
 
                function save_fields ($fields)
                {
-                       $current_fields = $this->get_field_list ();
+                       $current_fields = $this->get_field_list();
 
                        $name_transforms = array (
                                'email'      => 'email',
@@ -120,11 +120,11 @@
                        }
                }
 
-               function get_field_list ()
+               function get_field_list()
                {
-                       $fields = $this->so->get_field_list ();
+                       $fields = $this->so->get_field_list();
 
-                       $rarray = array ();
+                       $rarray = array();
                        if (is_array ($fields))
                        {
                                reset ($fields);

Modified: branches/Version-1_0-branch/registration/inc/class.boreg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.boreg.inc.php    
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.boreg.inc.php    
2012-03-14 07:49:14 UTC (rev 8976)
@@ -20,8 +20,9 @@
        {
                var $template;
                var $bomanagefields;
-               var $fields;
+               var $fields = array();
                var $so;
+               var $config;
                var $public_functions = array(
                        'step1' => True,
                        'step2' => True,
@@ -35,12 +36,16 @@
                {
                        $this->so = createobject ('registration.soreg');
                        $this->bomanagefields = createobject 
('registration.bomanagefields');
-                       $this->fields = $this->bomanagefields->get_field_list 
();
+                       $this->fields = $this->bomanagefields->get_field_list();
+                       $c = createobject('phpgwapi.config','registration');
+                       $c->read();
+                       $this->config = $c->config_data;
                }
 
                function step1()
                {
-                       global $config, $r_reg;
+                       $r_reg = phpgw::get_var('r_reg');
+                       $o_reg = phpgw::get_var('o_reg');
 
                        $so = createobject('registration.soreg');
 
@@ -68,20 +73,29 @@
 
                function step2()
                {
-                       global $config, $r_reg, $o_reg, $PHP_AUTH_USER, 
$PHP_AUTH_PW;
+                       if(!$r_reg = phpgw::get_var('r_reg'))
+                       {
+                               $r_reg = array();
+                       }
+                       if(!$o_reg = phpgw::get_var('o_reg'))
+                       {
+                               $o_reg = array();
+                       }
+                       $fields = array();
+
                        //echo '<pre>'; print_r($r_reg); echo '</pre>';
 
-                       if ($config['password_is'] == 'http')
+                       if ($this->config['password_is'] == 'http')
                        {
-                               $r_reg['passwd'] = $r_reg['passwd_confirm'] = 
$PHP_AUTH_PW;
+                               $r_reg['passwd'] = $r_reg['passwd_confirm'] = 
$_SERVER['PHP_AUTH_PW'];
                        }
 
-                       if (($config['display_tos']) && ! $r_reg['tos_agree'])
+                       if (($this->config['display_tos']) && ! 
$r_reg['tos_agree'])
                        {
                                $missing_fields[] = 'tos_agree';
                        }
 
-                       while (list($name,$value) = each($r_reg))
+                       foreach ( $r_reg as $name => $value )
                        {
                                if (! $value)
                                {
@@ -104,7 +118,8 @@
                        }
 
                        reset ($this->fields);
-                       while (list (,$field_info) = each ($this->fields))
+
+                       foreach ( $this->fields as $field_name => $field_info )
                        {
                                $name = $field_info['field_name'];
                                $text = $field_info['field_text'];
@@ -208,8 +223,8 @@
 
                function step4()
                {
-                       global $reg_id;
-
+//                     global $reg_id;
+                       $reg_id = phpgw::get_var('reg_id');
                        $so = createobject('registration.soreg');
                        $ui = createobject('registration.uireg');
                        $reg_info = $so->valid_reg($reg_id);
@@ -233,8 +248,7 @@
                //
                function lostpw1()
                {
-                       global $r_reg;
-
+                       $r_reg = phpgw::get_var('r_reg');
                        $so = createobject('registration.soreg');
 
                        if (! $r_reg['loginid'])
@@ -249,7 +263,7 @@
 
                        if(! is_array($errors))
                        {
-                               $error = $so->lostpw1($r_reg['loginid']);
+                               $error = $so->lostpw1($r_reg['loginid']);
                                if($error)
                                {
                                  $errors[] = $error;
@@ -273,7 +287,8 @@
                //
                function lostpw2()
                {
-                       global $reg_id;
+//                     global $reg_id;
+                       $reg_id = phpgw::get_var('reg_id');
 
                        $so = createobject('registration.soreg');
                        $ui = createobject('registration.uireg');
@@ -296,19 +311,20 @@
                //
                function lostpw3()
                {
-                       global $r_reg;
+//                     global $r_reg;
+                       $r_reg = phpgw::get_var('r_reg');
 
                        $lid = 
$GLOBALS['phpgw']->session->appsession('loginid','registration');
                        if(!$lid) {
                          $error[] = lang('Wrong session');
                        }
 
-                       if ($r_reg[passwd] != $r_reg[passwd_2])
+                       if ($r_reg['passwd'] != $r_reg['passwd_2'])
                        {
                            $errors[] = lang('The two passwords are not the 
same');
                        }
 
-                       if (! $r_reg[passwd])
+                       if (! $r_reg['passwd'])
                        {
                            $errors[] = lang('You must enter a password');
                        }
@@ -316,7 +332,7 @@
                        if(! is_array($errors))
                        {
                          $so = createobject('registration.soreg');
-                         $so->lostpw3($lid, $r_reg[passwd]);
+                         $so->lostpw3($lid, $r_reg['passwd']);
                        }
 
                        $ui = createobject('registration.uireg');
@@ -333,40 +349,36 @@
                        return True;
                }
 
-               function check_select_username ()
+               function check_select_username()
                {
-                       global $config, $PHP_AUTH_USER;
-
-                       if ($config['username_is'] == 'choice')
+                       if ($this->config['username_is'] == 'choice')
                        {
                                return True;
                        }
-                       elseif ($config['username_is'] == 'http')
+                       elseif ($this->config['username_is'] == 'http')
                        {
-                               if (!$PHP_AUTH_USER)
+                               if (!$_SERVER['PHP_AUTH_USER'])
                                {
                                        return "HTTP username is not set";
                                }
                                else
                                {
-                                       $GLOBALS['phpgw']->redirect 
($GLOBALS['phpgw']->link ('/registration/main.php', 
'menuaction=registration.boreg.step1&r_reg[loginid]=' . $PHP_AUTH_USER));
+                                       $GLOBALS['phpgw']->redirect 
($GLOBALS['phpgw']->link ('/registration/main.php', 
'menuaction=registration.boreg.step1&r_reg[loginid]=' . 
$_SERVER['PHP_AUTH_USER']));
                                }
                        }
 
                        return True;
                }
 
-               function check_select_password ()
+               function check_select_password()
                {
-                       global $config, $PHP_AUTH_PW;
-
-                       if ($config['password_is'] == 'choice')
+                       if ($this->config['password_is'] == 'choice')
                        {
                                return True;
                        }
-                       elseif ($config['password_is'] == 'http')
+                       elseif ($this->config['password_is'] == 'http')
                        {
-                               if (!$PHP_AUTH_PW)
+                               if (!$_SERVER['PHP_AUTH_PW'])
                                {
                                        return "HTTP password is not set";
                                }

Copied: branches/Version-1_0-branch/registration/inc/class.menu.inc.php (from 
rev 8975, trunk/registration/inc/class.menu.inc.php)
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.menu.inc.php             
                (rev 0)
+++ branches/Version-1_0-branch/registration/inc/class.menu.inc.php     
2012-03-14 07:49:14 UTC (rev 8976)
@@ -0,0 +1,54 @@
+<?php
+       /**
+       * phpGroupWare - registration
+       *
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @internal Development of this application was funded by 
http://www.bergen.kommune.no/bbb_/ekstern/
+       * @package registration
+       * @subpackage core
+       * @version $Id: class.menu.inc.php 4683 2010-01-30 17:16:00Z sigurd $
+       */
+
+       /**
+        * Description
+        * @package registration
+        */
+
+       class registration_menu
+       {
+               /**
+                * Get the menus for the registration
+                *
+                * @return array available menus for the current user
+                */
+               public function get_menu()
+               {
+                       $incoming_app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
+                       $GLOBALS['phpgw_info']['flags']['currentapp'] = 
'registration';
+
+                       $menus['toolbar'] = array();
+
+                       if ( $GLOBALS['phpgw']->acl->check('run', 
phpgwapi_acl::READ, 'admin')
+                       || $GLOBALS['phpgw']->acl->check('admin', 
phpgwapi_acl::ADD, 'registration'))
+                       {
+                               $menus['admin'] = array
+                               (
+                                       'index' => array
+                                       (
+                                               'text'  => 
lang('Configuration'),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'admin.uiconfig.index', 'appname' => 'registration') )
+                                       ),
+                                       'fields'        => array
+                                       (
+                                               'text'  => 
$GLOBALS['phpgw']->translation->translate('Manage Fields', array(), true),
+                                               'url'   => 
$GLOBALS['phpgw']->link('/index.php', array('menuaction' => 
'registration.uimanagefields.admin') )
+                                       )
+                               );
+                       }
+
+                       $GLOBALS['phpgw_info']['flags']['currentapp'] = 
$incoming_app;
+                       return $menus;
+               }
+       }

Modified: 
branches/Version-1_0-branch/registration/inc/class.somanagefields.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.somanagefields.inc.php   
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.somanagefields.inc.php   
2012-03-14 07:49:14 UTC (rev 8976)
@@ -21,7 +21,7 @@
 
                function somanagefields()
                {
-                       $this->db = $GLOBALS['phpgw']->db;
+                       $this->db = & $GLOBALS['phpgw']->db;
 
                        $this->db_fields = array ('field_name', 'field_text', 
'field_type', 'field_values', 'field_required', 'field_order');
                }
@@ -36,7 +36,7 @@
                        $sql = "UPDATE phpgw_reg_fields SET ";
 
                        reset ($this->db_fields);
-                       while (list ($num, $field) = each ($this->db_fields))
+                       foreach ( $this->db_fields as $num => $field )
                        {
                                if ($num)
                                {
@@ -92,6 +92,7 @@
 
                function get_field_list ()
                {
+                       $rarray = array();
                        $sql = "SELECT ";
 
                        reset ($this->db_fields);
@@ -114,4 +115,3 @@
                        return $rarray;
                }
        }
-?>

Modified: branches/Version-1_0-branch/registration/inc/class.soreg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.soreg.inc.php    
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.soreg.inc.php    
2012-03-14 07:49:14 UTC (rev 8976)
@@ -5,6 +5,7 @@
        * This application written by Joseph Engo <address@hidden>         *
        * Modified by Jason Wies (Zone) <address@hidden>               *
        * Modified by Loic Dachary <address@hidden>                             
     *
+       * Modified by Sigurd Nes <address@hidden>                               
   *
        * --------------------------------------------                          
   *
        * Funding for this program was provided by http://www.checkwithmom.com  
   *
        * --------------------------------------------                          
   *
@@ -20,31 +21,32 @@
        {
                var $reg_id;
                var $db;
+               var $config;
 
-               function soreg()
+               function __construct()
                {
-                       $this->db = $GLOBALS['phpgw']->db;
+                       $this->db = & $GLOBALS['phpgw']->db;
+                       $c = createobject('phpgwapi.config','registration');
+                       $c->read();
+                       $this->config = $c->config_data;
                }
 
                function account_exists($account_lid)
                {
-                       $this->db->lock('phpgw_reg_accounts');
-                       $this->db->query("select count(*) as cnt from 
phpgw_reg_accounts where reg_lid='$account_lid'",__LINE__,__FILE__);
+                       $this->db->transaction_begin();
+                       $this->db->query("SELECT count(*) as cnt FROM 
phpgw_reg_accounts WHERE reg_lid='$account_lid'",__LINE__,__FILE__);
                        $this->db->next_record();
 
-                       $GLOBALS['phpgw']->db->lock('phpgw_accounts');
                        if ($GLOBALS['phpgw']->accounts->exists($account_lid) 
|| $this->db->f('cnt'))
                        {
-                               $GLOBALS['phpgw']->db->unlock();
-                               $this->db->unlock();
+                               $this->db->transaction_commit();
                                return True;
                        }
                        else
                        {
-                               $GLOBALS['phpgw']->db->unlock();
                                // To prevent race conditions, reserve the 
account_lid
                                $this->db->query("insert into 
phpgw_reg_accounts values ('','$account_lid','','" . time() . 
"')",__LINE__,__FILE__);
-                               $this->db->unlock();
+                               $this->db->transaction_commit();
                                
$GLOBALS['phpgw']->session->appsession('loginid','registration',$account_lid);
                                return False;
                        }
@@ -52,20 +54,14 @@
 
                function step2($fields)
                {
-                       global $config, $SERVER_NAME;
-
                        $smtp = createobject('phpgwapi.send');
 
-                       // We are not going to use link(), because we may not 
have the same sessionid by that time
-                       // If we do, it will not affect it
-                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . "/registration/main.php";
-
                        $this->reg_id = md5(time() . $account_lid . 
$GLOBALS['phpgw']->common->randomstring(32));
                        $account_lid  = 
$GLOBALS['phpgw']->session->appsession('loginid','registration');
 
-                       $GLOBALS['phpgw']->db->query("update phpgw_reg_accounts 
set reg_id='" . $this->reg_id . "', reg_dla='"
+                       $this->db->query("UPDATE phpgw_reg_accounts SET 
reg_id='" . $this->reg_id . "', reg_dla='"
                                . time() . "', reg_info='" . 
base64_encode(serialize($fields))
-                               . "' where 
reg_lid='$account_lid'",__LINE__,__FILE__);
+                               . "' WHERE 
reg_lid='$account_lid'",__LINE__,__FILE__);
 
                        $GLOBALS['phpgw']->template->set_file(array(
                                'message' => 'confirm_email.tpl'
@@ -81,18 +77,20 @@
                                $GLOBALS['phpgw']->template->set_var 
('lastname', $fields['n_family'] . ' ');
                        }
 
-                       $GLOBALS['phpgw']->template->set_var 
('activate_url',$url . '?menuaction=registration.boreg.step4&reg_id='. 
$this->reg_id);
 
-                       if ($config['support_email'])
+                       $url = 
$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=> 
'registration.boreg.step4', 'reg_id'=> $this->reg_id),false,true);
+                       
$GLOBALS['phpgw']->template->set_var('activate_url',"</br><a 
href='$url'>Link.</a></br>");
+
+                       if ($this->config['support_email'])
                        {
                                $GLOBALS['phpgw']->template->set_var 
('support_email_text', lang ('Report all problems and abuse to'));
-                               $GLOBALS['phpgw']->template->set_var 
('support_email', $config['support_email']);
+                               $GLOBALS['phpgw']->template->set_var 
('support_email', $this->config['support_email']);
                        }
 
-                       $subject = $config['subject_confirm'] ? 
lang($config['subject_confirm']) : lang('Account registration');
-                       $noreply = $config['mail_nobody'] ? ('No reply <' . 
$config['mail_nobody'] . '>') : ('No reply <noreply@' . $SERVER_NAME . '>');
+                       $subject = $this->config['subject_confirm'] ? 
lang($this->config['subject_confirm']) : lang('Account registration');
+                       $noreply = $this->config['mail_nobody'] ? ('No reply <' 
. $this->config['mail_nobody'] . '>') : ('No reply <noreply@' . 
$GLOBALS['phpgw_info']['server']['hostname'] . '>');
 
-                       
$smtp->msg('email',$fields['email'],$subject,$GLOBALS['phpgw']->template->fp('out','message'),'','','',$noreply);
+                       
$smtp->msg('email',$fields['email'],$subject,$GLOBALS['phpgw']->template->fp('out','message'),'','','',$noreply,'','html');
 
                        return $this->reg_id;
                }
@@ -102,45 +100,70 @@
                //
                function lostpw1($account_lid)
                {
-                       global $SERVER_NAME, $config;
-
-                       $url = 
$GLOBALS['phpgw_info']['server']['webserver_url'] . "/registration/main.php";
-
                        $error = '';
-
                        //
                        // Remember md5 string sent by mail
                        //
                        $reg_id = md5(time() . $account_lid . 
$GLOBALS['phpgw']->common->randomstring(32));
-                       $this->db->query("insert into phpgw_reg_accounts values 
('$reg_id','$account_lid','','" . time() . "')",__LINE__,__FILE__);
+                       $this->db->query("INSERT INTO phpgw_reg_accounts VALUES 
('$reg_id','$account_lid','','" . time() . "')",__LINE__,__FILE__);
 
                        //
                        // Send the mail that will allow to change the password
                        //
-                       $GLOBALS['phpgw']->db->query("select * from 
phpgw_accounts, phpgw_addressbook where account_lid='$account_lid' and 
phpgw_addressbook.lid='*$account_lid*'",__LINE__,__FILE__);
-                       $GLOBALS['phpgw']->db->next_record();
 
+                       $user_id = 
$GLOBALS['phpgw']->accounts->name2id($account_lid);
+                       $account_info = 
$GLOBALS['phpgw']->accounts->get($user_id);
+
+                       $contacts = CreateObject('phpgwapi.contacts');
+
+                       $qcols = array
+                       (
+                               'n_given'    => 'n_given',
+                               'n_family'   => 'n_family',
+                               'tel_work'   => 'tel_work',
+                               'tel_home'   => 'tel_home',
+                               'tel_cell'   => 'tel_cell',
+                               'title'      => 'title',
+                               'email'      => 'email',
+                               'email_home' => 'email_home',
+                       );
+
+                       $fields = 
$contacts->are_users($account_info->person_id, $qcols);
+
+                       $this->boaddressbook  = 
CreateObject('addressbook.boaddressbook');
+                       $comms = 
$this->boaddressbook->get_comm_contact_data($fields[0]['contact_id']);
+
+                       if(is_array($comms) && 
isset($comms[$fields[0]['contact_id']]) )
+                       {
+                               $fields[0]['tel_work'] = 
$comms[$fields[0]['contact_id']]['work phone'];
+                               $fields[0]['tel_home'] = 
$comms[$fields[0]['contact_id']]['home phone'];
+                               $fields[0]['tel_cell'] = 
$comms[$fields[0]['contact_id']]['mobile (cell) phone'];
+                               $fields[0]['email_home'] = 
$comms[$fields[0]['contact_id']]['home email'];
+                       }
+
                        $info = array(
-                               'firstname' => 
$GLOBALS['phpgw']->db->f('account_firstname'),
-                               'lastname' => 
$GLOBALS['phpgw']->db->f('account_lastname'),
-                               'email' => $GLOBALS['phpgw']->db->f('email')
+                               'firstname' => $account_info->firstname,
+                               'lastname' => $account_info->lastname,
+                               'email' => 
$comms[$account_info->person_id]['work email']
                        );
 
-                       if ($GLOBALS['phpgw']->db->f('account_lid'))
+                       if ($info['email'])
                        {
                                $smtp = createobject('phpgwapi.send');
 
                                $GLOBALS['phpgw']->template->set_file(array(
                                        'message' => 'lostpw_email.tpl'
                                ));
+
+                               $url = 
$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=> 
'registration.boreg.lostpw2', 'reg_id'=> $reg_id),false,true);
                                
$GLOBALS['phpgw']->template->set_var('firstname',$info['firstname']);
                                
$GLOBALS['phpgw']->template->set_var('lastname',$info['lastname']);
-                               
$GLOBALS['phpgw']->template->set_var('activate_url',$url . 
'?menuaction=registration.boreg.lostpw2&reg_id=' . $reg_id);
+                               
$GLOBALS['phpgw']->template->set_var('activate_url',"</br><a 
href='$url'>Link.</a></br>");
 
-                               $subject = $config['subject_lostpw'] ? 
lang($config['subject_lostpw']) : lang('Account password retrieval');
-                               $noreply = $config['mail_nobody'] ? ('No reply 
<' . $config['mail_nobody'] . '>') : ('No reply <noreply@' . $SERVER_NAME . 
'>');
+                               $subject = $this->config['subject_lostpw'] ? 
lang($this->config['subject_lostpw']) : lang('Account password retrieval');
+                               $noreply = $this->config['mail_nobody'] ? ('No 
reply <' . $this->config['mail_nobody'] . '>') : ('No reply <noreply@' . 
$GLOBALS['phpgw_info']['server']['hostname'] . '>');
 
-                               
$smtp->msg('email',$info['email'],$subject,$GLOBALS['phpgw']->template->fp('out','message'),'','','',$noreply);
+                               
$smtp->msg('email',$info['email'],$subject,$GLOBALS['phpgw']->template->fp('out','message'),'','','',$noreply,'',
 'html');
                        }
                        else
                        {
@@ -155,9 +178,9 @@
                //
                function lostpw2($account_lid)
                {
-                       $GLOBALS['phpgw']->db->query("select account_id from 
phpgw_accounts where account_lid='$account_lid'",__LINE__,__FILE__);
-                       $GLOBALS['phpgw']->db->next_record();
-                       $account_id = $GLOBALS['phpgw']->db->f('account_id');
+                       $this->db->query("SELECT account_id FROM phpgw_accounts 
WHERE account_lid='$account_lid'",__LINE__,__FILE__);
+                       $this->db->next_record();
+                       $account_id = $this->db->f('account_id');
 
                        
$GLOBALS['phpgw']->session->appsession('loginid','registration',$account_lid);
                        
$GLOBALS['phpgw']->session->appsession('id','registration',$account_id);
@@ -171,21 +194,21 @@
                        $auth = createobject('phpgwapi.auth');
                        $auth->change_password('supposed to be old password', 
$passwd, $GLOBALS['phpgw']->session->appsession('id','registration'));
 
-                       $GLOBALS['phpgw']->db->query("delete from 
phpgw_reg_accounts where reg_lid='$account_lid'",__LINE__,__FILE__);
+                       $this->db->query("DELETE FROM phpgw_reg_accounts WHERE 
reg_lid='$account_lid'",__LINE__,__FILE__);
                }
 
                function valid_reg($reg_id)
                {
-                       $GLOBALS['phpgw']->db->query("select * from 
phpgw_reg_accounts where reg_id='$reg_id'",__LINE__,__FILE__);
-                       $GLOBALS['phpgw']->db->next_record();
+                       $this->db->query("SELECT * FROM phpgw_reg_accounts 
WHERE reg_id='$reg_id'",__LINE__,__FILE__);
+                       $this->db->next_record();
 
-                       if ($GLOBALS['phpgw']->db->f('reg_id'))
+                       if ($this->db->f('reg_id'))
                        {
                                return array(
-                                       'reg_id'   => 
$GLOBALS['phpgw']->db->f('reg_id'),
-                                       'reg_lid'  => 
$GLOBALS['phpgw']->db->f('reg_lid'),
-                                       'reg_info' => 
$GLOBALS['phpgw']->db->f('reg_info'),
-                                       'reg_dla'  => 
$GLOBALS['phpgw']->db->f('reg_dla')
+                                       'reg_id'   => $this->db->f('reg_id'),
+                                       'reg_lid'  => $this->db->f('reg_lid'),
+                                       'reg_info' => $this->db->f('reg_info'),
+                                       'reg_dla'  => $this->db->f('reg_dla')
                                );
                        }
                        else
@@ -196,74 +219,119 @@
 
                function delete_reg_info($reg_id)
                {
-                       $this->db->query("delete from phpgw_reg_accounts where 
reg_id='$reg_id'",__LINE__,__FILE__);
+                       $this->db->query("DELETE FROM phpgw_reg_accounts WHERE 
reg_id='$reg_id'",__LINE__,__FILE__);
                }
 
                function create_account($account_lid,$_reg_info)
                {
-                       global $config, $reg_info;
-
                        $fields             = 
unserialize(base64_decode($_reg_info));
-                       $fields['lid'] = "*$account_lid*";
+//_debug_array($fields);
+                       $fields['lid']          = "*$account_lid*";
 
-                       $reg_info['lid']    = $account_lid;
-                       $reg_info['fields'] = $fields;
+                       $default_group_id = $this->config['default_group_id'];
+                       
+                       $group_id =  $default_group_id ? $default_group_id : 
$GLOBALS['phpgw']->accounts->name2id('default');
 
-                       $account_id = 
$GLOBALS['phpgw_info']['user']['account_id'] = 
$GLOBALS['phpgw']->accounts->auto_add($account_lid,$fields['passwd'],True,False,0,'A');
+                       if (!$GLOBALS['phpgw']->accounts->exists($account_lid) )
+                       {       
+                               $account                        = new 
phpgwapi_user();
+                               $account->lid           = $account_lid;
+                               $account->firstname     = $fields['n_given'];
+                               $account->lastname      = $fields['n_family'];
+                               $account->passwd        = $fields['passwd'];
+                               $account->enabled       = true;
 
+                               if ($this->config['trial_accounts'])
+                               {
+                                       $account->expires = time() + ((60 * 60) 
* ($this->config['days_until_trial_account_expires'] * 24));
+                               }
+                               else
+                               {
+                                       $account->expires = -1;
+                               }
+
+                               $account_id =  
$GLOBALS['phpgw']->accounts->create($account, array($group_id), array(), 
array());
+                               if($account_id)
+                               {
+                                       
$GLOBALS['phpgw']->log->write(array('text'=>'I-Notification, user created 
%1','p1'=> $account_lid));
+                               }
+                       }
+
                        if (!$account_id)
                        {
                                return False;
                        }
 
-                       $accounts   = 
createobject('phpgwapi.accounts',$account_id);
                        $contacts   = createobject('phpgwapi.contacts');
 
                        $GLOBALS['phpgw']->db->transaction_begin();
-                       $accounts->read();
-                       $accounts->data['firstname'] = $fields['n_given'];
-                       $accounts->data['lastname']  = $fields['n_family'];
-                       $accounts->save_repository();
 
-                       $contact_fields = $fields;
+                       $primary = array
+                       (
+       //                      'per_prefix'            => 'Mr',
+       //                      'per_title'                     => 
'FDV-RÃ¥dgiver',
+       //                      'per_department'        => 'Utbygging',
+                               'per_first_name'        => $account->firstname,
+                               'per_last_name'         => $account->lastname,
+                               'access'                        => 'public',
+                               'owner'                         => 
$GLOBALS['phpgw_info']['server']['addressmaster']
+                       );
 
-                       if ($contact_fields['bday_day'])
+                       if ($fields['bday_day'])
                        {
-                               $contact_fields['bday'] = 
$contact_fields['bday_month'] . '/' . $contact_fields['bday_day'] . '/' . 
$contact_fields['bday_year'];
+                               $primary['per_birthday'] = 
"{$fields['bday_year']}-{$fields['bday_month']}-{$fields['bday_day']}"; 
//date('Y-m-d',time()),
                        }
 
-                       /* There are certain things we don't want stored in 
contacts */
-                       unset ($contact_fields['passwd']);
-                       unset ($contact_fields['passwd_confirm']);
-                       unset ($contact_fields['bday_day']);
-                       unset ($contact_fields['bday_month']);
-                       unset ($contact_fields['bday_year']);
+                       $location = array
+                       (
+               //              'addr_type',
+                               'addr_add1'             => 
$fields['adr_one_street'],
+               //              'addr_add2',
+                               'addr_city'             => 
$fields['adr_one_locality'],
+               //              'addr_state',
+                               'addr_postal_code'      => 
$fields['adr_one_postalcode'],
+                               'addr_country'          => 
$fields['adr_one_countryname'],
+                               'addr_preferred'        => 'Y',
+               //              'addr_description'      => 'Heime'
+                       );
+                               
+                       $locations = array($location);
 
-                       /* Don't store blank values either */
-                       reset ($contact_fields);
-                       while (list ($num, $field) = each ($contact_fields))
-                       {
-                               if (!$contact_fields[$num])
-                               {
-                                       unset ($contact_fields[$num]);
-                               }
-                       }
 
-                       $contacts->add($account_id,$contact_fields,0,'P');
+                       $type = $contacts->search_contact_type('Persons');
 
+                       $comm1 = array
+                       (
+                               'comm_descr'            => 
$contacts->search_comm_descr('work email'),
+                               'comm_data'                     => 
$fields['email'],
+                               'comm_preferred'        => 'Y'
+                       );
+
+                       $comm2 = array
+                       (
+                               'comm_descr'            => 
$contacts->search_comm_descr('work phone'),
+                               'comm_data'                     => 
$fields['tel_work'],
+                               'comm_preferred'        => 'N'
+                       );
+
+                       $comms = array($comm1,$comm2);
+/*
+_debug_array($type);
+_debug_array($primary);
+_debug_array($comms);
+_debug_array($locations);
+*/
+                       $person_id = $contacts->add_contact($type, $primary, 
$comms, $locations);
+
                        $GLOBALS['phpgw']->db->transaction_commit();
+                       $GLOBALS['phpgw']->accounts->set_account($account_id);
+                       $GLOBALS['phpgw']->accounts->read_repository();
 
-                       $accounts->read();
-                       if ($config['trial_accounts'])
-                       {
-                               $accounts->data['expires'] = time() + ((60 * 
60) * ($config['days_until_trial_account_expires'] * 24));
-                       }
-                       else
-                       {
-                               $accounts->data['expires'] = -1;
-                       }
-                       $accounts->data['status'] = 'A';
-                       $accounts->save_repository();
+                       $account = 
$GLOBALS['phpgw']->accounts->get($account_id);
+                       $account->person_id = $person_id;
+                       
+                       $GLOBALS['phpgw']->accounts->account = $account;
+                       $GLOBALS['phpgw']->accounts->save_repository();
 
                        if(@stat(PHPGW_SERVER_ROOT . 
'/messenger/inc/hook_registration.inc.php'))
                        {

Modified: 
branches/Version-1_0-branch/registration/inc/class.uimanagefields.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.uimanagefields.inc.php   
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.uimanagefields.inc.php   
2012-03-14 07:49:14 UTC (rev 8976)
@@ -38,18 +38,20 @@
                        unset ($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset ($GLOBALS['phpgw_info']['flags']['nonavbar']);
                        $GLOBALS['phpgw_info']['flags']['noappfooter'] = True;
-                       $GLOBALS['phpgw']->common->phpgw_header ();
+                       $GLOBALS['phpgw']->common->phpgw_header();
+                       echo parse_navbar();
 
                        $p = $GLOBALS['phpgw']->template;
+                       $p->set_root(PHPGW_APP_TPL);
                        $p->set_file(Array('fields'=>'fields.tpl'));
 
                        if (!isset ($message))
                        {
-                               $message = get_var('messages',Array('GET'));
+                               $message     = phpgw::get_var('message', 
'string', 'GET');
                        }
 
                        $var = array (
-                               'action_url' => $GLOBALS['phpgw']->link 
($this->base_url, 'menuaction=registration.uimanagefields.submit'),
+                               'action_url' => $GLOBALS['phpgw']->link 
($this->base_url, array('menuaction' => 'registration.uimanagefields.submit')),
                                'message'    => $message,
                                'lang_current_fields' => lang ('Current 
fields:'),
                                'lang_name_and_shortdesc' => lang ('Name (blank 
unless Text, Textarea, Dropdown, Checkbox; else alphanumeric only)'),
@@ -129,7 +131,7 @@
                                );
 
                                $p->set_var ($var);
-                               $p->parse ('info_list', 'info', True);
+                               $p->parse('info_list', 'info', True);
                        }
 
                        /* Add an empty entry line */
@@ -169,7 +171,7 @@
                {
                        $this->bo->check_admin ();
 
-                       $post_vars = $GLOBALS['HTTP_POST_VARS'];
+                       $post_vars = $_POST;
 
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
@@ -177,7 +179,6 @@
 
                        $this->bo->submit ($post_vars);
 
-                       Header ('Location: ' . $GLOBALS['phpgw']->link 
($this->base_url, 
'menuaction=registration.uimanagefields.admin&message=Updated'));
+                       $GLOBALS['phpgw']->redirect_link($this->base_url, 
array('menuaction'=>'registration.uimanagefields.admin', 'message'=>'Updated'));
                }
        }
-?>

Modified: branches/Version-1_0-branch/registration/inc/class.uireg.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/inc/class.uireg.inc.php    
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/inc/class.uireg.inc.php    
2012-03-14 07:49:14 UTC (rev 8976)
@@ -22,6 +22,7 @@
                var $bomanagefields;
                var $fields;
                var $bo;
+               var $config;
                var $public_functions = array(
                        'step1'   => True,
                        'step2'   => True,
@@ -38,7 +39,8 @@
                        $this->template = $GLOBALS['phpgw']->template;
                        $this->bo = createobject ('registration.boreg');
                        $this->bomanagefields = createobject 
('registration.bomanagefields');
-                       $this->fields = $this->bomanagefields->get_field_list 
();
+                       $this->fields = $this->bomanagefields->get_field_list();
+                       $this->config = $this->bo->config;
                }
 
                function set_header_footer_blocks()
@@ -53,7 +55,7 @@
                function header()
                {
                        $this->set_header_footer_blocks();
-                       
$this->template->set_var('lang_header',lang('phpGroupWare - Account 
registration'));
+                       $this->template->set_var('lang_header', 
$GLOBALS['phpgw_info']['server']['system_name'] . ' - ' . lang('Account 
registration'));
                        $this->template->pfp('out','header');
                }
 
@@ -64,16 +66,14 @@
 
                function step1($errors = '',$r_reg = '',$o_reg = '')
                {
-                       global $config;
-
-                       if ($errors && $config['username_is'] == 'http')
+                       if ($errors && $this->config['username_is'] == 'http')
                        {
                                $this->simple_screen ('error_general.tpl', 
$GLOBALS['phpgw']->common->error_list ($errors));
                        }
 
                        $show_username_prompt = True;
-                       /* Note that check_select_username () may not return */
-                       $select_username = $this->bo->check_select_username ();
+                       /* Note that check_select_username() may not return */
+                       $select_username = $this->bo->check_select_username();
                        if (!$select_username || is_string ($select_username))
                        {
                                $this->simple_screen ('error_general.tpl', 
$GLOBALS['phpgw']->common->error_list (array ($select_username)));
@@ -90,7 +90,7 @@
                                
$this->template->set_var('errors',$GLOBALS['phpgw']->common->error_list($errors));
                        }
 
-                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php','menuaction=registration.boreg.step1'));
+                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=>'registration.boreg.step1')));
                        
$this->template->set_var('lang_username',lang('Username'));
                        $this->template->set_var('lang_submit',lang('Submit'));
 
@@ -101,10 +101,8 @@
 
                function step2($errors = '',$r_reg = '',$o_reg = 
'',$missing_fields='')
                {
-                       global $config;
-
                        $show_password_prompt = True;
-                       $select_password = $this->bo->check_select_password ();
+                       $select_password = $this->bo->check_select_password();
                        if (is_string ($select_password))
                        {
                                $this->simple_screen ('error_general.tpl', 
$select_password);
@@ -152,7 +150,7 @@
                                }
                        }
 
-                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php','menuaction=registration.boreg.step2'));
+                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=>'registration.boreg.step2')));
                        
$this->template->set_var('lang_password',lang('Password'));
                        
$this->template->set_var('lang_reenter_password',lang('Re-enter password'));
                        $this->template->set_var('lang_submit',lang('Submit'));
@@ -181,7 +179,7 @@
                                $this->template->parse ('other_fields_list', 
'other_fields_proto', True);
                        }
 
-                       if ($config['display_tos'])
+                       if ($this->config['display_tos'])
                        {
                        
$this->template->set_var('tos_link',$GLOBALS['phpgw']->link('/registration/main.php',
 array('menuaction' => 'registration.uireg.tos')));
                        $this->template->set_var('lang_tos_agree',lang('I have 
read the terms and conditions and agree by them.'));
@@ -215,7 +213,7 @@
                                
$this->template->set_var('errors',$GLOBALS['phpgw']->common->error_list($errors));
                        }
 
-                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php','menuaction=registration.boreg.lostpw1'));
+                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=>'registration.boreg.lostpw1')));
                        $this->template->set_var('lang_explain',lang('After you 
enter your username, instructions to change your password will be sent to you 
by e-mail to the address you gave when you registered.'));
                        
$this->template->set_var('lang_username',lang('Username'));
                        $this->template->set_var('lang_submit',lang('Submit'));
@@ -240,7 +238,7 @@
                                
$this->template->set_var('errors',$GLOBALS['phpgw']->common->error_list($errors));
                        }
 
-                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php','menuaction=registration.boreg.lostpw3'));
+                       
$this->template->set_var('form_action',$GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=>'registration.boreg.lostpw3')));
                        $this->template->set_var('value_username', $lid);
                        
$this->template->set_var('lang_changepassword',lang("Change password for 
user"));
                        
$this->template->set_var('lang_enter_password',lang('Enter your new password'));
@@ -268,7 +266,7 @@
 
                function get_input_field ($field_info, $post_values)
                {
-                       global $r_regs, $o_regs;
+//                     global $r_regs, $o_regs;
 
                        $post_value = $post_values[$field_info['field_name']];
 
@@ -355,12 +353,12 @@
 
                        if ($type == 'state')
                        {
-                               $rstring = $sbox->list_states ($a . '[' . $name 
. ']', $post_value);
+//                             $rstring = $sbox->list_states ($a . '[' . $name 
. ']', $post_value);
                        }
 
                        if ($type == 'country')
                        {
-                               $rstring = $sbox->form_select ($post_value, $a 
. '[' . $name . ']');
+                               $rstring = $sbox->country_select($post_value, 
$a . '[' . $name . ']');
                        }
 
                        if ($type == 'birthday')
@@ -392,16 +390,17 @@
 
                function ready_to_activate()
                {
-                       global $config, $reg_id;
+//                     global $reg_id;
+                       $reg_id = phpgw::get_var('reg_id');
 
-                       if ($config['activate_account'] == 'email')
+                       if ($this->config['activate_account'] == 'email')
                        {
                                $this->simple_screen('confirm_email_sent.tpl');
                        }
                        else
                        {
-                               /* ($config['activate_account'] == 
'immediately') */
-                               
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/registration/main.php','menuaction=registration.boreg.step4&reg_id='
 . $reg_id));
+                               /* ($this->config['activate_account'] == 
'immediately') */
+                               
$GLOBALS['phpgw']->redirect($GLOBALS['phpgw']->link('/registration/main.php',array('menuaction'=>'registration.boreg.step4',
 'reg_id' => $reg_id)));
                        }
                }
 

Copied: branches/Version-1_0-branch/registration/inc/hook_config.inc.php (from 
rev 8975, trunk/registration/inc/hook_config.inc.php)
===================================================================
--- branches/Version-1_0-branch/registration/inc/hook_config.inc.php            
                (rev 0)
+++ branches/Version-1_0-branch/registration/inc/hook_config.inc.php    
2012-03-14 07:49:14 UTC (rev 8976)
@@ -0,0 +1,58 @@
+<?php
+       /**
+       * Property - configuration hook
+       *
+       * @author Sigurd Nes <address@hidden>
+       * @copyright Copyright (C) 2012 Free Software Foundation, Inc. 
http://www.fsf.org/
+       * @license http://www.gnu.org/licenses/gpl.html GNU General Public 
License
+       * @package phpgroupware
+       * @subpackage property
+       * @category hooks
+       * @version $Id: hook_config.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/>.
+       */
+
+
+       /**
+       * Get HTML listbox with workorder status that are to be set when 
invoice is processed
+       *
+       * @param $config
+       * @return string HTML checkboxes to be placed in a table
+       */
+       function default_group($config)
+       {
+               $groups = $GLOBALS['phpgw']->accounts->get_list('groups');
+
+               $_selected = isset($config['default_group_id']) ? 
$config['default_group_id'] : '';
+
+               $out = '<option value="">' . lang('none selected') . 
'</option>' . "\n";
+               foreach ( $groups as $group => $label)
+               {
+                       $selected = '';
+                       if ( $_selected == $group)
+                       {
+                               $selected = 'selected =  "selected"';
+                       }
+
+                       $out .=  <<<HTML
+                       <option value='{$group}'{$selected}>{$label}</option>
+HTML;
+               }
+
+               return $out;
+       }
+

Modified: branches/Version-1_0-branch/registration/main.php
===================================================================
--- branches/Version-1_0-branch/registration/main.php   2012-03-13 18:33:18 UTC 
(rev 8975)
+++ branches/Version-1_0-branch/registration/main.php   2012-03-14 07:49:14 UTC 
(rev 8976)
@@ -1,192 +1,236 @@
-<?php
-       
/**************************************************************************\
-       * phpGroupWare - Registration                                           
   *
-       * http://www.phpgroupware.org                                           
   *
-       * This application written by Joseph Engo <address@hidden>         *
-       * --------------------------------------------                          
   *
-       * Funding for this program was provided by http://www.checkwithmom.com  
   *
-       * --------------------------------------------                          
   *
-       *  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.                                           
   *
-       
\**************************************************************************/
-
-       /* $Id$ */
-
-       /*
-       ** This program is non-standard, we will create and manage our sessions 
manually.
-       ** We don't want users to be kicked out half way through, and we really 
don't need a true
-       ** session for it.
-       */
-
-       $GLOBALS['sessionid'] = get_var('sessionid',Array('COOKIE','GET'));
-
-       // Note: This is current not a drop in install, it requires some manual 
installation
-       //       Take a look at the README file
-       $domain         = 'default';
-       $template_set   = 'checkwithmom';
-
-       if ($menuaction)
-       {
-               list($app,$class,$method) = explode('.',$menuaction);
-               if (! $app || ! $class || ! $method)
-               {
-                       $invaild_data = True;
-               }
-       }
-       else
-       {
-               $app = 'registration';
-               $invaild_data = True;
-       }
-
-       $phpgw_info['flags'] = array(
-               'noheader'   => True,
-               'nonavbar'   => True,
-               'noapi'      => True,
-               'currentapp' => $app
-       );
-       include('../header.inc.php');
-
-       function CreateObject($classname, $constructor_param = '')
-       {
-               global $phpgw, $phpgw_info, $phpgw_domain;
-               $classpart = explode (".", $classname);
-               $appname = $classpart[0];
-               $classname = $classpart[1];
-               if (!isset($phpgw_info['flags']['included_classes'][$classname])
-               || !$phpgw_info['flags']['included_classes'][$classname])
-               {
-                       $phpgw_info['flags']['included_classes'][$classname] = 
True;   
-                       
include(PHPGW_INCLUDE_ROOT.'/'.$appname.'/inc/class.'.$classname.'.inc.php');
-               }
-               if ($constructor_param == '')
-               {
-                       $obj = new $classname;
-               }
-               else
-               {
-                       $obj = new $classname($constructor_param);
-               }
-               return $obj;
-       }
-
-       /*!
-       @function lang
-       @abstract function to deal with multilanguage support
-       */
-       function lang($key, $m1='', $m2='', $m3='', $m4='', $m5='', $m6='', 
$m7='', $m8='', $m9='', $m10='') 
-       {
-               global $phpgw;
-               $vars  = array($m1,$m2,$m3,$m4,$m5,$m6,$m7,$m8,$m9,$m10);
-               $value = $phpgw->translation->translate($key,$vars);
-               return $value;
-       }
-
-       function get_account_id($account_id = '',$default_id = '')
-       {
-               global $phpgw, $phpgw_info;
-
-               if (gettype($account_id) == 'integer')
-               {
-                       return $account_id;
-               }
-               elseif ($account_id == '')
-               {
-                       if ($default_id == '')
-                       {
-                               return $phpgw_info['user']['account_id'];
-                       }
-                       elseif (gettype($default_id) == 'string')
-                       {
-                               return $phpgw->accounts->name2id($default_id);
-                       }
-                       return intval($default_id);
-               }
-               elseif (gettype($account_id) == 'string')
-               {
-                       if($phpgw->accounts->exists(intval($account_id)) == 
True)
-                       {
-                               return intval($account_id);
-                       }
-                       else
-                       {
-                               return $phpgw->accounts->name2id($account_id);
-                       }
-               }
-       }
-
-       $phpgw_info['server'] = $phpgw_domain[$domain];
-       $phpgw                = createobject('phpgwapi.phpgw');
-       $phpgw->db            = createobject('phpgwapi.db');
-       $phpgw->db->Host      = $phpgw_info['server']['db_host'];
-       $phpgw->db->Type      = $phpgw_info['server']['db_type'];
-       $phpgw->db->Database  = $phpgw_info['server']['db_name'];
-       $phpgw->db->User      = $phpgw_info['server']['db_user'];
-       $phpgw->db->Password  = $phpgw_info['server']['db_pass'];
-
-       /* Fill phpgw_info["server"] array */
-       $phpgw->db->query("select * from phpgw_config WHERE 
config_app='phpgwapi'",__LINE__,__FILE__);
-       while ($phpgw->db->next_record())
-       {
-               $phpgw_info['server'][$phpgw->db->f('config_name')] = 
stripslashes($phpgw->db->f('config_value'));
-       }
-       $phpgw_info['server']['template_set'] = $template_set;
-
-       $phpgw->common        = createobject('phpgwapi.common');
-       $phpgw->auth          = createobject('phpgwapi.auth');
-       $phpgw->accounts      = createobject('phpgwapi.accounts');
-       $phpgw->acl           = createobject('phpgwapi.acl');
-       $phpgw->preferences   = createobject('phpgwapi.preferences');
-       $phpgw->applications  = createobject('phpgwapi.applications');
-       $phpgw->hooks         = createobject('phpgwapi.hooks');
-       $phpgw->session       = createobject('phpgwapi.sessions');
-
-       $phpgw->common->key  = md5($GLOBALS['kp3'] . $GLOBALS['sessionid'] . 
$phpgw_info['server']['encryptkey']);
-       $phpgw->common->iv   = $phpgw_info['server']['mcrypt_iv'];
-
-       $cryptovars[0] = $phpgw->common->key;
-       $cryptovars[1] = $phpgw->common->iv;
-       $phpgw->crypto = createobject('phpgwapi.crypto', $cryptovars);
-
-       define('PHPGW_APP_ROOT', $phpgw->common->get_app_dir());
-       define('PHPGW_APP_INC', $phpgw->common->get_inc_dir());
-       define('PHPGW_APP_TPL', $phpgw->common->get_tpl_dir());
-       define('PHPGW_IMAGES', $phpgw->common->get_image_path());
-       define('PHPGW_IMAGES_DIR', $phpgw->common->get_image_dir());
-
-       $phpgw->template      = createobject('phpgwapi.Template',PHPGW_APP_TPL);
-       $phpgw->translation   = createobject('phpgwapi.translation');
-
-       $c = createobject('phpgwapi.config','registration');
-       $c->read();
-       $config = $c->config_data;
-
-       if (! $sessionid)
-       {
-               $sessionid = $phpgw->session->create($config['anonymous_user'] 
. '@' . $domain,$config['anonymous_pass']);
-       }
-       else
-       {
-               if (! $phpgw->session->verify())
-               {
-                       // Lets hope this works
-                       $sessionid = 
$phpgw->session->create($config['anonymous_user'] . '@' . 
$domain,$config['anonymous_pass']);
-               }
-       }
-
-       if ($app && $class)
-       {
-               $obj = createobject(sprintf('%s.%s',$app,$class));
-
-               if ((is_array($obj->public_functions) && 
$obj->public_functions[$method]) && ! $invalid_data)
-               {
-                       eval("\$obj->$method();");
-               }
-       }
-       else
-       {
-               $_obj = createobject('registration.uireg');
-               $_obj->step1();
-       }
+<?php
+       
/**************************************************************************\
+       * phpGroupWare - Registration                                           
   *
+       * http://www.phpgroupware.org                                           
   *
+       * This application written by Joseph Engo <address@hidden>         *
+       * --------------------------------------------                          
   *
+       * Funding for this program was provided by http://www.checkwithmom.com  
   *
+       * --------------------------------------------                          
   *
+       *  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.                                           
   *
+       
\**************************************************************************/
+
+       /* $Id$ */
+
+       /*
+       ** This program is non-standard, we will create and manage our sessions 
manually.
+       ** We don't want users to be kicked out half way through, and we really 
don't need a true
+       ** session for it.
+       */
+
+       // Note: This is current not a drop in install, it requires some manual 
installation
+       //       Take a look at the README file
+       $domain         = 'default';
+       $template_set   = 'checkwithmom';
+
+
+       $_GET['domain'] = $domain;
+
+    $GLOBALS['phpgw_info']['flags'] = array(
+        'noheader'             => true,
+        'nonavbar'             => true,
+        'currentapp'   => 'login',
+               'noapi'         => true         // this stops header.inc.php to 
include phpgwapi/inc/function.inc.php
+    );
+    
+    $GLOBALS['phpgw_info']['flags']['session_name'] = 'registration_session';
+       $GLOBALS['phpgw_remote_user_fallback'] = 'sql';
+       include_once('../header.inc.php');
+
+       unset($GLOBALS['phpgw_info']['flags']['noapi']);
+
+       $_domain_info = isset($GLOBALS['phpgw_domain'][$_GET['domain']]) ? 
$GLOBALS['phpgw_domain'][$_GET['domain']] : '';
+
+       if(!$_domain_info)
+       {
+               echo "not a valid domain\n";
+               die();
+       }
+       else
+       {
+               $GLOBALS['phpgw_domain'] = array();
+               $GLOBALS['phpgw_domain'][$_GET['domain']] = $_domain_info;
+       }
+
+       include(PHPGW_API_INC.'/functions.inc.php');
+
+
+       // Make sure we're always logged in
+       if (!phpgw::get_var(session_name()) || 
!$GLOBALS['phpgw']->session->verify())
+       {
+
+               $c = createobject('phpgwapi.config','registration');
+               $c->read();
+               $config = $c->config_data;
+//_debug_array($config);die();
+
+               $login = $c->config_data['anonymous_user'];
+               $passwd = $c->config_data['anonymous_pass'];
+               $_POST['submitit'] = "";
+
+               $GLOBALS['sessionid'] = 
$GLOBALS['phpgw']->session->create($login, $passwd);
+               if(!$GLOBALS['sessionid'])
+               {
+                       $lang_denied = lang('Anonymous access not correctly 
configured');
+                       if($GLOBALS['phpgw']->session->reason)
+                       {
+                               $lang_denied = 
$GLOBALS['phpgw']->session->reason;
+                       }
+                       echo <<<HTML
+                               <div class="error">$lang_denied</div>
+HTML;
+                       $GLOBALS['phpgw']->common->phpgw_exit(True);
+               }
+       }
+       $GLOBALS['phpgw_info']['flags']['currentapp'] = 'registration';
+       
+       
/////////////////////////////////////////////////////////////////////////////
+// BEGIN Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+               
if(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) && 
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] !='en')
+               {
+                       
$GLOBALS['phpgw']->translation->set_userlang($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],
 true);
+               }
+
+               /* A few hacker resistant constants that will be used throught 
the program */
+               define('PHPGW_TEMPLATE_DIR', 
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi'));
+               define('PHPGW_IMAGES_DIR', 
ExecMethod('phpgwapi.phpgw.common.get_image_path', 'phpgwapi'));
+               define('PHPGW_IMAGES_FILEDIR', 
ExecMethod('phpgwapi.phpgw.common.get_image_dir', 'phpgwapi'));
+               define('PHPGW_APP_ROOT', 
ExecMethod('phpgwapi.phpgw.common.get_app_dir'));
+               define('PHPGW_APP_INC', 
ExecMethod('phpgwapi.phpgw.common.get_inc_dir'));
+               define('PHPGW_APP_TPL', 
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir'));
+               define('PHPGW_IMAGES', 
ExecMethod('phpgwapi.phpgw.common.get_image_path'));
+               define('PHPGW_APP_IMAGES_DIR', 
ExecMethod('phpgwapi.phpgw.common.get_image_dir'));
+
+       
/************************************************************************\
+       * Load the menuaction                                                   
 *
+       
\************************************************************************/
+               $GLOBALS['phpgw_info']['menuaction'] = 
phpgw::get_var('menuaction');
+               if(!$GLOBALS['phpgw_info']['menuaction'])
+               {
+                       unset($GLOBALS['phpgw_info']['menuaction']);
+               }
+
+               /********* This sets the user variables *********/
+               $GLOBALS['phpgw_info']['user']['private_dir'] = 
$GLOBALS['phpgw_info']['server']['files_dir']
+                       . '/users/'.$GLOBALS['phpgw_info']['user']['userid'];
+
+               /* This will make sure that a user has the basic default prefs. 
If not it will add them */
+               $GLOBALS['phpgw']->preferences->verify_basic_settings();
+
+               /********* Optional classes, which can be disabled for 
performance increases *********/
+               while ($phpgw_class_name = 
each($GLOBALS['phpgw_info']['flags']))
+               {
+                       if (ereg('enable_', $phpgw_class_name[0]))
+                       {
+                               $enable_class = str_replace('enable_', '', 
$phpgw_class_name[0]);
+                               $enable_class = str_replace('_class', '', 
$enable_class);
+                               $GLOBALS['phpgw']->$enable_class = 
createObject("phpgwapi.{$enable_class}");
+                       }
+               }
+               unset($enable_class);
+               reset($GLOBALS['phpgw_info']['flags']);
+
+               
/*************************************************************************\
+               * These lines load up the templates class                       
          *
+               
\*************************************************************************/
+               if ( 
!isset($GLOBALS['phpgw_info']['flags']['disable_Template_class'])
+                       || 
!$GLOBALS['phpgw_info']['flags']['disable_Template_class'] )
+               {
+                       $GLOBALS['phpgw']->template = 
createObject('phpgwapi.Template',PHPGW_APP_TPL);
+                       $GLOBALS['phpgw']->xslttpl = 
createObject('phpgwapi.xslttemplates',PHPGW_APP_TPL);
+               }
+
+               
/*************************************************************************\
+               * Verify that the users session is still active otherwise kick 
them out   *
+               
\*************************************************************************/
+               if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' && 
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'about')
+               {
+                       if (!$GLOBALS['phpgw']->acl->check('run', 
PHPGW_ACL_READ, $GLOBALS['phpgw_info']['flags']['currentapp']))
+                       {
+                               $GLOBALS['phpgw']->common->phpgw_header(true);
+                               
$GLOBALS['phpgw']->log->write(array('text'=>'W-Permissions, Attempted to access 
%1','p1'=>$GLOBALS['phpgw_info']['flags']['currentapp']));
+
+                               $lang_denied = lang('Access not permitted');
+                               echo <<<HTML
+                                       <div class="error">$lang_denied</div>
+
+HTML;
+                               $GLOBALS['phpgw']->common->phpgw_exit(True);
+                       }
+               }
+
+       //  Already called from sessions::verify
+       //      $GLOBALS['phpgw']->applications->read_installed_apps(); // to 
get translated app-titles
+
+               
/*************************************************************************\
+               * Load the header unless the developer turns it off             
          *
+               
\*************************************************************************/
+               if ( !isset($GLOBALS['phpgw_info']['flags']['noheader']) || 
!$GLOBALS['phpgw_info']['flags']['noheader'] )
+               {
+                       $inc_navbar = 
!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) || 
!$GLOBALS['phpgw_info']['flags']['nonavbar'];
+                       $GLOBALS['phpgw']->common->phpgw_header($inc_navbar);
+                       unset($inc_navbar);
+               }
+
+               
/*************************************************************************\
+               * Load the app include files if the exists                      
          *
+               
\*************************************************************************/
+               /* Then the include file */
+               if (! preg_match ("/phpgwapi/i", PHPGW_APP_INC) && 
file_exists(PHPGW_APP_INC . '/functions.inc.php') && 
!isset($GLOBALS['phpgw_info']['menuaction']))
+               {
+                       include_once(PHPGW_APP_INC . '/functions.inc.php');
+               }
+               if (address@hidden'phpgw_info']['flags']['noheader'] &&
+                       address@hidden'phpgw_info']['flags']['noappheader'] &&
+                       file_exists(PHPGW_APP_INC . '/header.inc.php') && 
!isset($GLOBALS['phpgw_info']['menuaction']))
+               {
+                       include_once(PHPGW_APP_INC . '/header.inc.php');
+               }
+
+/////////////////////////////////////////////////////////////////////////////
+// END Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+       if (isset($_GET['menuaction']))
+       {
+               list($app,$class,$method) = explode('.',$_GET['menuaction']);
+       }
+       else
+       {
+               $app = 'registration';
+               $class = 'uireg';
+               $method = 'step1';
+       }
+       $GLOBALS[$class] = CreateObject("{$app}.{$class}");
+
+       $invalid_data = false; //FIXME consider whether this should be computed 
as in the main index.php
+       if ( !$invalid_data 
+               && is_object($GLOBALS[$class])
+               && isset($GLOBALS[$class]->public_functions) 
+               && is_array($GLOBALS[$class]->public_functions) 
+               && isset($GLOBALS[$class]->public_functions[$method])
+               && $GLOBALS[$class]->public_functions[$method] )
+
+       {
+               if ( phpgw::get_var('X-Requested-With', 'string', 'SERVER') == 
'XMLHttpRequest'
+                        // deprecated
+                       || phpgw::get_var('phpgw_return_as', 'string', 'GET') 
== 'json' )
+               {
+                       // comply with RFC 4627
+                       header('Content-Type: application/json'); 
+                       $return_data = $GLOBALS[$class]->$method();
+                       echo json_encode($return_data);
+                       $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+                       $GLOBALS['phpgw']->common->phpgw_exit();
+               }
+               else
+               {
+                       $GLOBALS[$class]->$method();    
+                       $GLOBALS['phpgw']->common->phpgw_footer();
+               }
+       }
+

Modified: branches/Version-1_0-branch/registration/setup/setup.inc.php
===================================================================
--- branches/Version-1_0-branch/registration/setup/setup.inc.php        
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/setup/setup.inc.php        
2012-03-14 07:49:14 UTC (rev 8976)
@@ -28,13 +28,17 @@
        );
 
        /* The hooks this app includes, needed for hooks registration */
-       $setup_info['registration']['hooks'][]  = 'admin';
-       $setup_info['registration']['hooks'][]  = 'logout';
+       $setup_info['registration']['hooks'] = array
+       (
+               'menu'          => 'registration.menu.get_menu',
+               'config',
+               'logout'
+       );
 
+
        /* Dependencies for this app to work */
        $setup_info['registration']['depends'][] = array
        (
                'appname'  => 'phpgwapi',
                'versions' => Array('0.9.16', '0.9.17', '0.9.18')
        );
-?>

Modified: branches/Version-1_0-branch/registration/templates/base/config.tpl
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/config.tpl  
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/templates/base/config.tpl  
2012-03-14 07:49:14 UTC (rev 8976)
@@ -37,6 +37,14 @@
     </td>
    </tr>
    <tr>
+       <tr class="row_on">
+               <td>{lang_default_group}:</td>
+               <td>
+                       <select name="newsettings[default_group_id]">
+                               {hook_default_group}
+                       </select>
+               </td>
+       </tr>
    <tr bgcolor="{row_off}">
     <td>{lang_Activate_account}:</td>
     <td>

Modified: branches/Version-1_0-branch/registration/templates/base/fields.tpl
===================================================================
--- branches/Version-1_0-branch/registration/templates/base/fields.tpl  
2012-03-13 18:33:18 UTC (rev 8975)
+++ branches/Version-1_0-branch/registration/templates/base/fields.tpl  
2012-03-14 07:49:14 UTC (rev 8976)
@@ -6,10 +6,10 @@
 
 <!-- BEGIN list -->
 <table border="0" align="center" width="75%">
-  <tr bgcolor="{row_on}">
+  <tr class="{row_on}">
    <td colspan="7">{lang_current_fields}</td>
   </tr>
-  <tr bgcolor="{row_off}">
+  <tr class="{row_off}">
    <td width=5%>{lang_name_and_shortdesc}</td>
    <td>{lang_text}</td>
    <td>{lang_type}</td>
@@ -20,7 +20,7 @@
   </tr>
 
 <!-- BEGIN info -->
-  <tr bgcolor="{row_off}">
+  <tr class="{row_off}">
    <td><input type="text" name="{field_short_name}_name" size="10" 
value="{field_name}"></td>
    <td><input type="text" name="{field_short_name}_text" 
value="{field_text}"></td>
    <td><select name="{field_short_name}_type">




reply via email to

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