display via context menu selected users, some UI cleanups and name it in tree also "Bulk changes"

This commit is contained in:
ralf 2024-09-09 11:53:45 +02:00
parent 405e8ca30a
commit 2b93dea630
4 changed files with 22 additions and 18 deletions

View File

@ -71,7 +71,7 @@ class admin_hooks
if (! $GLOBALS['egw']->acl->check('account_access',16,'admin')) if (! $GLOBALS['egw']->acl->check('account_access',16,'admin'))
{ {
$file['Bulk password reset'] = Egw::link('/index.php','menuaction=admin.admin_passwordreset.index&ajax=true'); $file['Bulk changes'] = Egw::link('/index.php','menuaction=admin.admin_passwordreset.index&ajax=true');
$file['Application passwords'] = Egw::link('/index.php', 'menuaction=admin.EGroupware\\Admin\\Token.index&ajax=true'); $file['Application passwords'] = Egw::link('/index.php', 'menuaction=admin.EGroupware\\Admin\\Token.index&ajax=true');
} }

View File

@ -68,7 +68,7 @@ class admin_passwordreset
{ {
// Setup if opened as a dialog // Setup if opened as a dialog
$content['dialog'] = $_GET['dialog']; $content['dialog'] = $_GET['dialog'] ?? null;
if($content['dialog'] && !$content['users'] && isset($_GET['ids'])) if($content['dialog'] && !$content['users'] && isset($_GET['ids']))
{ {
$content['users'] = $_GET['ids']; $content['users'] = $_GET['ids'];
@ -181,7 +181,8 @@ class admin_passwordreset
$tmpl = new Api\Etemplate('admin.passwordreset'); $tmpl = new Api\Etemplate('admin.passwordreset');
$tmpl->exec('admin.admin_passwordreset.index',$content,$sel_options,$readonlys,array( $tmpl->exec('admin.admin_passwordreset.index',$content,$sel_options,$readonlys,array(
'changed' => $changed, 'changed' => $changed,
)); 'dialog' => $content['dialog'],
), 2 * !empty($content['dialog']));
} }
protected function resetAccount($account_id, $content, $change_pw, $current_hash, &$msg, &$changed) protected function resetAccount($account_id, $content, $change_pw, $current_hash, &$msg, &$changed)

View File

@ -179,7 +179,7 @@ class admin_ui
'group' => $group, 'group' => $group,
'nm_action' => 'popup', 'nm_action' => 'popup',
'url' => 'menuaction=admin.admin_passwordreset.index&dialog=true&ids=$id&select_all=$select_all', 'url' => 'menuaction=admin.admin_passwordreset.index&dialog=true&ids=$id&select_all=$select_all',
'width' => 750, 'width' => 800,
'height' => 600 'height' => 600
); );
// supporting both old way using $GLOBALS['menuData'] and new just returning data in hook // supporting both old way using $GLOBALS['menuData'] and new just returning data in hook

View File

@ -2,24 +2,22 @@
<!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd"> <!DOCTYPE overlay PUBLIC "-//EGroupware GmbH//eTemplate 2.0//EN" "https://www.egroupware.org/etemplate2.0.dtd">
<overlay> <overlay>
<template id="admin.passwordreset" template="" lang="" group="0" version="14.1"> <template id="admin.passwordreset" template="" lang="" group="0" version="14.1">
<grid> <grid width="100%">
<columns> <columns>
<column/> <column width="60%"/>
<column/>
<column/> <column/>
</columns> </columns>
<rows> <rows>
<row disabled="@dialog"> <row>
<et2-description value="Select users"></et2-description> <et2-description value="Select users" span="all"></et2-description>
<et2-description></et2-description>
</row> </row>
<row> <row>
<et2-select-account id="users" rows="15" multiple="1" hidden="@dialog"> <et2-select-account id="users" rows="15" multiple="true" required="true" span="all">
<!--<option value="~all~">All users</option>--> <!--<option value="~all~">All users</option>-->
</et2-select-account> </et2-select-account>
</row> </row>
<row> <row>
<groupbox id="actions"> <groupbox id="actions" span="all">
<caption label="Actions"/> <caption label="Actions"/>
<et2-select-account accountType="groups" id="group" label="Add to group" multiple="true"></et2-select-account> <et2-select-account accountType="groups" id="group" label="Add to group" multiple="true"></et2-select-account>
<et2-checkbox label="Set a random password" id="random_pw"></et2-checkbox> <et2-checkbox label="Set a random password" id="random_pw"></et2-checkbox>
@ -32,11 +30,13 @@
<et2-checkbox label="Notify user by email" id="notify"></et2-checkbox> <et2-checkbox label="Notify user by email" id="notify"></et2-checkbox>
<et2-hbox> <et2-hbox>
<et2-select label="Mail account" id="mail[activate]" emptyLabel="Leave unchanged"></et2-select> <et2-select label="Mail account" id="mail[activate]" emptyLabel="Leave unchanged"></et2-select>
<et2-number statustext="empty to NOT change" label="Quota (MB)" id="mail[quota]" precision="0"></et2-number> <et2-description label="Quota (MB)"></et2-description>
<et2-textbox statustext="change domain of email address and aliases" label="Domain" id="mail[domain]" validator="/^([a-z0-9]+([._-]{1}[a-z0-9]+)+)?$/i"></et2-textbox> <et2-number placeholder="Leave unchanged" id="mail[quota]" precision="0"></et2-number>
<et2-description label="Domain"></et2-description>
<et2-textbox placeholder="Leave unchanged" statustext="change domain of email address and aliases" id="mail[domain]"
validator="/^([a-z0-9]+([._-]{1}[a-z0-9]+)+)?$/i"></et2-textbox>
</et2-hbox> </et2-hbox>
</groupbox> </groupbox>
<et2-description></et2-description>
</row> </row>
<row valign="top"> <row valign="top">
<groupbox> <groupbox>
@ -61,8 +61,11 @@
</et2-vbox> </et2-vbox>
</row> </row>
<row> <row>
<et2-button label="Start" id="start" noSubmit="true" onclick="app.admin.bulkPasswordReset"></et2-button> <et2-hbox span="all">
<!--<et2-button label="Download CSV" id="download_csv" onclick="widget.getInstanceManager().postSubmit()" noSubmit="true"></et2-button>--> <et2-button label="Start" id="start" noSubmit="true" onclick="app.admin.bulkPasswordReset" image="play"></et2-button>
<et2-button label="Cancel" id="cancel" onclick="window.close();" hidden="!@dialog"></et2-button>
<!--<et2-button label="Download CSV" id="download_csv" onclick="widget.getInstanceManager().postSubmit()" noSubmit="true"></et2-button>-->
</et2-hbox>
</row> </row>
</rows> </rows>
</grid> </grid>