Ignore:
Timestamp:
05/08/12 16:50:30 (12 years ago)
Author:
niltonneto
Message:

Ticket #2185 - Correção da versão 2.2 replicada para o Trunk. Vide Ticket.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/contactcenter/inc/class.ui_preferences.inc.php

    r5912 r6140  
    2020                        'set_preferences' => true, 
    2121                ); 
    22                  
    23                 function index() 
    24                 { 
    25                         $GLOBALS['phpgw_info']['flags']['app_header'] = lang('ContactCenter').' - '.lang('Preferences'); 
    26                         $GLOBALS['phpgw']->common->phpgw_header(); 
    27                         echo parse_navbar(); 
    2822 
    29                         $GLOBALS['phpgw']->template->set_file(array('pref' => 'preferences.tpl')); 
    30  
    31                         /* Get Saved Preferences */ 
    32                         $actual = $this->get_preferences(); 
    33                          
    34                         /* Get the catalog options */ 
    35                         $pCatalog = CreateObject('contactcenter.bo_people_catalog'); 
    36                         $types = $pCatalog->get_all_connections_types(); 
    37                          
    38                         if (is_array($types)) 
    39                         { 
    40                                 $options_email = ''; 
    41                                 foreach($types as $id => $name) 
    42                                 { 
    43                                         $options_email .= '<option value="'.$id.'"'; 
    44                                          
    45                                         if ($actual['personCardEmail'] == $id) 
    46                                         { 
    47                                                 $options_email .= ' selected '; 
    48                                         } 
    49                                  
    50                                         $options_email .= '>'.$name."</option>\n"; 
    51                                 } 
    52                          
    53                                 $options_phone = ''; 
    54                                 foreach($types as $id => $name) 
    55                                 { 
    56                                         $options_phone .= '<option value="'.$id.'"'; 
    57                                          
    58                                         if ($actual['personCardPhone'] == $id) 
    59                                         { 
    60                                                 $options_phone .= ' selected '; 
    61                                         } 
    62                                  
    63                                         $options_phone .= '>'.$name."</option>\n"; 
    64                                 } 
    65                         } 
    66                         else 
    67                         { 
    68                                 $options_email = ''; 
    69                                 $options_phone = ''; 
    70                         } 
    71                          
    72                         if ($actual['displayConnector'] or !$actual['displayConnectorDefault']) 
    73                         { 
    74                                 $GLOBALS['phpgw']->template->set_var('displayConnector', 'checked'); 
    75                         } 
    76                         else 
    77                         { 
    78                                 $GLOBALS['phpgw']->template->set_var('displayConnector', ''); 
    79                         } 
    80                          
    81                         if ($actual['empNum']) 
    82                         { 
    83                                 $GLOBALS['phpgw']->template->set_var('empNum', 'checked'); 
    84                         } 
    85                         else 
    86                         { 
    87                                 $GLOBALS['phpgw']->template->set_var('empNum', ''); 
    88                         } 
    89  
    90                         if ($actual['cell']) 
    91                         { 
    92                                 $GLOBALS['phpgw']->template->set_var('cell', 'checked'); 
    93                         } 
    94                         else 
    95                         { 
    96                                 $GLOBALS['phpgw']->template->set_var('cell', ''); 
    97                         } 
    98  
    99                         if ($actual['department']) 
    100                         { 
    101                                 $GLOBALS['phpgw']->template->set_var('department', 'checked'); 
    102                         } 
    103                         else 
    104                         { 
    105                                 $GLOBALS['phpgw']->template->set_var('department', ''); 
    106                         } 
    107  
    108                         $GLOBALS['phpgw']->template->set_var('personCardEmail', $options_email); 
    109                         $GLOBALS['phpgw']->template->set_var('personCardPhone', $options_phone); 
    110  
    111                         /* Translate the fields */ 
    112                         $this->translate('pref'); 
    113  
    114                         $GLOBALS['phpgw']->template->set_var('form_action', $GLOBALS['phpgw']->link('/index.php', 'menuaction=contactcenter.ui_preferences.set_preferences')); 
    115  
    116                         $GLOBALS['phpgw']->template->pparse('out', 'pref'); 
    117                 } 
    118                  
    11923                function translate($handle) 
    12024                { 
Note: See TracChangeset for help on using the changeset viewer.