"Ajax to construct homedirectory from specified directory name in setup and account_lid"

This commit is contained in:
Ralf Becker 2009-12-09 08:24:16 +00:00
parent 30234979e4
commit 9993092b7f

View File

@ -1387,7 +1387,7 @@
{
$lang_homedir = lang('home directory');
$lang_shell = lang('login shell');
$homedirectory = '<input name="homedirectory" value="'. ($_account_id?$userData['homedirectory']:$GLOBALS['egw_info']['server']['ldap_account_home'].$account_lid).'">';
$homedirectory = '<input name="homedirectory" id="homedirectory" value="'. ($_account_id?$userData['homedirectory']:$GLOBALS['egw_info']['server']['ldap_account_home'].$account_lid).'">';
$loginshell = '<input name="loginshell" value="'
. ($_account_id?$userData['loginshell']:$GLOBALS['egw_info']['server']['ldap_account_shell'])
. '">';
@ -1588,6 +1588,11 @@
$response->addScript("alert('".addslashes(lang('That loginid has already been taken').': '.$account_lid)."'); document.getElementById('account').value='".
($account_id ? $GLOBALS['egw']->accounts->id2name($account_id) : '')."'; document.getElementById('account').focus();");
}
if ($GLOBALS['egw_info']['server']['ldap_extra_attributes'] &&
($home = $GLOBALS['egw_info']['server']['ldap_account_home']) && $home != '/dev/null')
{
$response->addAssign('homedirectory','value',$home.'/'.$account_lid);
}
return $response->getXML();
}