- Timestamp:
- 02/10/10 09:58:44 (14 years ago)
- Location:
- trunk/expressoAdmin1_2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.bosectors.inc.php
r1850 r1991 47 47 $sector_info['objectClass'][0] = 'top'; 48 48 $sector_info['objectClass'][1] = 'organizationalUnit'; 49 49 50 if( isset($_POST['associated_domain']) ) 51 { 52 if ( $_POST['associated_domain'] != "") { 53 $sector_info['objectClass'][2] = 'domainRelatedObject'; 54 $sector_info['associatedDomain'] = trim($_POST['associated_domain']); 55 } 56 } 57 50 58 /* 51 59 Insere as informações sobre quota total por usuários e por gigabytes de espaço em disco -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r1975 r1991 1532 1532 } 1533 1533 1534 function get_associated_domain($params) 1535 { 1536 $justthese = array("associatedDomain"); 1537 $filter="(objectClass=domainRelatedObject)";; 1538 $context = $params['context']; 1539 $search = ldap_search($this->ldap,$context, $filter, $justthese); 1540 $entry = ldap_get_entries($this->ldap, $search); 1541 return $entry[0]['associateddomain'][0]; 1542 } 1534 1543 1535 1544 function change_user_context($dn, $newrdn, $newparent) -
trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
r1684 r1991 185 185 'context' => $context == '' ? $GLOBALS['phpgw_info']['server']['ldap_context'] : $context, 186 186 'sector' => $_POST['sector'], 187 'associated_domain' => $_POST['associated_domain'], 187 188 'disk_quota' => $_POST['disk_quota'], 188 189 'users_quota' => $_POST['users_quota'], … … 242 243 $sector_disk_quota = $sector_info[0]['diskquota'][0]; 243 244 $sector_users_quota = $sector_info[0]['usersquota'][0]; 245 $sector_associated_domain = $sector_info[0]['associateddomain'][0]; 244 246 $_POST['sector_visible'] = $sector_info[0]['phpgwaccountvisible'][0]; 245 247 } … … 254 256 'manager_org' => $combo_manager_org, 255 257 'sector_visible_checked'=> $_POST['sector_visible'] ? 'checked' : '', 258 'associated_domain' => $_POST['associated_domain'] == '' ? $sector_associated_domain : $_POST['associated_domain'], 256 259 'disk_quota' => $_POST['disk_quota'] == '' ? $sector_disk_quota : $_POST['disk_quota'], 257 260 'users_quota' => $_POST['users_quota'] == '' ? $sector_users_quota : $_POST['users_quota'], 258 259 261 'lang_add' => lang('Add'), 260 262 'disable' => 'disabled', -
trunk/expressoAdmin1_2/js/jscode/expressoadmin.js
r1916 r1991 33 33 } 34 34 35 function get_associated_domain(context) 36 { 37 var handler_associated_domain = function(data) 38 { 39 if (data != null) 40 { 41 document.forms[0].associated_domain.value = data; 42 } 43 else 44 { 45 document.forms[0].associated_domain.value = ''; 46 } 47 } 48 cExecute ('$this.ldap_functions.get_associated_domain&context='+context, handler_associated_domain); 49 } 50 35 51 function emailSugestion_expressoadmin2(email) { 36 52 if ( email.value.indexOf('@', 0) < 0 ) emailSugestion = 1; … … 39 55 var context = ""; 40 56 41 organization_context = Element('ea_combo_org').value ;57 organization_context = Element('ea_combo_org').value.toLowerCase(); 42 58 // Transformar os DN em User Friendly Naming format 43 59 organization_name = organization_context.split(","); … … 46 62 context += tmp[1]; 47 63 if( i < (organization_name.length - 1) ) context += '.'; 48 } 49 email.value = email.value + context; 50 emailSugestion = 0; 64 } 65 if (document.forms[0].associated_domain.value != '') 66 { 67 associatedDomain_name = document.forms[0].associated_domain.value; 68 email.value = email.value + associatedDomain_name; 69 emailSugestion = 0; 70 } else{ 71 email.value = email.value + context; 72 emailSugestion = 0; 73 } 51 74 } 52 75 } … … 91 114 org_name = org_name_par.split('.'); 92 115 org_name = org_name[org_name.length-1]; 93 116 94 117 if (org_name != '') 95 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + org_name + '.' + domain_name; 118 { 119 if (document.forms[0].associated_domain.value != '') 120 { 121 associatedDomain_name = document.forms[0].associated_domain.value; 122 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + associatedDomain_name; 123 } 124 else 125 { 126 document.forms[0].mail1.value = document.forms[0].uid.value + '@' + org_name + '.' + domain_name; 127 } 128 } 96 129 else 97 130 document.forms[0].mail1.value = document.forms[0].uid.value; -
trunk/expressoAdmin1_2/templates/default/accounts_form.tpl
r1329 r1991 15 15 <input type="hidden" name="photo_exist" value="{photo_exist}"> 16 16 <input type="hidden" name="user_context" value="{user_context}"> 17 <input type="hidden" name="departmentnumber" value="{departmentnumber}">17 <input type="hidden" name="departmentnumber" value="{departmentnumber}"> 18 18 <input type="hidden" name="userSamba" value="{userSamba}"> 19 <input type="hidden" name="defaultLogonScript" value="{defaultLogonScript}">19 <input type="hidden" name="defaultLogonScript" value="{defaultLogonScript}"> 20 20 <input type="hidden" name="imapDelimiter" value="{imapDelimiter}"> 21 <input type="hidden" name="minimumSizeLogin" value="{minimumSizeLogin}">21 <input type="hidden" name="minimumSizeLogin" value="{minimumSizeLogin}"> 22 22 <input type="hidden" name="defaultDomain" value="{defaultDomain}"> 23 23 <input type="hidden" name="ldap_context" value="{ldap_context}"> 24 <input type="hidden" name="associated_domain" value="{associated_domain}"> 24 25 25 26 <br> … … 42 43 <tr bgcolor={row_on}> 43 44 <td>{lang_search_organization}:</td> 44 <td><input type="text" id="organization_search" {disabled} autocomplete="off" size=20 onKeyUp="javascript:search_organization(this.value, 'ea_combo_org_info');" onBlur="javascript:sinc_combos_org(context.value); get_a vailable_groups(context.value); get_available_maillists(context.value); get_available_sambadomains(context.value, '{type}')"></td>45 <td><input type="text" id="organization_search" {disabled} autocomplete="off" size=20 onKeyUp="javascript:search_organization(this.value, 'ea_combo_org_info');" onBlur="javascript:sinc_combos_org(context.value); get_associated_domain(context.value); get_available_groups(context.value); get_available_maillists(context.value); get_available_sambadomains(context.value, '{type}')"></td> 45 46 </tr> 46 47 47 48 <tr bgcolor={row_off}> 48 49 <td>{lang_organizations}:</td> 49 <td><select {disabled} id="ea_combo_org_info" name="context" onchange="javascript:sinc_combos_org(this.value); get_a vailable_groups(this.value); get_available_maillists(this.value); get_available_sambadomains(this.value, '{type}')">{sectors}</select></td>50 <td><select {disabled} id="ea_combo_org_info" name="context" onchange="javascript:sinc_combos_org(this.value); get_associated_domain(this.value); get_available_groups(this.value); get_available_maillists(this.value); get_available_sambadomains(this.value, '{type}')">{sectors}</select></td> 50 51 </tr> 51 52 -
trunk/expressoAdmin1_2/templates/default/institutional_accounts_modal.tpl
r1975 r1991 17 17 <br> 18 18 {lang_organization}:<br> 19 <select id="ea_combo_org" name="context" onchange="javascript:sinc_combos_org(this.value);">{manager_organizations}</select><br> 19 <select id="ea_combo_org" name="context" onchange="javascript:sinc_combos_org(this.value);javascript:get_associated_domain(this.value);">{manager_organizations}</select><br> 20 21 <input type="hidden" id="associated_domain" name="associated_domain"> 20 22 21 23 {lang_full_name}: <font color="blue">{lang_eg}: Setor Diser</font><br> -
trunk/expressoAdmin1_2/templates/default/sectors_form.tpl
r1516 r1991 21 21 <td> 22 22 <input type="text" {disable} autocomplete="off" name="sector" value={sector}> 23 </td> 24 </tr> 25 <tr> 26 <td> 27 {lang_Associated_domain}: 28 </td> 29 <td> 30 <input type="text" {disable} autocomplete="off" name="associated_domain" value={associated_domain}> 23 31 </td> 24 32 </tr> -
trunk/expressoAdmin1_2/templates/default/shared_accounts_modal.tpl
r1986 r1991 16 16 17 17 {lang_organization}: 18 <select id="ea_combo_org" name="context" onchange="javascript:sinc_combos_org(this.value);">{manager_organizations}</select><br> 18 <select id="ea_combo_org" name="context" onchange="javascript:sinc_combos_org(this.value);javascript:get_associated_domain(this.value);">{manager_organizations}</select><br> 19 20 <input type="hidden" id="associated_domain" name="associated_domain"> 19 21 20 22 {lang_full_name}:
Note: See TracChangeset
for help on using the changeset viewer.