Index: sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php
===================================================================
--- sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php	(revision 4500)
+++ sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php	(revision 4548)
@@ -118,5 +118,5 @@
 					{
 						/* don't erase passwords, since we also don't print them */
-						if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key))
+						if(!ereg('passwd',$key) && !ereg('password',$key) && !ereg('root_pw',$key) && !ereg('pw',$key))
 						{
 							unset($c->config_data[$key]);
@@ -126,5 +126,5 @@
 				if($GLOBALS['phpgw_info']['server']['found_validation_hook'] && function_exists('final_validation'))
 				{
-					final_validation($newsettings);
+					final_validation($c->config_data);
 					if($GLOBALS['config_error'])
 					{
@@ -167,4 +167,6 @@
 			
 			$campos = '';
+			$checked_box = array();
+			$i = 0;
 			
 			if($appname=="contactcenter") 
@@ -185,40 +187,53 @@
               				$checkedCoisa = 'value="details" checked="checked"'; 
               			}
-                	}
-                }
-        		
+                	}			
+				}
+	
+				$campos_vazio = true;
+				$campos = "<div>
+								<label style=\"margin:46px;\">" . lang('Name')               . "</label>
+								<label style=\"margin:50px;\">" . lang('Corresponding LDAP') . "</label>
+								<label style=\"margin:25px;\">" . lang('Type')               . "</label>
+								<label style=\"margin:10px;\">" . lang('Searchable')         . "</label>
+							</div>";
                 
         		foreach ($fields as $i => $line) 
         		{
-                	if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') {
+					if ($line["cc_attribute_name_$i"] != '' && $line["cc_attribute_ldapname_$i"] != '') {
+						$campos_vazio  = false;
                         $selectedText  = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : '';
                         $selectedTMult = $line["cc_attribute_type_$i"] == 'multivalues' ? 'selected="selected"' : '';
-                		
+						$selectedYes   = $line["cc_attribute_searchable_$i"] == 'true'  ? 'selected="selected"' : '';
+						$selectedNo    = $line["cc_attribute_searchable_$i"] == 'false' ? 'selected="selected"' : '';
+
+						
                 		$campos = $campos . "<div class=\"cc_attribute\">
-                                <label>" . lang('Name') .":</label>
-                                <input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" /> 
-                                <label>" . lang('Corresponding LDAP') . ":</label>
-                                <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" /> 
-                                <label>" . lang('Type') . ":</label>
-                                <select name=\"newsettings[cc_attribute_type_" . $i . "]\">
-                                        <option value=\"text\" $selectedText>" . lang('Text') . "</option>
-                                        <option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option>
-                                </select>
-                                <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)\"/>  
-                        </div>";
+									<input type=\"text\" name=\"newsettings[cc_attribute_name_" . $i . "]\" value=\"".$line["cc_attribute_name_$i"]."\" style=\"width:170px;\"/> 
+									<input type=\"text\" name=\"newsettings[cc_attribute_ldapname_" . $i . "]\" value=\"".$line["cc_attribute_ldapname_$i"]."\" style=\"width:170px;\"/> 
+									<select name=\"newsettings[cc_attribute_type_" . $i . "]\" style=\"width:86px; margin: 0px 0px 0px 8px;\">
+											<option value=\"text\" $selectedText>" . lang('Text') . "</option>
+											<option value=\"multivalues\" $selectedTMult>" . lang('Multivalued') ."</option>
+									</select>
+									<select name=\"newsettings[cc_attribute_searchable_$i]\" style=\"margin: 0px 16px;\">
+											<option value=\"true\" $selectedYes>" . lang('Yes') . "</option>
+											<option value=\"false\" $selectedNo>" . lang('No') . "</option>
+									</select>
+									<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)\"/>  
+								</div>";
                 	}
         		} 
         	
-			    if ($campos == '')
+			    if ($campos_vazio)
         		{
-        			$campos = "<div class=\"cc_attribute\">
-                                <label>" . lang('Name') .":</label>
-                                <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" /> 
-                                <label>" . lang('Corresponding LDAP') . ":</label>
-                                <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" /> 
-                                <label>" . lang('Type') . ":</label>
-                                <select name=\"newsettings[cc_attribute_type_0]\">
+        			$campos .= "<div class=\"cc_attribute\">
+                                <input type=\"text\" name=\"newsettings[cc_attribute_name_0]\" value=\"\" style=\"width:170px;\"/> 
+                                <input type=\"text\" name=\"newsettings[cc_attribute_ldapname_0]\" value=\"\" style=\"width:170px;\"/> 
+                                <select name=\"newsettings[cc_attribute_type_0]\" style=\"width:86px; margin: 0px 0px 0px 8px;\">
                                         <option value=\"text\">" . lang('Text') . "</option>
                                         <option value=\"multivalues\">" . lang('Multivalued') . "</option>
+                                </select>
+								<select name=\"newsettings[cc_attribute_searchable_0]\" style=\"margin: 0px 16px;\">
+                                        <option value=\"true\">" . lang('Yes') . "</option>
+                                        <option value=\"false\" selected=\"selected\">" . lang('No') . "</option>
                                 </select>
                                 <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)\"/> 
