mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
processes can be transfered to a new user
currently only for reviews
This commit is contained in:
parent
dabf821b6a
commit
809f224e7d
|
@ -205,6 +205,11 @@ else if ($action == "removefromprocesses") {
|
|||
UI::exitError(getMLText("admin_tools"),getMLText("cannot_delete_yourself"));
|
||||
}
|
||||
|
||||
$userToAssign = $dms->getUser($_POST["assignTo"]);
|
||||
if (!is_object($userToAssign)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
|
||||
}
|
||||
|
||||
$userToRemove = $dms->getUser($userid);
|
||||
if (!is_object($userToRemove)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
|
||||
|
@ -219,7 +224,7 @@ else if ($action == "removefromprocesses") {
|
|||
$_POST["status"]["receipt"] = array();
|
||||
if(!isset($_POST["status"]["revision"]))
|
||||
$_POST["status"]["revision"] = array();
|
||||
if (!$userToRemove->removeFromProcesses($user, $_POST['status'])) {
|
||||
if (!$userToRemove->removeFromProcesses($user, $_POST['status'], $userToAssign)) {
|
||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||
}
|
||||
|
||||
|
|
|
@ -48,8 +48,11 @@ if ($rmuser->getID()==$user->getID()) {
|
|||
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
|
||||
}
|
||||
|
||||
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||
|
||||
if($view) {
|
||||
$view->setParam('rmuser', $rmuser);
|
||||
$view->setParam('allusers', $allusers);
|
||||
$view->setParam('accessobject', $accessop);
|
||||
$view($_GET);
|
||||
exit;
|
||||
|
|
|
@ -31,6 +31,7 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
|||
$dms = $this->params['dms'];
|
||||
$user = $this->params['user'];
|
||||
$rmuser = $this->params['rmuser'];
|
||||
$allusers = $this->params['allusers'];
|
||||
|
||||
$this->htmlStartPage(getMLText("admin_tools"));
|
||||
$this->globalNavigation();
|
||||
|
@ -51,6 +52,23 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
|||
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
||||
|
||||
<?php
|
||||
$options = array();
|
||||
foreach ($allusers as $currUser) {
|
||||
if ($currUser->isGuest() || ($currUser->getID() == $rmuser->getID()) )
|
||||
continue;
|
||||
|
||||
if ($rmuser && $currUser->getID()==$rmuser->getID()) $selected=$count;
|
||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()));
|
||||
}
|
||||
$this->formField(
|
||||
getMLText("transfer_process_to_user"),
|
||||
array(
|
||||
'element'=>'select',
|
||||
'name'=>'assignTo',
|
||||
'class'=>'chzn-select',
|
||||
'options'=>$options
|
||||
)
|
||||
);
|
||||
$reviewStatus = $rmuser->getReviewStatus();
|
||||
$tmpr = array();
|
||||
$cr = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
||||
|
|
Loading…
Reference in New Issue
Block a user