Ignore:
Timestamp:
05/30/11 18:04:29 (13 years ago)
Author:
airton
Message:

Ticket #1954 - Implementacao de busca avançada no contactcenter - Padronizacao da tela de busca avancada

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php

    r4500 r4548  
    118118                                        { 
    119119                                                /* don't erase passwords, since we also don't print them */ 
    120                                                 if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key)) 
     120                                                if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key) && !ereg('pw',$key)) 
    121121                                                { 
    122122                                                        unset($c->config_data[$key]); 
     
    126126                                if($GLOBALS['phpgw_info']['server']['found_validation_hook'] && function_exists('final_validation')) 
    127127                                { 
    128                                         final_validation($newsettings); 
     128                                        final_validation($c->config_data); 
    129129                                        if($GLOBALS['config_error']) 
    130130                                        { 
     
    167167                         
    168168                        $campos = ''; 
     169                        $checked_box = array(); 
     170                        $i = 0; 
    169171                         
    170172                        if($appname=="contactcenter")  
     
    185187                                        $checkedCoisa = 'value="details" checked="checked"';  
    186188                                } 
    187                         } 
    188                 } 
    189                          
     189                        }                        
     190                                } 
     191         
     192                                $campos_vazio = true; 
     193                                $campos = "<div> 
     194                                                                <label style=\"margin:46px;\">" . lang('Name')               . "</label> 
     195                                                                <label style=\"margin:50px;\">" . lang('Corresponding LDAP') . "</label> 
     196                                                                <label style=\"margin:25px;\">" . lang('Type')               . "</label> 
     197                                                                <label style=\"margin:10px;\">" . lang('Searchable')         . "</label> 
     198                                                        </div>"; 
    190199                 
    191200                        foreach ($fields as $i => $line)  
    192201                        { 
    193                         if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 
     202                                        if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') { 
     203                                                $campos_vazio  = false; 
    194204                        $selectedText  = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : ''; 
    195205                        $selectedTMult = $line["cc_attribute_type_$i"] == 'multivalues' ? 'selected="selected"' : ''; 
    196                                  
     206                                                $selectedYes   = $line["cc_attribute_searchable_$i"] == 'true'  ? 'selected="selected"' : ''; 
     207                                                $selectedNo    = $line["cc_attribute_searchable_$i"] == 'false' ? 'selected="selected"' : ''; 
     208 
     209                                                 
    197210                                $campos = $campos . "<div class=\"cc_attribute\"> 
    198                                 <label>" . lang('Name') .":</label> 
    199                                 <input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" />  
    200                                 <label>" . lang('Corresponding LDAP') . ":</label> 
    201                                 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" />  
    202                                 <label>" . lang('Type') . ":</label> 
    203                                 <select name=\"newsettings[cc_attribute_type_" . $i . "]\"> 
    204                                         <option value=\"text\" $selectedText>" . lang('Text') . "</option> 
    205                                         <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 
    206                                 </select> 
    207                                 <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/>   
    208                         </div>"; 
     211                                                                        <input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" style=\"width:170px;\"/>  
     212                                                                        <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" style=\"width:170px;\"/>  
     213                                                                        <select name=\"newsettings[cc_attribute_type_" . $i . "]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 
     214                                                                                        <option value=\"text\" $selectedText>" . lang('Text') . "</option> 
     215                                                                                        <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option> 
     216                                                                        </select> 
     217                                                                        <select name=\"newsettings[cc_attribute_searchable_$i]\" style=\"margin: 0px 16px;\"> 
     218                                                                                        <option value=\"true\" $selectedYes>" . lang('Yes') . "</option> 
     219                                                                                        <option value=\"false\" $selectedNo>" . lang('No') . "</option> 
     220                                                                        </select> 
     221                                                                        <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') . "\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/>   
     222                                                                </div>"; 
    209223                        } 
    210224                        }  
    211225                 
    212                             if ($campos == '') 
     226                            if ($campos_vazio) 
    213227                        { 
    214                                 $campos = "<div class=\"cc_attribute\"> 
    215                                 <label>" . lang('Name') .":</label> 
    216                                 <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" />  
    217                                 <label>" . lang('Corresponding LDAP') . ":</label> 
    218                                 <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" />  
    219                                 <label>" . lang('Type') . ":</label> 
    220                                 <select name=\"newsettings[cc_attribute_type_0]\"> 
     228                                $campos .= "<div class=\"cc_attribute\"> 
     229                                <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" style=\"width:170px;\"/>  
     230                                <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" style=\"width:170px;\"/>  
     231                                <select name=\"newsettings[cc_attribute_type_0]\" style=\"width:86px; margin: 0px 0px 0px 8px;\"> 
    221232                                        <option value=\"text\">" . lang('Text') . "</option> 
    222233                                        <option value=\"multivalues\">" . lang('Multivalued') . "</option> 
     234                                </select> 
     235                                                                <select name=\"newsettings[cc_attribute_searchable_0]\" style=\"margin: 0px 16px;\"> 
     236                                        <option value=\"true\">" . lang('Yes') . "</option> 
     237                                        <option value=\"false\" selected=\"selected\">" . lang('No') . "</option> 
    223238                                </select> 
    224239                                <img src=\"contactcenter/templates/default/images/cc_x.png\" alt=\"". lang('Delete') ."\" style=\"width: 15px; height: 14px; cursor: pointer; position: relative; top: 3px;\" onclick=\"javascript:cc_attribute_delete(this)\"/>  
Note: See TracChangeset for help on using the changeset viewer.