Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2019-11-19 18:45:43 +01:00
commit e873ba999b
5 changed files with 140 additions and 76 deletions

View File

@ -37,8 +37,6 @@ if (!$accessop->check_view_access($view, $_GET)) {
UI::exitError(getMLText("admin_tools"),getMLText("access_denied"));
}
$accessop = new SeedDMS_AccessOperation($dms, null, $user, $settings);
$attrdefs = $dms->getAllAttributeDefinitions();
if(isset($_GET['attrdefid']) && $_GET['attrdefid']) {

View File

@ -246,23 +246,24 @@ $(document).ready( function() {
<?php
$this->contentHeading(getMLText("role"));
?>
<div class="well">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select class="chzn-select" id="selector">
<option value="-1"><?php echo getMLText("choose_role")?>
<?php
$options = array();
$options[] = array("-1", getMLText("choose_role"));
foreach ($roles as $currRole) {
print "<option value=\"".$currRole->getID()."\" ".($selrole && $currRole->getID()==$selrole->getID() ? 'selected' : '').">" . htmlspecialchars($currRole->getName());
$options[] = array($currRole->getID(), htmlspecialchars($currRole->getName()), $selrole && $currRole->getID()==$selrole->getID());
}
$this->formField(
null, //getMLText("selection"),
array(
'element'=>'select',
'id'=>'selector',
'class'=>'chzn-select',
'options'=>$options
)
);
?>
</select>
</div>
</div>
</form>
</div>
<?php if($accessop->check_view_access($this, array('action'=>'info')) || $user->isAdmin()) { ?>
<div class="ajax" data-view="Acl" data-action="info" <?php echo ($selrole ? "data-query=\"roleid=".$selrole->getID()."\"" : "") ?>></div>
<?php } ?>

View File

@ -1057,7 +1057,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
(!empty($value['type']) ? ' type="'.$value['type'].'"' : '').
(!empty($value['id']) ? ' id="'.$value['id'].'"' : '').
(!empty($value['name']) ? ' name="'.$value['name'].'"' : '').
(!empty($value['value']) ? ' value="'.$value['value'].'"' : '').
(is_string($value['value']) || !empty($value['value']) ? ' value="'.$value['value'].'"' : '').
(!empty($value['placeholder']) ? ' placeholder="'.$value['placeholder'].'"' : '').
(!empty($value['autocomplete']) ? ' autocomplete="'.$value['autocomplete'].'"' : '').
(!empty($value['checked']) ? ' checked' : '').

View File

@ -108,59 +108,107 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
}
?>
<?php if(isset($tmpr["0"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[review][]" value="0" checked> <?php echo getMLText('reviews_not_touched', array('no_reviews' => count($tmpr["0"]))); ?> <?php echo getMLText('reviews_not_touched_latest', array('no_reviews' => $cr["0"])); ?>
</label>
</div>
</div>
<?php
$this->formField(
getMLText('reviews_not_touched', array('no_reviews' => count($tmpr["0"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[review][]',
'value'=>'0',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('reviews_not_touched_latest', array('no_reviews' => $cr["0"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpr["1"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[review][]" value="1"> <?php echo getMLText('reviews_accepted', array('no_reviews' => count($tmpr["1"]))); ?> <?php echo getMLText('reviews_accepted_latest', array('no_reviews' => $cr["1"])); ?><br />
</label>
</div>
</div>
<?php
$this->formField(
getMLText('reviews_accepted', array('no_reviews' => count($tmpr["1"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[approval][]',
'value'=>'1',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('reviews_accepted_latest', array('no_reviews' => $cr["1"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpr["-1"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[review][]" value="-1"> <?php echo getMLText('reviews_rejected', array('no_reviews' => count($tmpr["-1"]))); ?> <?php echo getMLText('reviews_rejected_latest', array('no_reviews' => $cr["-1"])); ?><br />
</label>
</div>
</div>
<?php
$this->formField(
getMLText('reviews_rejected', array('no_reviews' => count($tmpr["-1"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[approval][]',
'value'=>'-1',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('reviews_rejected_latest', array('no_reviews' => $cr["-1"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpa["0"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[approval][]" value="0" checked> <?php echo getMLText('approvals_not_touched', array('no_approvals' => count($tmpa["0"]))); ?> <?php echo getMLText('approvals_not_touched_latest', array('no_approvals' => $ca["0"])); ?>
</label>
</div>
</div>
<?php
$this->formField(
getMLText('approvals_not_touched', array('no_approvals' => count($tmpa["0"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[approval][]',
'value'=>'0',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('approvals_not_touched_latest', array('no_approvals' => $ca["0"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpa["1"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[approval][]" value="1"> <?php echo getMLText('approvals_accepted', array('no_approvals' => count($tmpa["1"]))); ?> <?php echo getMLText('approvals_accepted_latest', array('no_approvals' => $ca["1"])); ?><br />
</label>
</div>
</div>
<?php
$this->formField(
getMLText('approvals_accepted', array('no_approvals' => count($tmpa["1"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[approval][]',
'value'=>'1',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('approvals_accepted_latest', array('no_approvals' => $ca["1"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpa["-1"])) { ?>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="status[approval][]" value="-1"> <?php echo getMLText('approvals_rejected', array('no_approvals' => count($tmpa["-1"]))); ?> <?php echo getMLText('approvals_rejected_latest', array('no_approvals' => $ca["-1"])); ?><br />
</label>
</div>
</div>
<?php
$this->formField(
getMLText('approvals_rejected', array('no_approvals' => count($tmpa["-1"]))),
array(
'element'=>'input',
'type'=>'checkbox',
'name'=>'status[approval][]',
'value'=>'-1',
'checked'=>true
),
array(
'field_wrap' => array('', ' '.getMLText('approvals_rejected_latest', array('no_approvals' => $ca["-1"])))
)
);
?>
<?php } ?>
<?php if(isset($tmpb["0"])) { ?>
@ -228,11 +276,27 @@ class SeedDMS_View_RemoveUserFromProcesses extends SeedDMS_Bootstrap_Style {
</div>
<?php } ?>
<div class="control-group">
<div class="controls">
<button type="submit" class="btn"><i class="icon-remove"></i> <?php printMLText("rm_user_from_processes");?></button>
</div>
</div>
<?php
/*
$options = array();
$allUsers = $dms->getAllUsers($sortusersinlist);
foreach ($allUsers as $currUser) {
if (!$currUser->isGuest())
$options[] = array($currUser->getID(), htmlspecialchars($currUser->getLogin()), ($currUser->getID()==$user->getID()), array(array('data-subtitle', htmlspecialchars($currUser->getFullName()))));
}
$this->formField(
getMLText("user"),
array(
'element'=>'select',
'id'=>'newuser',
'name'=>'newuserid',
'class'=>'chzn-select',
'options'=>$options
)
);
*/
$this->formSubmit("<i class=\"icon-remove\"></i> ".getMLText('rm_user_from_processes'));
?>
</form>
<?php

View File

@ -190,26 +190,27 @@ $(document).ready( function() {
?>
<div class="row-fluid">
<div class="span4">
<div class="well">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label" for="login"><?php printMLText("selection");?>:</label>
<div class="controls">
<select class="chzn-select" id="selector">
<option value="-1"><?php echo getMLText("choose_role")?>
<?php if($accessop->check_controller_access('RoleMgr', array('action'=>'addrole'))) { ?>
<option value="0"><?php echo getMLText("add_role")?>
<?php } ?>
<?php
foreach ($roles as $currRole) {
print "<option value=\"".$currRole->getID()."\" ".($selrole && $currRole->getID()==$selrole->getID() ? 'selected' : '').">" . htmlspecialchars($currRole->getName());
$options = array();
$options[] = array("-1", getMLText("choose_role"));
if($accessop->check_controller_access('RoleMgr', array('action'=>'addrole'))) {
$options[] = array("0", getMLText("add_role"));
}
foreach ($roles as $currRole) {
$options[] = array($currRole->getID(), htmlspecialchars($currRole->getName()), $selrole && $currRole->getID()==$selrole->getID());
}
$this->formField(
null, //getMLText("selection"),
array(
'element'=>'select',
'id'=>'selector',
'class'=>'chzn-select',
'options'=>$options
)
);
?>
</select>
</div>
</div>
</form>
</div>
<?php if($accessop->check_view_access($this, array('action'=>'info'))) { ?>
<div class="ajax" data-view="RoleMgr" data-action="info" <?php echo ($selrole ? "data-query=\"roleid=".$selrole->getID()."\"" : "") ?>></div>
<?php } ?>