Changeset 33 for trunk/expressoAdmin1_2
- Timestamp:
- 06/21/07 08:32:34 (17 years ago)
- Location:
- trunk/expressoAdmin1_2
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expressoAdmin1_2/inc/class.functions.inc.php
r32 r33 428 428 */ 429 429 430 function get_organizations($context, $selected='' )430 function get_organizations($context, $selected='', $referral=false, $show_invisible_ou=true) 431 431 { 432 432 $s = CreateObject('phpgwapi.sector_search_ldap'); 433 $sectors_info = $s->get_organizations($context, $selected, false, true);433 $sectors_info = $s->get_organizations($context, $selected, $referral, $show_invisible_ou); 434 434 return $sectors_info; 435 435 } 436 436 437 function get_sectors($selected='', $referral=false, $show_invisible_ou=true) 438 { 439 $s = CreateObject('phpgwapi.sector_search_ldap'); 440 $sectors_info = $s->get_sectors($selected, $referral, $show_invisible_ou); 441 return $sectors_info; 442 } 443 437 444 /* 438 445 function get_sectors($context, $selected='') -
trunk/expressoAdmin1_2/inc/class.group.inc.php
r23 r33 93 93 { 94 94 $group_info['objectClass'][] = 'sambaGroupMapping'; 95 $group_info['sambaSID'] = $ this->current_config['expressoAdmin_sambaSID'] . '-' . (($id * 2) + 1001);95 $group_info['sambaSID'] = $params['sambadomain'] . '-' . (($id * 2) + 1001); 96 96 $group_info['sambaGroupType'] = '2'; 97 97 } … … 167 167 168 168 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 169 // REPLACE SAMBASID OF SAMBA 170 if ( ($this->current_config['expressoAdmin_samba_support'] == 'true') && ($diff['sambadomain']) ) 171 { 172 $ldap_mod_replace['sambaSID'] = $new_values['sambadomain'] . '-' . ((2 * $new_values['uidnumber'])+1001); 173 $this->db_functions->write_log("Alterado dominio samba do grupo $dn para " . $new_values['sambadomain'],'',$dn,'',''); 174 } 175 176 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 169 177 // REPLACE DESCRIPTION 170 178 if ($new_values['description'] != $old_values['description']) 171 179 { 172 180 $ldap_mod_replace['description'] = $new_values['description']; 181 $this->db_functions->write_log("Modificado descrição do grupo $dn",'',$dn,'',''); 182 } 183 184 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 185 // CALL LDAP_REPLACE FUNCTION 186 if (count($ldap_mod_replace)) 187 { 173 188 $result = $this->ldap_functions->replace_user_attributes($dn, $ldap_mod_replace); 174 189 if (!$result['status']) … … 177 192 $return['msg'] .= $result['msg']; 178 193 } 179 else 180 $this->db_functions->write_log("Modificado descrição do grupo $dn",'',$dn,'',''); 181 } 194 } 182 195 183 196 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// … … 213 226 $ldap_add['objectClass'][] = 'sambaGroupMapping'; 214 227 $ldap_add['sambagrouptype'] = '2'; 215 $ldap_add['sambasid'] = $ this->current_config['expressoAdmin_sambaSID'] . '-' . ((2 * $new_values['gidnumber'])+1001);228 $ldap_add['sambasid'] = $new_values['sambadomain'] . '-' . ((2 * $new_values['gidnumber'])+1001); 216 229 217 230 $result = $this->ldap_functions->add_user_attributes($dn, $ldap_add); … … 225 238 } 226 239 } 227 240 228 241 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 229 242 // ADD ATTRIBUTES -
trunk/expressoAdmin1_2/inc/class.ldap_functions.inc.php
r32 r33 371 371 372 372 $entries = ldap_get_entries($this->ldap, $groups_list); 373 return $entries; 373 374 $options = ''; 375 for ($i=0; $i<$entries['count']; $i++) 376 { 377 $options .= "<option value=" . $entries[$i]['gidnumber'][0] . ">" . $entries[$i]['cn'][0] . "</option>"; 378 } 379 380 return $options; 374 381 } 375 382 … … 382 389 383 390 $entries = ldap_get_entries($this->ldap, $maillists); 384 return $entries; 391 392 $options = ''; 393 for ($i=0; $i<$entries['count']; $i++) 394 { 395 $options .= "<option value=" . $entries[$i]['uidnumber'][0] . ">" . $entries[$i]['uid'][0] . " (" . $entries[$i]['mail'][0] . ")" . "</option>"; 396 } 397 return $options; 385 398 } 386 399 … … 744 757 if ($entry[0]['objectclass'][$i] == 'sambaGroupMapping') 745 758 $result['sambaGroup'] = true; 759 760 $a_tmp = explode("-", $entry[0]['sambasid'][0]); 761 array_pop($a_tmp); 762 $result['sambasid'] = implode("-", $a_tmp); 746 763 } 747 764 … … 1161 1178 return $return; 1162 1179 } 1163 1180 /* 1164 1181 function rename_departmentnumber($old_dp, $new_dp) 1165 1182 { … … 1177 1194 $ldap_mod_replace['departmentnumber'] = $new_dp; 1178 1195 @ldap_mod_replace ( $this->ldap, $dn, $ldap_mod_replace); 1179 / *if (!@ldap_mod_replace ( $this->ldap, $dn, $ldap_mod_replace))1180 {1181 $return['status'] = false;1182 $return['msg'] .= 'Erro em ldap_funcitons->rename_departmentnumber: ' . ldap_error($this->ldap);1183 }*/1196 //if (!@ldap_mod_replace ( $this->ldap, $dn, $ldap_mod_replace)) 1197 //{ 1198 // $return['status'] = false; 1199 // $return['msg'] .= 'Erro em ldap_funcitons->rename_departmentnumber: ' . ldap_error($this->ldap); 1200 //} 1184 1201 } 1202 return $return; 1203 } 1204 */ 1205 /* 1206 function get_sambadomains($context) 1207 { 1208 $return['status'] = true; 1209 $return['sambaDomains'] = array(); 1210 1211 $justthese = array("sambaSID","sambaDomainName"); 1212 $filter="(objectClass=sambaDomain)"; 1213 $search = ldap_search($this->ldap, $context, $filter, $justthese); 1214 $entry = ldap_get_entries($this->ldap, $search); 1215 1216 for ($i=0; $i<$entry['count']; $i++) 1217 { 1218 $return['sambaDomains'][$i]['samba_domain_sid'] = $entry[$i]['sambasid'][0]; 1219 $return['sambaDomains'][$i]['samba_domain_name'] = $entry[$i]['sambadomainname'][0]; 1220 $return['sambaDomains'][$i]['samba_domain_dn'] = $entry[$i]['dn']; 1221 } 1222 1223 return $return; 1224 } 1225 */ 1226 function exist_sambadomains($context, $sambaDomainName) 1227 { 1228 $justthese = array("dn"); 1229 $filter="(&(objectClass=sambaDomain)(sambaDomainName=$sambaDomainName))"; 1230 $search = ldap_search($this->ldap, $context, $filter, $justthese); 1231 $entry = ldap_get_entries($this->ldap, $search); 1232 1233 if ($entry['count']) 1234 return true; 1235 else 1236 return false; 1237 } 1238 1239 // Primeiro nilvel de organização. 1240 function exist_sambadomains_in_context($params) 1241 { 1242 $dn = $GLOBALS['phpgw_info']['server']['ldap_context']; 1243 $array_dn = ldap_explode_dn ( $dn, 0 ); 1244 1245 $context = $params['context']; 1246 $array_context = ldap_explode_dn ( $context, 0 ); 1247 1248 // Pego o setor no caso do contexto ser um sub-setor. 1249 if (($array_dn['count']+1) < ($array_context['count'])) 1250 { 1251 // inverto o array_dn para poder retirar o count 1252 $array_dn_reverse = array_reverse ( $array_dn, false ); 1253 1254 //retiro o count 1255 array_pop($array_dn_reverse); 1256 1257 //incluo o setor no dn 1258 array_push ( $array_dn_reverse, $array_context[ $array_context['count'] - 1 - $array_dn['count']]); 1259 1260 // Volto a ordem natural 1261 $array_dn = array_reverse ( $array_dn_reverse, false ); 1262 1263 // Implodo 1264 $context = implode ( ",", $array_dn ); 1265 } 1266 1267 $justthese = array("dn","sambaDomainName"); 1268 $filter="(objectClass=sambaDomain)"; 1269 $search = ldap_list($this->ldap, $context, $filter, $justthese); 1270 $entry = ldap_get_entries($this->ldap, $search); 1271 1272 for ($i=0; $i<$entry['count']; $i++) 1273 { 1274 $return['sambaDomains'][$i] = $entry[$i]['sambadomainname'][0]; 1275 } 1276 1277 if ($entry['count']) 1278 $return['status'] = true; 1279 else 1280 $return['status'] = false; 1281 1185 1282 return $return; 1186 1283 } -
trunk/expressoAdmin1_2/inc/class.uiaccounts.inc.php
r32 r33 178 178 function add_users() 179 179 { 180 $GLOBALS['phpgw']->js->validate_file('jscode','users','expressoAdmin1_2'); 181 //$GLOBALS['phpgw']->js->set_onload('get_sectors(document.forms[0].context.value);'); 180 $GLOBALS['phpgw']->js->validate_file('jscode','users','expressoAdmin1_2'); 182 181 $GLOBALS['phpgw']->js->set_onload('get_available_groups(document.forms[0].context.value);'); 183 182 $GLOBALS['phpgw']->js->set_onload('get_available_maillists(document.forms[0].context.value);'); 184 183 if ($this->current_config['expressoAdmin_samba_support'] == 'true') 184 $GLOBALS['phpgw']->js->set_onload('get_available_sambadomains(document.forms[0].context.value, \'create_user\');'); 185 185 186 $manager_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 186 187 $tmp = $this->functions->read_acl($manager_lid); … … 220 221 foreach ($a_sambadomains as $a_sambadomain) 221 222 { 222 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; 223 // So mostra os sambaDomainName do contexto do manager 224 if ($this->ldap_functions->exist_sambadomains($manager_context, $a_sambadomain['samba_domain_name'])) 225 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; 223 226 } 224 227 } … … 234 237 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uiaccounts.list_users'), 235 238 'display_samba_suport' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? '' : 'display:none', 239 'disabled_access_button'=> 'disabled', 236 240 237 241 // First ABA -
trunk/expressoAdmin1_2/inc/class.uidomains.inc.php
r27 r33 78 78 else 79 79 { 80 81 80 foreach($sambadomains_info as $domains) 82 81 { … … 119 118 120 119 // Pega combo das organizações e seleciona, caso seja um post, o setor que o usuario selecionou. 121 $organizations = $this->functions->get_ organizations($manager_context, $_POST['context']);122 120 $organizations = $this->functions->get_sectors($_POST['context'], false, false); 121 123 122 unset($GLOBALS['phpgw_info']['flags']['noheader']); 124 123 unset($GLOBALS['phpgw_info']['flags']['nonavbar']); -
trunk/expressoAdmin1_2/inc/class.uigroups.inc.php
r24 r33 23 23 var $group; 24 24 var $functions; 25 var $ldap_functions; 26 var $db_functions; 25 27 26 28 function uigroups() … … 29 31 $this->nextmatchs = createobject('phpgwapi.nextmatchs'); 30 32 $this->functions = CreateObject('expressoAdmin1_2.functions'); 33 $this->ldap_functions = CreateObject('expressoAdmin1_2.ldap_functions'); 34 $this->db_functions = CreateObject('expressoAdmin1_2.db_functions'); 31 35 32 36 $c = CreateObject('phpgwapi.config','expressoAdmin1_2'); … … 167 171 { 168 172 $GLOBALS['phpgw']->js->set_onload('get_available_users(document.forms[0].org_context.value, document.forms[0].ea_check_allUsers.checked);'); 169 173 if ($this->current_config['expressoAdmin_samba_support'] == 'true') 174 $GLOBALS['phpgw']->js->set_onload('get_available_sambadomains(document.forms[0].context.value, \'create_group\');'); 175 170 176 $account_lid = $GLOBALS['phpgw']->accounts->data['account_lid']; 171 177 $acl = $this->functions->read_acl($account_lid); … … 193 199 // Chama funcao para criar lista de aplicativos disponiveis. 194 200 $apps = $this->functions->make_list_app($account_lid, $manager_context, ''); 201 202 // Cria combo de dominio samba 203 if ($this->current_config['expressoAdmin_samba_support'] == 'true') 204 { 205 $a_sambadomains = $this->db_functions->get_sambadomains_list(); 206 $sambadomainname_options = ''; 207 if (count($a_sambadomains)) 208 { 209 foreach ($a_sambadomains as $a_sambadomain) 210 { 211 // So mostra os sambaDomainName do contexto do manager 212 if ($this->ldap_functions->exist_sambadomains($manager_context, $a_sambadomain['samba_domain_name'])) 213 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; 214 } 215 } 216 } 195 217 196 218 // Seta variaveis utilizadas pelo tpl. … … 201 223 'cn' => '', 202 224 'restrictionsOnGroup' => $this->current_config['expressoAdmin_restrictionsOnGroup'], 225 'type' => 'create_group', 203 226 'ldap_context' => $GLOBALS['phpgw_info']['server']['ldap_context'], 204 227 'lang_back' => lang('Back'), … … 212 235 'lang_all_users' => lang('Select users from all sub-organizations'), 213 236 'apps' => $apps, 214 'use_attrs_samba_checked' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? 'CHECKED' : '', 237 //'use_attrs_samba_checked' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? 'CHECKED' : '', 238 'use_attrs_samba_checked' => '', 239 'disabled_samba' => 'disabled', 240 'display_samba_options' => $this->current_config['expressoAdmin_samba_support'] == 'true' ? '' : '"display:none"', 241 'sambadomainname_options' => $sambadomainname_options, 215 242 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.list_groups'), 216 243 'combo_manager_org' => $combo_manager_org, … … 283 310 // Chama funcao para criar lista de aplicativos disponiveis. 284 311 $apps = $this->functions->make_list_app($account_lid, $manager_context, $group_info['apps']); 312 313 // Cria combo de dominios do samba 314 if ($this->current_config['expressoAdmin_samba_support'] == 'true') 315 { 316 $a_sambadomains = $this->db_functions->get_sambadomains_list(); 317 $sambadomainname_options = ''; 318 if (count($a_sambadomains)) 319 { 320 foreach ($a_sambadomains as $a_sambadomain) 321 { 322 if ($a_sambadomain['samba_domain_sid'] == $group_info['sambasid']) 323 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "' SELECTED>" . $a_sambadomain['samba_domain_name'] . "</option>"; 324 else 325 $sambadomainname_options .= "<option value='" . $a_sambadomain['samba_domain_sid'] . "'>" . $a_sambadomain['samba_domain_name'] . "</option>"; 326 } 327 } 328 } 285 329 286 330 // Seta variaveis utilizadas pelo tpl. … … 306 350 'apps' => $apps, 307 351 'use_attrs_samba_checked' => $group_info['sambaGroup'] ? 'CHECKED' : '', 352 'disabled_samba' => $group_info['sambaGroup'] ? '' : 'disabled', 353 'sambadomainname_options' => $sambadomainname_options, 308 354 'phpgwaccountvisible_checked' => $group_info['phpgwaccountvisible'] == '-1' ? 'CHECKED' : '', 309 355 'back_url' => $GLOBALS['phpgw']->link('/index.php','menuaction=expressoAdmin1_2.uigroups.list_groups'), -
trunk/expressoAdmin1_2/inc/class.uisectors.inc.php
r32 r33 191 191 'lang_context' => lang('Context'), 192 192 'lang_sector_name' => lang('Sector name'), 193 'lang_ visible' => lang('Visible'),193 'lang_occult_ou' => lang('Occult Sector'), 194 194 'error_messages' => $_POST['error_messages'] == '' ? '' : "<script type='text/javascript'>alert('".$_POST['error_messages']."')</script>", 195 195 ); -
trunk/expressoAdmin1_2/inc/class.user.inc.php
r32 r33 119 119 $user_info['loginShell'] = '/bin/bash'; 120 120 121 //$user_info['sambaSID'] = $this->current_config['expressoAdmin_sambaSID'] . '-' . ((2 * $id)+1000);122 //$user_info['sambaPrimaryGroupSID'] = $this->current_config['expressoAdmin_sambaSID'] . '-' . ((2 * $user_info['gidNumber'])+1001);123 121 $user_info['sambaSID'] = $params['sambadomain'] . '-' . ((2 * $id)+1000); 124 122 $user_info['sambaPrimaryGroupSID'] = $params['sambadomain'] . '-' . ((2 * $user_info['gidNumber'])+1001); -
trunk/expressoAdmin1_2/js/jscode/groups.js
r2 r33 277 277 } 278 278 } 279 280 function use_samba_attrs(value) 281 { 282 document.forms[0].sambadomain.disabled = !value; 283 } 284 285 function get_available_sambadomains(context, type) 286 { 287 if ((type == 'create_group') && (document.getElementById('ea_div_display_samba_options').style.display != 'none')) 288 { 289 var handler_get_available_sambadomains = function(data) 290 { 291 document.forms[0].use_attrs_samba.checked = data.status; 292 use_samba_attrs(data.status); 293 294 if (data.status) 295 { 296 combo_sambadomains = document.getElementById('ea_combo_sambadomains'); 297 for (i=0; i<data.sambaDomains.length; i++) 298 { 299 for (j=0; j<combo_sambadomains.length; j++) 300 { 301 if (combo_sambadomains.options[j].text == data.sambaDomains[i]) 302 { 303 combo_sambadomains.options[j].selected = true; 304 break; 305 } 306 } 307 } 308 309 } 310 } 311 cExecute ('$this.ldap_functions.exist_sambadomains_in_context&context='+context, handler_get_available_sambadomains); 312 } 313 } -
trunk/expressoAdmin1_2/js/jscode/users.js
r32 r33 199 199 } 200 200 201 /*202 function get_sectors(organization, user_context, user_sector)203 {204 return;205 var handler_get_sectors = function(data)206 {207 select_sector = document.getElementById('ea_select_sectors');208 //Limpa o select209 for(var i=0; i<select_sector.options.length; i++)210 {211 if(select_sector.options[i].selected == true)212 {213 select_sector.options[i] = null;214 i--;215 }216 }217 218 if (data.length > 0)219 {220 option_seleted = false;221 222 new_option = new Option('Sem Setor','',false,false);223 select_sector.options[0] = new_option;224 225 for (i=0; i<data.length; i++)226 {227 new_option = new Option(data[i].sector,data[i].sector,false,false);228 select_sector.options[i+1] = new_option;229 if ((user_sector == data[i].sector) && (user_context == organization))230 {231 select_sector.options[i+1].selected = true;232 option_seleted = true;233 }234 }235 select_sector.disabled = false;236 if (!option_seleted)237 select_sector.options[0].selected = true;238 }239 else240 {241 new_option = new Option('Nenhum setor cadastrado para esta organização.','',false,false);242 select_sector.options[0] = new_option;243 select_sector.options[0].selected = true;244 }245 }246 cExecute ('$this.db_functions.get_sectors&organization='+organization, handler_get_sectors);247 }248 */249 250 201 function get_available_groups(context) 251 202 { … … 253 204 { 254 205 select_available_groups = document.getElementById('ea_select_available_groups'); 255 //Limpa o select 256 for(var i=0; i<select_available_groups.options.length; i++) 257 { 258 select_available_groups.options[i] = null; 259 i--; 260 } 261 262 if (data.length > 0) 263 { 264 for (i=0; i<data.length; i++) 265 { 266 new_option = new Option(data[i].cn[0],data[i].gidnumber[0],false,false); 267 select_available_groups.options[i] = new_option; 268 } 269 //select_available_groups.disabled = false; 270 select_available_groups.options[0].selected = true; 206 207 if ((data) && (data.length > 0)) 208 { 209 // Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio. 210 select_available_groups.innerHTML = '#' + data; 211 select_available_groups.outerHTML = select_available_groups.outerHTML; 271 212 select_available_groups_clone = select_available_groups.cloneNode(true); 272 213 document.getElementById('ea_input_searchGroup').value = ''; 273 214 } 215 else 216 { 217 // Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio. 218 select_available_groups.innerHTML = '#'; 219 select_available_groups.outerHTML = select_available_groups.outerHTML; 274 220 } 275 221 } 276 222 277 cExecute ('$this.ldap_functions.get_available_groups&context='+context, handler_get_available_groups); 278 } 279 280 223 cExecute ('$this.ldap_functions.get_available_groups&context='+context, handler_get_available_groups); 224 } 225 281 226 function add_user2group() 282 227 { … … 348 293 } 349 294 } 350 351 //return;352 /*353 //Refaz combo do primary group354 for(var i=0; i<combo_primary_user_group.options.length; i++)355 {356 if(combo_primary_user_group.options[i].selected == true)357 {358 var user_primary_group = combo_primary_user_group.options[i].value;359 alert(user_primary_group);360 }361 362 combo_primary_user_group.options[i] = null;363 i--;364 }365 366 for(var i = 0;i < select_user_groups.options.length; i++)367 {368 new_option = document.createElement('option');369 new_option.value= select_user_groups.options[i].value;370 new_option.text = select_user_groups.options[i].text;371 372 if (user_primary_group == select_user_groups.options[i].value)373 new_option.selected = true;374 375 combo_primary_user_group.options[i] = new_option;376 }*/377 295 } 378 296 … … 382 300 { 383 301 select_available_maillists = document.getElementById('ea_select_available_maillists'); 384 //Limpa o select 385 for(var i=0; i<select_available_maillists.options.length; i++) 386 { 387 select_available_maillists.options[i] = null; 388 i--; 389 } 390 391 if (data.length > 0) 392 { 393 for (i=0; i<data.length; i++) 394 { 395 new_option = new Option(data[i].uid[0]+' ('+data[i].mail[0]+')', data[i].uidnumber[0], false, false); 396 select_available_maillists.options[i] = new_option; 397 } 398 select_available_maillists.disabled = false; 399 select_available_maillists.options[0].selected = true; 302 303 if ((data) && (data.length > 0)) 304 { 305 // Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio. 306 select_available_maillists.innerHTML = '#' + data; 307 select_available_maillists.outerHTML = select_available_maillists.outerHTML; 400 308 select_available_maillists_clone = select_available_maillists.cloneNode(true); 401 309 document.getElementById('ea_input_searchMailList').value = ''; 402 310 } 403 } 404 311 else 312 { 313 // Necessario, pois o IE6 tem um bug que retira o primeiro options se o innerHTML estiver vazio. 314 select_available_maillists.innerHTML = '#'; 315 select_available_maillists.outerHTML = select_available_maillists.outerHTML; 316 } 317 } 405 318 cExecute ('$this.ldap_functions.get_available_maillists&context='+context, handler_get_available_maillists); 406 319 } … … 663 576 } 664 577 oWait.innerHTML = ' '; 665 } 578 } 579 580 function get_available_sambadomains(context, type) 581 { 582 if ((type == 'create_user') && (document.getElementById('tabcontent6').style.display != 'none')) 583 { 584 var handler_get_available_sambadomains = function(data) 585 { 586 document.forms[0].use_attrs_samba.checked = data.status; 587 use_samba_attrs(data.status); 588 589 if (data.status) 590 { 591 combo_sambadomains = document.getElementById('ea_combo_sambadomains'); 592 for (i=0; i<data.sambaDomains.length; i++) 593 { 594 for (j=0; j<combo_sambadomains.length; j++) 595 { 596 if (combo_sambadomains.options[j].text == data.sambaDomains[i]) 597 { 598 combo_sambadomains.options[j].selected = true; 599 break; 600 } 601 } 602 } 603 604 } 605 } 606 cExecute ('$this.ldap_functions.exist_sambadomains_in_context&context='+context, handler_get_available_sambadomains); 607 } 608 } -
trunk/expressoAdmin1_2/templates/default/accounts_form.tpl
r32 r33 42 42 <tr bgcolor={row_on}> 43 43 <td>{lang_organizations}:</td> 44 <td><select {disabled} id="ea_combo_org_info" name="context" onchange="javascript:sinc_combos_org(this.value); get_available_groups(this.value); get_available_maillists(this.value); ">{sectors}</select></td>44 <td><select {disabled} id="ea_combo_org_info" name="context" onchange="javascript:sinc_combos_org(this.value); get_available_groups(this.value); get_available_maillists(this.value); get_available_sambadomains(this.value, '{type}')">{sectors}</select></td> 45 45 </tr> 46 46 … … 106 106 107 107 <tr bgcolor={row_on}> 108 <td><input type='button' {disabled} value='Exibir registros de acesso' onclick="document.location.href='./index.php?menuaction=expressoAdmin1_2.uiaccounts.show_access_log&account_id={uidnumber}';"></td>108 <td><input type='button' {disabled} {disabled_access_button} value='Exibir registros de acesso' onclick="document.location.href='./index.php?menuaction=expressoAdmin1_2.uiaccounts.show_access_log&account_id={uidnumber}';"></td> 109 109 </tr> 110 110 </table> … … 290 290 <td>{lang_sambadomain}:</td> 291 291 <td> 292 <select {disabled_samba} name="sambadomain" >292 <select {disabled_samba} name="sambadomain" id="ea_combo_sambadomains"> 293 293 {sambadomainname_options} 294 294 </select> -
trunk/expressoAdmin1_2/templates/default/groups_form.tpl
r24 r33 22 22 <td width="25%" bgcolor="#DDDDDD"> 23 23 Organização do Grupo:<br> 24 <select name="context" onchange="javascript:sinc_combos_org(this.value, ea_check_allUsers.checked); ">{combo_manager_org}</select><br>24 <select name="context" onchange="javascript:sinc_combos_org(this.value, ea_check_allUsers.checked); get_available_sambadomains(this.value, '{type}')">{combo_manager_org}</select><br> 25 25 {lang_group_name}: <font color="blue">Ex: grupo-celepar-rh</font> 26 26 <input name="cn" size="35" value="{cn}" autocomplete="off"><br> 27 27 Descrição:<br> 28 28 <input name="description" size="60" value="{description}" autocomplete="off"><br> 29 Usar atributos Samba: <input type="checkbox" {use_attrs_samba_checked} name="use_attrs_samba"><br> 29 <div id="ea_div_display_samba_options" style={display_samba_options}> 30 <table border="0"> 31 <tr bgcolor={row_on}> 32 <td>Usar atributos Samba:</td> 33 <td> 34 <input type="checkbox" {use_attrs_samba_checked} name="use_attrs_samba" onChange="javascript:use_samba_attrs(this.checked)"> 35 </td> 36 </tr> 37 <tr> 38 <td>Domínio:</td> 39 <td> 40 <select {disabled_samba} name="sambadomain" id="ea_combo_sambadomains"> 41 {sambadomainname_options} 42 </select> 43 </td> 44 </tr> 45 </table> 46 </div> 30 47 Ocultar este grupo no Expresso? <input type="checkbox" {phpgwaccountvisible_checked} name="phpgwaccountvisible"><br> 31 48
Note: See TracChangeset
for help on using the changeset viewer.