mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 13:11:31 +00:00
use same user selection as on UsrMgr page
This commit is contained in:
parent
84ce189eff
commit
1f1fe940f8
|
@ -30,9 +30,9 @@ include("../inc/inc.Authentication.php");
|
||||||
|
|
||||||
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
$tmp = explode('.', basename($_SERVER['SCRIPT_FILENAME']));
|
||||||
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
$controller = Controller::factory($tmp[1], array('dms'=>$dms, 'user'=>$user));
|
||||||
|
$accessop = new SeedDMS_AccessOperation($dms, $user, $settings);
|
||||||
if (!$user->isAdmin()) {
|
if (!$accessop->check_controller_access($controller, $_POST)) {
|
||||||
UI::exitError(getMLText("document"),getMLText("access_denied"));
|
UI::exitError(getMLText("document_title", array("documentname" => "")),getMLText("access_denied"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if the form data comes from a trusted request */
|
/* Check if the form data comes from a trusted request */
|
||||||
|
|
|
@ -296,7 +296,7 @@ $(document).ready(function() {
|
||||||
$allUsers = $dms->getAllUsers($sortusersinlist);
|
$allUsers = $dms->getAllUsers($sortusersinlist);
|
||||||
foreach ($allUsers as $currUser) {
|
foreach ($allUsers as $currUser) {
|
||||||
if (!$currUser->isGuest())
|
if (!$currUser->isGuest())
|
||||||
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getEmail()))));
|
||||||
}
|
}
|
||||||
$this->formField(
|
$this->formField(
|
||||||
getMLText("owner"),
|
getMLText("owner"),
|
||||||
|
|
|
@ -247,30 +247,38 @@ $(document).ready( function() {
|
||||||
$this->contentSubHeading(getMLText("add_member"));
|
$this->contentSubHeading(getMLText("add_member"));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<form class="form-inline" action="../op/op.GroupMgr.php" method="POST" name="form_2" id="form_2">
|
<form class="form-horizontal" action="../op/op.GroupMgr.php" method="POST" name="form_2" id="form_2">
|
||||||
<?php echo createHiddenFieldWithKey('addmember'); ?>
|
<?php echo createHiddenFieldWithKey('addmember'); ?>
|
||||||
<input type="Hidden" name="action" value="addmember">
|
<input type="Hidden" name="action" value="addmember">
|
||||||
<input type="Hidden" name="groupid" value="<?php print $group->getID();?>">
|
<input type="Hidden" name="groupid" value="<?php print $group->getID();?>">
|
||||||
<table class="table-condensed">
|
<?php
|
||||||
<tr>
|
$options = array();
|
||||||
<td>
|
$allUsers = $dms->getAllUsers($sortusersinlist);
|
||||||
<select name="userid" id="userid">
|
foreach ($allUsers as $currUser) {
|
||||||
<option value="-1"><?php printMLText("select_one");?></option>
|
if (!$group->isMember($currUser))
|
||||||
<?php
|
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin().' - '.$currUser->getFullName()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getEmail()))));
|
||||||
foreach ($allUsers as $currUser)
|
}
|
||||||
if (!$group->isMember($currUser))
|
$this->formField(
|
||||||
print "<option value=\"".$currUser->getID()."\">" . htmlspecialchars($currUser->getLogin()." - ".$currUser->getFullName()) . "</option>\n";
|
getMLText("user"),
|
||||||
?>
|
array(
|
||||||
</select>
|
'element'=>'select',
|
||||||
</td>
|
'id'=>'userid',
|
||||||
<td>
|
'name'=>'userid',
|
||||||
<label class="checkbox"><input type="checkbox" name="manager" value="1"><?php printMLText("manager");?></label>
|
'class'=>'chzn-select',
|
||||||
</td>
|
'options'=>$options
|
||||||
<td>
|
)
|
||||||
<input type="submit" class="btn" value="<?php printMLText("add");?>">
|
);
|
||||||
</td>
|
$this->formField(
|
||||||
</tr>
|
getMLText("manager"),
|
||||||
</table>
|
array(
|
||||||
|
'element'=>'input',
|
||||||
|
'type'=>'checkbox',
|
||||||
|
'name'=>'manager',
|
||||||
|
'value'=>1
|
||||||
|
)
|
||||||
|
);
|
||||||
|
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('add'));
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ class SeedDMS_View_TransferDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$allusers = $this->params['allusers'];
|
$allusers = $this->params['allusers'];
|
||||||
$document = $this->params['document'];
|
$document = $this->params['document'];
|
||||||
$folder = $this->params['folder'];
|
$folder = $this->params['folder'];
|
||||||
|
$accessobject = $this->params['accessobject'];
|
||||||
|
|
||||||
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
$this->htmlStartPage(getMLText("document_title", array("documentname" => htmlspecialchars($document->getName()))));
|
||||||
$this->globalNavigation($folder);
|
$this->globalNavigation($folder);
|
||||||
|
@ -63,7 +64,9 @@ class SeedDMS_View_TransferDocument extends SeedDMS_Bootstrap_Style {
|
||||||
getMLText("transfer_to_user"),
|
getMLText("transfer_to_user"),
|
||||||
$html
|
$html
|
||||||
);
|
);
|
||||||
$this->formSubmit("<i class=\"fa fa-exchange\"></i> ".getMLText('transfer_document'));
|
if($accessobject->check_controller_access('TransferDocument', array('action'=>'run'))) {
|
||||||
|
$this->formSubmit("<i class=\"fa fa-exchange\"></i> ".getMLText('transfer_document'));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
</form>
|
</form>
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Reference in New Issue
Block a user