Changeset 46 for trunk/expressoAdmin1_2/js/jscode
- Timestamp:
- 08/06/07 08:54:16 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/js/jscode/groups.js
r33 r46 42 42 document.forms[0].description.focus(); 43 43 return; 44 } 45 46 var reEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 47 if ( (document.forms[0].email.value != '') && (!reEmail.test(document.forms[0].email.value)) ) 48 { 49 alert("Campo E-mail não é válido."); 50 return false; 44 51 } 45 52 … … 280 287 function use_samba_attrs(value) 281 288 { 282 document.forms[0].samba domain.disabled = !value;289 document.forms[0].sambasid.disabled = !value; 283 290 } 284 291 … … 312 319 } 313 320 } 321 322 function groupEmailSuggestion(concatenateDomain, type) 323 { 324 if (type != 'create_group') 325 return; 326 327 if (concatenateDomain == 'true') 328 { 329 var ldap_context = document.forms[0].ufn_ldap_context.value.toLowerCase(); 330 var organization_context = document.forms[0].context.value.toLowerCase(); 331 var select_orgs = document.getElementById('ea_combo_org_info'); 332 333 for(var i=0; i<select_orgs.options.length; i++) 334 { 335 if(select_orgs.options[i].selected == true) 336 { 337 var x; 338 var context = ''; 339 select_context = select_orgs.options[i].value.toLowerCase(); 340 organization_name = organization_context.split(","); 341 342 for (x in organization_name) 343 { 344 tmp = organization_name[x].split("="); 345 context += tmp[1] + '.'; 346 } 347 } 348 } 349 domain_name = document.forms[0].defaultDomain.value; 350 351 x=context.indexOf(ldap_context,0); 352 org_name_par = context.substring(0,(x-1)); 353 org_name = org_name_par.split('.'); 354 org_name = org_name[org_name.length-1]; 355 356 if (org_name != '') 357 document.forms[0].email.value = document.forms[0].cn.value + '@' + org_name + '.' + domain_name; 358 else 359 document.forms[0].email.value = document.forms[0].cn.value; 360 } 361 else 362 { 363 document.forms[0].email.value = document.forms[0].cn.value; 364 } 365 }
Note: See TracChangeset
for help on using the changeset viewer.