mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +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"));
|
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);
|
$userToRemove = $dms->getUser($userid);
|
||||||
if (!is_object($userToRemove)) {
|
if (!is_object($userToRemove)) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
|
UI::exitError(getMLText("admin_tools"),getMLText("invalid_user_id"));
|
||||||
|
@ -219,7 +224,7 @@ else if ($action == "removefromprocesses") {
|
||||||
$_POST["status"]["receipt"] = array();
|
$_POST["status"]["receipt"] = array();
|
||||||
if(!isset($_POST["status"]["revision"]))
|
if(!isset($_POST["status"]["revision"]))
|
||||||
$_POST["status"]["revision"] = array();
|
$_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"));
|
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"));
|
UI::exitError(getMLText("rm_user"),getMLText("cannot_delete_yourself"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$allusers = $dms->getAllUsers($settings->_sortUsersInList);
|
||||||
|
|
||||||
if($view) {
|
if($view) {
|
||||||
$view->setParam('rmuser', $rmuser);
|
$view->setParam('rmuser', $rmuser);
|
||||||
|
$view->setParam('allusers', $allusers);
|
||||||
$view->setParam('accessobject', $accessop);
|
$view->setParam('accessobject', $accessop);
|
||||||
$view($_GET);
|
$view($_GET);
|
||||||
exit;
|
exit;
|
||||||
|
|
|
@ -31,6 +31,7 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$rmuser = $this->params['rmuser'];
|
$rmuser = $this->params['rmuser'];
|
||||||
|
$allusers = $this->params['allusers'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("admin_tools"));
|
$this->htmlStartPage(getMLText("admin_tools"));
|
||||||
$this->globalNavigation();
|
$this->globalNavigation();
|
||||||
|
@ -51,6 +52,23 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
|
||||||
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
<?php echo createHiddenFieldWithKey('removefromprocesses'); ?>
|
||||||
|
|
||||||
<?php
|
<?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();
|
$reviewStatus = $rmuser->getReviewStatus();
|
||||||
$tmpr = array();
|
$tmpr = array();
|
||||||
$cr = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
$cr = array("-2"=>0, '-1'=>0, '0'=>0, '1'=>0);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user