Changeset 2892
- Timestamp:
- 06/01/10 12:48:47 (14 years ago)
- Location:
- trunk/expressoAdmin1_2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r2878 r2892 245 245 $result['status'] = false; 246 246 $result['msg'] = $this->functions->lang('Connection with ldap fail') . "."; 247 return $result;247 return json_encode( $result ); 248 248 } 249 249 } … … 270 270 $result['status'] = false; 271 271 $result['msg'] = $this->functions->lang('this login can not be used because is a system account') . "."; 272 return $result;272 return json_encode( $result ); 273 273 } 274 274 … … 319 319 $result['status'] = false; 320 320 $result['msg'] = $this->functions->lang('this login is already used by') . ":\n" . $users; 321 return $result;321 return json_encode( $result ); 322 322 } 323 323 … … 331 331 $result['status'] = false; 332 332 $result['msg'] = $this->functions->lang('This login is being used by a group') . "."; 333 return $result;333 return json_encode( $result ); 334 334 } 335 335 … … 378 378 $result['msg'] = $this->functions->lang('this login is already used by a user in another organization') . "."; 379 379 ldap_close($ldap_connection2); 380 return $result;380 return json_encode( $result ); 381 381 } 382 382 } … … 387 387 if ($type == 'rename_user') 388 388 { 389 return $result;389 return json_encode( $result ); 390 390 } 391 391 … … 399 399 $result['status'] = false; 400 400 $result['msg'] = $this->functions->lang('this email address is being used by 1 user') . ": " . $entries[0]['uid'][0]; 401 return $result;401 return json_encode( $result ); 402 402 } 403 403 } … … 405 405 $result['status'] = false; 406 406 $result['msg'] = $this->functions->lang('this email address is being used by 2 or more users') . "."; 407 return $result;407 return json_encode( $result ); 408 408 } 409 409 … … 417 417 $result['status'] = false; 418 418 $result['msg'] = $this->functions->lang('alternative email is being used by 1 user') . ": " . $entries[0]['uid'][0]; 419 return $result;419 return json_encode( $result ); 420 420 } 421 421 } … … 423 423 $result['status'] = false; 424 424 $result['msg'] = $this->functions->lang('alternative email is being used by 2 or more users') . "."; 425 return $result;425 return json_encode( $result ); 426 426 } 427 427 … … 435 435 $result['status'] = false; 436 436 $result['msg'] = $this->functions->lang('Field CPF is invalid') . '.'; 437 return $result;437 return json_encode( $result ); 438 438 } 439 439 else … … 453 453 $result['status'] = false; 454 454 $result['msg'] = $this->functions->lang('Connection with ldap fail') . "."; 455 return $result;455 return json_encode( $result ); 456 456 } 457 457 … … 476 476 $result['question'] .= $entries_text; 477 477 $result['question'] .= $this->functions->lang("Do you want to continue anyway") . "?"; 478 return $result;478 return json_encode( $result ); 479 479 } else { 480 480 $result['status'] = false; … … 482 482 $result['msg'] .= $this->functions->lang('Field CPF used by') . ":\n"; 483 483 $result['msg'] .= $entries_text; 484 return $result;484 return json_encode( $result ); 485 485 } 486 486 … … 494 494 $result['status'] = false; 495 495 $result['msg'] = $this->functions->lang('Field CPF must be completed') . '.'; 496 return $result;496 return json_encode( $result ); 497 497 } 498 498 } 499 499 //End: Check CPF 500 500 501 return $result;501 return json_encode( $result ); 502 502 } 503 503 -
trunk/expressoAdmin1_2/js/jscode/connector.js
r2459 r2892 124 124 125 125 default: 126 showMessage(Element('cc_msg_err_serialize_data_unknown').value);126 //showMessage(Element('cc_msg_err_serialize_data_unknown').value); 127 127 break; 128 128 } … … 153 153 154 154 default: 155 showMessage(Element('cc_msg_err_serialize_data_unknown').value);155 //showMessage(Element('cc_msg_err_serialize_data_unknown').value); 156 156 return null; 157 157 } -
trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
r2712 r2892 55 55 // Transformar os DN em User Friendly Naming format 56 56 organization_name = organization_context.split(","); 57 for (i in organization_name) { 58 tmp = organization_name[i].split("="); 59 context += tmp[1]; 60 if( i < (organization_name.length - 1) ) context += '.'; 61 } 57 for (i in organization_name) 58 if ( ! ( i in Object.prototype ) ) 59 { 60 tmp = organization_name[i].split("="); 61 context += tmp[1]; 62 if( i < (organization_name.length - 1) ) context += '.'; 63 } 62 64 if (document.forms[0].associated_domain.value != '') 63 65 { … … 96 98 organization_name = organization_context.split(","); 97 99 for (x in organization_name) 98 { 99 tmp = organization_name[x].split("="); 100 context += tmp[1] + '.'; 101 } 100 if ( ! ( x in Object.prototype ) ) 101 { 102 tmp = organization_name[x].split("="); 103 context += tmp[1] + '.'; 104 } 102 105 } 103 106 } -
trunk/expressoAdmin1_2/js/jscode/users.js
r2860 r2892 143 143 var handler_validate_fields = function(data) 144 144 { 145 data = data.JSON( ); 145 146 if (!data.status) 146 147 { … … 183 184 } 184 185 } 185 186 186 187 // Needed select all options from select 187 188 select_user_maillists = document.getElementById('ea_select_user_maillists'); … … 193 194 ///////////////////////////////////////////////////////////////////////////////////////////////////////// 194 195 document.getElementById('uid').disabled = false; //Caso o login seja gerado automático, tirar o disabled. 195 cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields); 196 ExpressoLivre.go( { 197 "access" : 'expressoAdmin1_2.ldap_functions.validate_fields&attributes='+attributes, 198 "handler" : handler_validate_fields 199 } ); 196 200 } 197 201 … … 535 539 var handler_validate_fields = function(data) 536 540 { 541 data = data.JSON( ); 537 542 if (!data.status) 538 543 alert(data.msg); … … 542 547 return; 543 548 } 544 549 545 550 // New uid exist? 546 551 attrs_array = new Array(); … … 548 553 attrs_array['uid'] = new_uid; 549 554 attributes = connector.serialize(attrs_array); 550 551 cExecute ('$this.ldap_functions.validate_fields&attributes='+attributes, handler_validate_fields); 555 556 ExpressoLivre.go( { 557 "access" : 'expressoAdmin1_2.ldap_functions.validate_fields&attributes='+attributes, 558 "handler" : handler_validate_fields 559 } ); 552 560 } 553 561 }
Note: See TracChangeset
for help on using the changeset viewer.