Changeset 414 for trunk/expressoAdmin1_2/js/jscode/users.js
- Timestamp:
- 09/12/08 11:39:24 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/users.js
r355 r414 8 8 9 9 if (document.forms[0].uid.value == ''){ 10 alert( 'Campo LOGIN está vazio.');10 alert(get_lang('LOGIN field is empty') + '.'); 11 11 return; 12 12 } 13 13 else if (document.forms[0].uid.value.length < document.forms[0].minimumSizeLogin.value){ 14 alert( 'Campo LOGIN deve ter mais que '+document.forms[0].minimumSizeLogin.value+' caracteres.');14 alert(get_lang('LOGIN field must be bigger than') + ' ' + document.forms[0].minimumSizeLogin.value + ' ' + get_lang('characters') + '.'); 15 15 return; 16 16 } … … 22 22 var reUid = /^([a-zA-Z0-9_\-])+$/; 23 23 if(!reUid.test(document.forms[0].uid.value)){ 24 alert('Campo LOGIN comtém caracteres não permitidos.'); 25 document.forms[0].account_lid.focus(); 24 alert(get_lang('LOGIN field contains characters not allowed') + '.'); 26 25 return; 27 26 } … … 29 28 //PASSWORD's 30 29 if (document.forms[0].password1.value == ''){ 31 alert( 'Campo SENHA está vazio.');30 alert(get_lang('Password field is empty') + '.'); 32 31 return; 33 32 } 34 33 if (document.forms[0].password2.value == ''){ 35 alert( 'Campo RE-SENHA está vazio.');34 alert(get_lang('Re-Password field is empty') + '.'); 36 35 return; 37 36 } … … 39 38 40 39 if (document.forms[0].password1.value != document.forms[0].password2.value){ 41 alert( 'Campo SENHA e RE-SENHA são diferentes.');40 alert(get_lang('Password and Re-Password are different') + '.'); 42 41 return; 43 42 } … … 50 49 if(!re_employeenumber.test(document.forms[0].corporative_information_employeenumber.value)) 51 50 { 52 alert( 'Campo matrícula contém caracteres não permitidos. Somente números são permitidos.');51 alert(get_lang('EmployeeNumber contains characters not allowed') + '. ' + get_lang('Only numbers are allowed') + '.'); 53 52 document.forms[0].corporative_information_employeenumber.focus(); 54 53 return; … … 56 55 } 57 56 58 /* Validation cpf is in php now.59 /*60 if (document.forms[0].corporative_information_cpf.value != "")61 {62 var re_cpf = /^([0-9])+$/;63 64 if(!re_cpf.test(document.forms[0].corporative_information_cpf.value))65 {66 alert('Campo cpf contém caracteres não permitidos. Somente números são permitidos');67 document.forms[0].corporative_information_employeenumber.focus();68 return;69 }70 71 if (! validarCPF(document.forms[0].corporative_information_cpf.value) )72 {73 alert("Campo CPF invalido.");74 document.forms[0].corporative_information_cpf.focus();75 return;76 }77 }*/78 79 57 //MAIL 80 58 document.forms[0].mail.value = document.forms[0].mail.value.toLowerCase(); 81 59 if (document.forms[0].mail.value == ''){ 82 alert( 'Campo E-MAIL está vazio.');60 alert(get_lang('Email field is empty') + '.'); 83 61 return; 84 62 } 85 63 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 86 64 if(!reEmail.test(document.forms[0].mail.value)){ 87 alert( "Campo E-mail não é válido.");65 alert(get_lang('Email field is not valid') + '.'); 88 66 return false; 89 67 } … … 92 70 var reGivenname = /^[a-zA-Z0-9 \-\.]+$/; 93 71 if(!reGivenname.test(document.forms[0].givenname.value)){ 94 alert( 'Primeiro Nome contém caracteres inválidos.');72 alert(get_lang('First name field contains characters not allowed') + '.'); 95 73 return false; 96 74 } 97 75 else if (document.forms[0].givenname.value == ''){ 98 alert( 'Campo PRIMEIRO NOME está vazio.');76 alert(get_lang('First name field is empty') + '.'); 99 77 return; 100 78 } … … 103 81 var reSn = /^[a-zA-Z0-9 \-\.]+$/; 104 82 if(!reSn.test(document.forms[0].sn.value)){ 105 alert( 'Último Nome contém caracteres inválidos.');83 alert(get_lang('Last name field contains characters not allowed') + '.'); 106 84 return false; 107 85 } 108 86 else if (document.forms[0].sn.value == ''){ 109 alert( 'Campo ÚLTIMO NOME está vazio.');87 alert(get_lang('Last name field is empty') + '.'); 110 88 return; 111 89 } … … 117 95 if (!reg_tel.exec(document.forms[0].telephonenumber.value)) 118 96 { 119 alert( 'Campo Telefone incorreto.');97 alert(get_lang('Phone field is incorrect') + '.'); 120 98 return; 121 99 } … … 124 102 //FORWAR ONLY 125 103 if ((document.forms[0].deliverymode.checked) && (document.forms[0].mailforwardingaddress.value == '')){ 126 alert( 'Campo E-MAIL DE ENCAMINHAMENTO está vazio.');104 alert(get_lang('Forward email is empty') + '.'); 127 105 return; 128 106 } … … 130 108 // Email Quota 131 109 if (document.forms[0].mailquota.value == ''){ 132 alert( 'Usuário sem COTA.');110 alert(get_lang('User without email quota') + '.'); 133 111 return; 134 112 } … … 136 114 //GROUPS 137 115 if (document.getElementById('ea_select_user_groups').length < 1){ 138 alert( 'Nenhum GRUPO selecionado.');116 alert(get_lang('User is not in any group') + '.'); 139 117 return; 140 118 } … … 143 121 if (document.getElementById('tabcontent6').style.display != 'none'){ 144 122 if ((document.forms[0].sambalogonscript.value == '') && (!document.forms[0].sambalogonscript.disabled)){ 145 alert( 'Script de logon do usuário está vazio.');123 alert(get_lang('Logon script is empty') + '.'); 146 124 return; 147 125 } 148 126 if ((document.forms[0].sambahomedirectory.value == '') && (!document.forms[0].sambahomedirectory.disabled)){ 149 alert( 'Diretório Home do usuário está vazio.');127 alert(get_lang('Users home directory is empty') + '.'); 150 128 return; 151 129 } … … 187 165 document.getElementById('mailforwardingaddress').disabled = false; 188 166 document.getElementById('mailalternateaddress').disabled = false; 167 document.getElementById('passwd_expired').disabled = false; 189 168 document.getElementById('accountstatus').disabled = false; 190 169 document.getElementById('deliverymode').disabled = false; … … 225 204 alert(data.msg); 226 205 else 227 alert( 'Usuário criado com êxito!');206 alert(get_lang('User sucess created') + '.'); 228 207 229 208 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 244 223 } 245 224 else{ 246 alert( 'Usuário salvo com êxito!!');225 alert(get_lang('User sucess saved') + '.'); 247 226 } 248 227 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 467 446 alert(data.msg); 468 447 else 469 alert( 'Senha default cadastrada com êxito!!');448 alert(get_lang('Default password sucess saved') + '.'); 470 449 return; 471 450 } … … 480 459 alert(data.msg); 481 460 else 482 alert( 'Senha do usuário retornado com êxito!!');461 alert(get_lang('Users password sucess returned') + '.'); 483 462 return; 484 463 } … … 488 467 function delete_user(uid, uidnumber) 489 468 { 490 if (confirm( "Realmente deseja deletar o usuário " + uid + " ??"))469 if (confirm(get_lang("Do you really want delete the user") + " " + uid + "?")) 491 470 { 492 471 var handler_delete_user = function(data) … … 495 474 alert(data.msg); 496 475 else 497 alert( 'Usuário deletado com êxito!!');476 alert(get_lang('User sucess deleted') + '.'); 498 477 499 478 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; … … 511 490 var reUid = /^([a-zA-Z0-9_\-])+$/; 512 491 513 new_uid = prompt( "Alterar login do usuário " + uid + " para: ", uid);492 new_uid = prompt(get_lang('Rename users login from') + ': ' + uid + " " + get_lang("to") + ': ', uid); 514 493 515 494 if(!reUid.test(new_uid)){ 516 alert( 'Campo LOGIN comtém caracteres não permitidos.');495 alert(get_lang('LOGIN field contains characters not allowed') + '.'); 517 496 document.forms[0].account_lid.focus(); 518 497 return; … … 547 526 alert(data.msg); 548 527 else{ 549 alert( "Usuário renomeado com êxito!\n" + data.exec_return);528 alert(get_lang('User login sucess renamed') + "\n" + data.exec_return); 550 529 location.href="./index.php?menuaction=expressoAdmin1_2.uiaccounts.list_users"; 551 530 } … … 563 542 clearTimeout(finderTimeout_maillist); 564 543 var oWait = document.getElementById("ea_span_searching_maillist"); 565 oWait.innerHTML = 'Buscando...';544 oWait.innerHTML = get_lang('Searching') + '...'; 566 545 finderTimeout_maillist = setTimeout("optionFinder_maillist('"+obj.id+"')",500); 567 546 } … … 597 576 clearTimeout(finderTimeout_group); 598 577 var oWait = document.getElementById("ea_span_searching_group"); 599 oWait.innerHTML = 'Buscando...';578 oWait.innerHTML = get_lang('Searching') + '...'; 600 579 finderTimeout_group = setTimeout("optionFinder_group('"+obj.id+"')",500); 601 580 } … … 655 634 function empty_inbox(uid) 656 635 { 657 var action = "Limpado INBOX do usuario";636 var action = get_lang('Cleanned user mailbox'); 658 637 var handler_write_log = function(){} 659 638 var handler_empty_inbox = function(data) … … 663 642 else{ 664 643 cExecute ('$this.user.write_log_from_ajax&_action='+action+'&userinfo='+uid, handler_write_log); 665 alert( "Esvaziados '" + data.inbox_size + "' MB da caixa postal do usuário");644 alert(get_lang('Emptied ') + data.inbox_size + ' ' + get_lang('MB from user inbox')); 666 645 document.getElementById('mailquota_used').value = data.mailquota_used; 667 646 } … … 702 681 } 703 682 704 /*705 function search_organization(key)706 {707 var organizations = document.getElementById('ea_combo_org_info');708 var RegExp_org = new RegExp("\\b"+key, "i");709 710 for(i = 0; i < organizations.length; i++)711 {712 if (RegExp_org.test(organizations[i].text))713 {714 organizations[i].selected = true;715 return;716 }717 }718 }*/719 720 683 function search_organization(key, element) 721 684 {
Note: See TracChangeset
for help on using the changeset viewer.