Changeset 547 for trunk


Ignore:
Timestamp:
11/03/08 16:05:23 (15 years ago)
Author:
eduardoalex
Message:

Desenvolvimento da tarefa #368

Location:
trunk
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/inc/class.uiconfig.inc.php

    r540 r547  
    176176                                $t->set_var('rows_login_generator',$options); 
    177177                        } 
     178                         
     179                        /* 
     180                         * FCK editor para o termo de aceite 
     181                         */ 
     182                        include_once("news_admin/inc/fckeditor.php"); 
     183                        $texto_termo_aceite = isset($GLOBALS['phpgw_info']['server']['agree_term']) ? $GLOBALS['phpgw_info']['server']['agree_term'] : ''; 
     184                        $oFCKeditor = new FCKeditor('newsettings[agree_term]');//CreateObject('news_admin.fckeditor','newsettings[agree_term]'); 
     185                        $oFCKeditor->BasePath = 'news_admin/templates/celepar/fckeditor/';  
     186                        $oFCKeditor->ToolbarSet = 'Basic'; 
     187                        $oFCKeditor->Value = $texto_termo_aceite;        
     188 
     189                        $t->set_var('agree_term_input',$oFCKeditor->Create());                   
     190                         
     191                         
    178192                        $t->set_var('title',lang('Site Configuration')); 
    179193                        $t->set_var('action_url',$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=' . $appname)); 
  • trunk/admin/templates/celepar/config.tpl

    r357 r547  
    144144    <td><input name="newsettings[voip_port]" value="{value_voip_port}"></td> 
    145145   </tr--> 
     146    
     147    <tr class="row_on"> 
     148    <td > 
     149                                                                {lang_use_agree_term}: 
     150     </td> 
     151        <td> 
     152     <select name="newsettings[use_agree_term]"> 
     153         <option value="">{lang_No}</option> 
     154         <option value="True"{selected_use_agree_term_True}>{lang_Yes}</option> 
     155     </select>                                   
     156        </td> 
     157   </tr> 
     158    
     159  <tr class="row_off"> 
     160    <td colspan="2">{lang_agree_term}: <br /> 
     161                                                                {agree_term_input} <br /> 
     162        </td> 
     163   </tr> 
     164 
     165    
    146166<!-- END body --> 
    147167 
  • trunk/phpgwapi/inc/class.accounts_contacts.inc.php

    r2 r547  
    115115                        $this->data['status']            = $allValues[0]['account_status']; 
    116116                        $this->data['expires']           = $allValues[0]['account_expires']; 
    117  
     117                        $this->data['agree_terms']       = $allValues[0]['phpgwagreeterm'][0]; 
    118118                        return $this->data; 
    119119                } 
  • trunk/phpgwapi/inc/class.accounts_ldap.inc.php

    r513 r547  
    6363                        { 
    6464                                /* jakjr: using justthese with ldap_search */ 
    65                                 $justthese = array("uidnumber", "gidnumber", "uid", "cn", "givenname", "sn", "mail", "phpgwaccountstatus", "phpgwaccountexpires", "phpgwaccounttype", "phpgwlastpasswdchange"); 
     65                                $justthese = array("uidnumber", "gidnumber", "uid", "cn", "givenname", "sn", "mail", "phpgwaccountstatus", "phpgwaccountexpires", "phpgwaccounttype", "phpgwlastpasswdchange","phpgwagreeterm"); 
    6666                                $sri = @ldap_search($this->ds, $this->user_context, ("(&(uidnumber=" . (int)$this->account_id.")(phpgwaccounttype=u))"), $justthese); 
    6767                        } 
     
    9999                                $this->data['expires']           = $allValues[0]['phpgwaccountexpires'][0]; 
    100100                                $this->data['type']              = $allValues[0]['phpgwaccounttype'][0]; 
     101                                $this->data['agree_terms']   = $allValues[0]['phpgwagreeterm'][0]; 
    101102                        } 
    102103                        $this->data['account_dn']  = $allValues[0]['dn']; 
  • trunk/phpgwapi/templates/celepar/navbar.inc.php

    r79 r547  
    235235                                $var['frontend_name'] = " - ".$GLOBALS['phpgw_info']['server']['use_frontend_name']; 
    236236 
    237                         if($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0') 
     237                        /* 
     238                         *      Forçar termo de aceite por parte do usuário 
     239                         */ 
     240 
     241                        if(($GLOBALS['phpgw_info']['user']['agree_terms'] != 1) && ($GLOBALS['phpgw_info']['server']['use_agree_term']=='True')) //Ele deverá confirmar o termo de aceite. 
     242                        { 
     243                                $agreeterm_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/termo_aceite.php'; 
     244                                 
     245                                if ($GLOBALS['phpgw_info']['server']['use_https'] > 0) 
     246                                        $agreeterm_url = 'https://' . $agreeterm_url; 
     247                                else 
     248                                        $agreeterm_url = 'http://' . $agreeterm_url; 
     249                                 
     250                                echo '<script>' . 
     251                                                'if(location.href.indexOf("termo_aceite.php") == -1){' . 
     252                                                        'location.href = "' . $agreeterm_url . '"' . 
     253                                                '}' . 
     254                                         '</script>'; 
     255                        } 
     256                         
     257 
     258                        if(($GLOBALS['phpgw_info']['user']['lastpasswd_change'] == '0') && (($GLOBALS['phpgw_info']['user']['agree_terms'] == 1) || ($GLOBALS['phpgw_info']['server']['use_agree_term']!='True'))) 
    238259                        { 
    239260                                $changepasswd_url = $_SERVER['HTTP_HOST'] . $GLOBALS['phpgw_info']['server']['webserver_url'] . '/preferences/changepassword.php?cd=1'; 
Note: See TracChangeset for help on using the changeset viewer.