place delete button below selection menu

This commit is contained in:
Uwe Steinmann 2020-03-13 09:20:12 +01:00
parent 835ab33fcd
commit c6cd1b6900

View File

@ -63,6 +63,7 @@ $(document).ready( function() {
});
$( "#selector" ).change(function() {
$('div.ajax').trigger('update', {roleid: $(this).val()});
window.history.pushState({"html":"","pageTitle":""},"", '../out/out.RoleMgr.php?roleid=' + $(this).val());
});
});
<?php
@ -103,6 +104,26 @@ $(document).ready( function() {
}
} /* }}} */
function actionmenu() { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$selrole = $this->params['selrole'];
$accessop = $this->params['accessobject'];
if($selrole) {
if(!$selrole->isUsed() && $accessop->check_controller_access('RoleMgr', array('action'=>'removerole'))) {
?>
<form style="display: inline-block;" method="post" action="../op/op.RoleMgr.php" >
<?php echo createHiddenFieldWithKey('removerole'); ?>
<input type="hidden" name="roleid" value="<?php echo $selrole->getID()?>">
<input type="hidden" name="action" value="removerole">
<button type="submit" class="btn"><i class="icon-remove"></i> <?php echo getMLText("rm_role")?></button>
</form>
<?php
}
}
} /* }}} */
function form() { /* {{{ */
$selrole = $this->params['selrole'];
@ -113,17 +134,6 @@ $(document).ready( function() {
$dms = $this->params['dms'];
$user = $this->params['user'];
$accessop = $this->params['accessobject'];
if($currRole && !$currRole->isUsed() && $accessop->check_controller_access('RoleMgr', array('action'=>'removerole'))) {
?>
<form style="display: inline-block;" method="post" action="../op/op.RoleMgr.php" >
<?php echo createHiddenFieldWithKey('removerole'); ?>
<input type="hidden" name="roleid" value="<?php echo $currRole->getID()?>">
<input type="hidden" name="action" value="removerole">
<button type="submit" class="btn"><i class="icon-remove"></i> <?php echo getMLText("rm_role")?></button>
</form>
<?php
}
?>
<form action="../op/op.RoleMgr.php" method="post" enctype="multipart/form-data" name="form" id="form">
<?php
@ -212,6 +222,7 @@ $(document).ready( function() {
);
?>
</form>
<div class="ajax" style="margin-bottom: 15px;" data-view="RoleMgr" data-action="actionmenu" <?php echo ($selrole ? "data-query=\"roleid=".$selrole->getID()."\"" : "") ?>></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 } ?>
@ -233,4 +244,3 @@ $(document).ready( function() {
$this->htmlEndPage();
} /* }}} */
}
?>