Ignore:
Timestamp:
09/12/08 11:39:24 (16 years ago)
Author:
niltonneto
Message:

Alterações feitas por João Alfredo.
Email: jakjr@…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expressoAdmin1_2/inc/class.uisectors.inc.php

    r396 r414  
    6868                                'th_bg'                                 => $GLOBALS['phpgw_info']['theme']['th_bg'], 
    6969                                'back_url'                              => $GLOBALS['phpgw']->link('/expressoAdmin1_2/index.php'), 
    70                                 'context_display'               => $context_display, 
    71                                 'lang_context'                  => lang('context'), 
    72                                 'header_name'                   => lang('SECTORS'), 
    73                                 'lang_add_sub_sectors'  => lang('Add Sub-Sectors'), 
    74                                 'header_edit'                   => lang('Edit'), 
    75                                 'lang_back'                             => lang('back'), 
    76                                 'header_delete'                 => lang('Delete') 
    77                         ); 
    78                         $p->set_var($var); 
     70                                'context_display'               => $context_display 
     71                        ); 
     72                        $p->set_var($var); 
     73                        $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 
    7974 
    8075                        if (!count($sectors_info)) 
     
    144139                function add_sector($context='') 
    145140                { 
    146                         //_debug_array($_GET); 
    147                         //_debug_array($_POST); 
    148  
    149141                        $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 
    150142                        $acl = $this->functions->read_acl($manager_lid); 
     
    166158                        $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    167159                        $p->set_file(Array('create_sector' => 'sectors_form.tpl')); 
     160                        $p->set_block('create_sector','list','list'); 
    168161 
    169162                        // Seta variaveis utilizadas pelo tpl. 
     
    175168                                'sector'                        => $_POST['sector'], 
    176169                                'sector_visible_checked'=> $_POST['sector_visible'] ? 'checked' : '', 
    177                                  
    178                                 'lang_add'                      => lang('Add'), 
    179                                 'lang_save'                     => lang('Save'), 
    180                                 'lang_back'                     => lang('Back'), 
    181                                 'lang_context'          => lang('Context'), 
    182                                 'lang_sector_name'      => lang('Sector name'), 
    183                                 'lang_occult_ou'        => lang('Occult Sector'), 
    184170                                'error_messages'        => $_POST['error_messages'] == '' ? '' : "<script type='text/javascript'>alert('".$_POST['error_messages']."')</script>", 
    185171                        ); 
    186172                        $p->set_var($var); 
     173                        $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 
    187174 
    188175                        $p->pfp('out','create_sector'); 
     
    191178                function edit_sector() 
    192179                { 
    193                         //_debug_array($_POST); 
    194                          
    195180                        $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 
    196181                        $acl = $this->functions->read_acl($account_lid); 
     
    215200                        $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    216201                        $p->set_file(Array('edit_sector' => 'sectors_form.tpl')); 
     202                        $p->set_block('edit_sector','list','list'); 
    217203                         
    218204                        if (!$_POST) 
     
    233219                                'lang_add'                      => lang('Add'), 
    234220                                'disable'                       => 'disabled', 
    235                                 'lang_save'                     => lang('Save'), 
    236                                 'lang_back'                     => lang('Back'), 
    237                                 'lang_context'          => lang('Context'), 
    238                                 'lang_sector_name'      => lang('Sector name'), 
    239                                 'lang_occult_ou'        => lang('Occult Sector'), 
    240221                                'error_messages'        => $_POST['error_messages'] == '' ? '' : "<script type='text/javascript'>alert('".$_POST['error_messages']."')</script>", 
    241222                        ); 
    242223                        $p->set_var($var); 
    243  
     224                        $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 
     225                         
    244226                        $p->pfp('out','edit_sector'); 
    245227                } 
     
    247229                function validate_data_sectors_add() 
    248230                { 
    249                         //_debug_array($_POST); 
    250  
    251231                        $sector_name    = $_POST['sector']; 
    252232                        $context                = $_POST['context']; 
     
    273253                function delete_sector() 
    274254                { 
    275                         //_debug_array($_GET); 
    276                          
    277255                        $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 
    278256                        $acl = $this->functions->read_acl($account_lid); 
     
    293271                        $p = CreateObject('phpgwapi.Template',PHPGW_APP_TPL); 
    294272                        $p->set_file(Array('delete_sector' => 'sectors_delete.tpl')); 
     273                        $p->set_block('delete_sector','list','list'); 
    295274                         
    296275                        $tmp_sector_name = $_GET['context']; 
     
    305284                        $sector_subsectors      = $this->so->get_sector_subsectors($_GET['context']); 
    306285                         
    307                         //_debug_array($sector_users); 
    308                         //_debug_array($sector_groups); 
    309                         //_debug_array($sector_subsectors); 
    310  
    311286                        $users_list = ''; 
    312287                        foreach ($sector_users as $user) 
     
    331306                        $var = Array( 
    332307                                'color_bg1'                                     => "#E8F0F0", 
    333                                 'lang_back'                                     => lang('Back'), 
    334                                 'lang_delete'                           => lang('Delete'), 
    335                                 'lang_delete_sector'            => lang('Do you realy want delete this sector?'), 
    336                                 'lang_content_the_users'        => lang('Content the folling users'), 
    337                                 'lang_content_the_groups'       => lang('Content the folling groups'), 
    338                                 'lang_content_the_sectors'      => lang('Content the folling sectors'), 
    339                                 'lang_obs'                                      => lang('All users, groups and sub-sectors of this sector will be DELETED!'), 
    340                                  
    341308                                'manager_context'                       => $manager_context, 
    342309                                'dn'                                            => $_GET['context'], 
     
    350317                        ); 
    351318                        $p->set_var($var); 
     319                        $p->set_var($this->functions->make_dinamic_lang($p, 'list')); 
    352320                        $p->pfp('out','delete_sector');                  
    353321                } 
Note: See TracChangeset for help on using the changeset viewer.