* Admin: bulk password reset: fixed missing password from email and csv, csv download is working again

also changed all et2 actions to not use an iframe with ajax=true
This commit is contained in:
Ralf Becker 2015-07-01 18:35:43 +00:00
parent 058ef3e89f
commit 6f2f6e71ed
4 changed files with 17 additions and 10 deletions

View File

@ -68,7 +68,7 @@ class admin_hooks
if (! $GLOBALS['egw']->acl->check('account_access',16,'admin'))
{
$file['Bulk password reset'] = egw::link('/index.php','menuaction=admin.admin_passwordreset.index');
$file['Bulk password reset'] = egw::link('/index.php','menuaction=admin.admin_passwordreset.index&ajax=true');
}
if (! $GLOBALS['egw']->acl->check('group_access',1,'admin'))
@ -86,7 +86,7 @@ class admin_hooks
}
if (! $GLOBALS['egw']->acl->check('global_categories_access',1,'admin'))
{
$file['Global Categories'] = egw::link('/index.php','menuaction=admin.admin_categories.index&appname=phpgw');
$file['Global Categories'] = egw::link('/index.php','menuaction=admin.admin_categories.index&appname=phpgw&ajax=true');
}
if (!$GLOBALS['egw']->acl->check('mainscreen_message_access',1,'admin') || !$GLOBALS['egw']->acl->check('mainscreen_message_access',2,'admin'))
@ -96,12 +96,12 @@ class admin_hooks
if (! $GLOBALS['egw']->acl->check('current_sessions_access',1,'admin'))
{
$file['View Sessions'] = egw::link('/index.php','menuaction=admin.admin_accesslog.sessions');
$file['View Sessions'] = egw::link('/index.php','menuaction=admin.admin_accesslog.sessions&ajax=true');
}
if (! $GLOBALS['egw']->acl->check('access_log_access',1,'admin'))
{
$file['View Access Log'] = egw::link('/index.php','menuaction=admin.admin_accesslog.index');
$file['View Access Log'] = egw::link('/index.php','menuaction=admin.admin_accesslog.index&ajax=true');
}
/* disable old EGroupware error_log, as it is not used anymore

View File

@ -73,10 +73,10 @@ class admin_passwordreset
if ($content['download_csv'] && $content['changed'])
{
html::content_header('changed.csv','text/csv');
//echo "account_lid;account_passwd;account_email;account_firstname;account_lastname\n";
//echo "account_lid;account_password;account_email;account_firstname;account_lastname\n";
foreach($content['changed'] as $account)
{
echo "$account[account_lid];$account[account_passwd];$account[account_email];$account[account_firstname];$account[account_lastname]\n";
echo "$account[account_lid];$account[account_password];$account[account_email];$account[account_firstname];$account[account_lastname]\n";
}
common::egw_exit();
}
@ -150,7 +150,7 @@ class admin_passwordreset
$GLOBALS['egw']->acl->delete_repository('preferences','nopasswordchange',$account_id);
}
}
$account['account_passwd'] = $password;
$account['account_password'] = $password;
if ((string)$content['mail']['activate'] !== '' || (string)$content['mail']['quota'] !== '' ||
strpos($content['mail']['domain'], '.') !== false)

View File

@ -87,4 +87,11 @@ td.admin_userAgent span {
}
#admin-customfield_edit .attributes .et2_label,#admin-customfield_edit .attributes input {
margin-right: 1em;
}
/**
* Bulk password reset
*/
#admin-passwordreset_actions >:nth-child(2) {
display: block;
}

View File

@ -19,11 +19,11 @@
<description/>
</row>
<row>
<groupbox>
<groupbox id="actions">
<caption label="Actions"/>
<checkbox label="Set a random password" id="random_pw"/>
<menulist>
<menupopup type="select-bool" label="Must change password upon next login" id="mustchangepassword" onchange="if (this.value=='1') document.getElementById(form::name('changepassword')).value='1';" options="Leave unchanged"/>
<menupopup type="select-bool" label="Must change password upon next login" id="mustchangepassword" options="Leave unchanged"/>
</menulist>
<menulist>
<menupopup type="select-bool" label="Can change password" id="changepassword" onchange="var mustchange=document.getElementById(form::name('mustchangepassword')); if (this.value=='0' &amp;&amp; mustchange.value) mustchange.value='0';" options="Leave unchanged"/>
@ -69,7 +69,7 @@
</row>
<row>
<button label="Start" id="start"/>
<button label="Download CSV" id="download_csv"/>
<buttononly label="Download CSV" id="download_csv" onclick="widget.getInstanceManager().postSubmit()"/>
</row>
</rows>
</grid>