This commit is contained in:
skeeter 2001-11-27 01:19:56 +00:00
parent 29e8cc822c
commit ad4a94139c
3 changed files with 16 additions and 5 deletions

View File

@ -852,9 +852,9 @@
{
/* Change this to be an admin/setup setting. For now, default to expire one week from today. */
$time_var = time() + (60*60*24*7);
$userData['account_expires_month'] = date('m',$userData['expires'] ? $userData['expires'] : $time_var);
$userData['account_expires_day'] = date('d',$userData['expires'] ? $userData['expires'] : $time_var);
$userData['account_expires_year'] = date('Y',$userData['expires'] ? $userData['expires'] : $time_var);
$userData['account_expires_month'] = date('m',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
$userData['account_expires_day'] = date('d',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
$userData['account_expires_year'] = date('Y',$userData['expires'] > 0 ? $userData['expires'] : $time_var);
}
}
$page_params['menuaction'] = 'admin.boaccounts.'.($_account_id?'edit':'add').'_user';
@ -937,6 +937,7 @@
$var = Array(
'input_expires' => $GLOBALS['phpgw']->common->dateformatorder($_y,$_m,$_d,True),
'lang_never' => lang('Never'),
'account_lid' => '<input name="account_lid" value="' . $userData['account_lid'] . '">',
'lang_homedir' => $lang_homedir,
'lang_shell' => $lang_shell,
@ -949,6 +950,16 @@
'account_passwd_2' => $account_passwd_2,
'account_file_space' => $account_file_space
);
if($userData['expires'] == -1)
{
$var['never_expires'] = '<input type="checkbox" name="never_expires" value="True" checked>';
}
else
{
$var['never_expires'] = '<input type="checkbox" name="never_expires" value="True">';
}
$t->set_var($var);
$t->parse('password_fields','form_passwordinfo',True);

View File

@ -39,7 +39,7 @@
<tr bgcolor="{tr_color1}">
<td>{lang_expires}</td>
<td colspan="3">{input_expires}&nbsp;&nbsp;{lang_never}&nbsp;<input type="checkbox" name="never_expires" value="True"{never_expires}></td>
<td colspan="3">{input_expires}&nbsp;&nbsp;{lang_never}&nbsp;{never_expires}</td>
</tr>
{permissions_list}

View File

@ -46,7 +46,7 @@
<tr bgcolor="{tr_color1}">
<td>{lang_expires}</td>
<td colspan="3">{input_expires}&nbsp;&nbsp;{lang_never}&nbsp;<input type="checkbox" name="never_expires" value="True"{never_expires}></td>
<td colspan="3">{input_expires}&nbsp;&nbsp;{lang_never}&nbsp;{never_expires}</td>
</tr>
{permissions_list}