Changeset 4548 for sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php
- Timestamp:
- 05/30/11 18:04:29 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/2.2.0.2/admin/inc/class.uiconfig.inc.php
r4500 r4548 118 118 { 119 119 /* 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)) 121 121 { 122 122 unset($c->config_data[$key]); … … 126 126 if($GLOBALS['phpgw_info']['server']['found_validation_hook'] && function_exists('final_validation')) 127 127 { 128 final_validation($ newsettings);128 final_validation($c->config_data); 129 129 if($GLOBALS['config_error']) 130 130 { … … 167 167 168 168 $campos = ''; 169 $checked_box = array(); 170 $i = 0; 169 171 170 172 if($appname=="contactcenter") … … 185 187 $checkedCoisa = 'value="details" checked="checked"'; 186 188 } 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>"; 190 199 191 200 foreach ($fields as $i => $line) 192 201 { 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; 194 204 $selectedText = $line["cc_attribute_type_$i"] == 'text' ? 'selected="selected"' : ''; 195 205 $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 197 210 $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>"; 209 223 } 210 224 } 211 225 212 if ($campos == '')226 if ($campos_vazio) 213 227 { 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;\"> 221 232 <option value=\"text\">" . lang('Text') . "</option> 222 233 <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> 223 238 </select> 224 239 <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.