load form for user on demand via ajax

This commit is contained in:
Uwe Steinmann 2015-08-18 22:45:51 +02:00
parent 69e262cea3
commit 4358eb9a39

View File

@ -31,10 +31,15 @@ require_once("class.Bootstrap.php");
*/
class SeedDMS_View_UsrMgr extends SeedDMS_Bootstrap_Style {
function form() { /* {{{ */
$seluser = $this->params['seluser'];
$this->showUserForm($seluser);
} /* }}} */
function showUserForm($currUser) { /* {{{ */
$dms = $this->params['dms'];
$user = $this->params['user'];
$seluser = $this->params['seluser'];
$groups = $this->params['allgroups'];
$passwordstrength = $this->params['passwordstrength'];
$passwordexpiration = $this->params['passwordexpiration'];
@ -370,7 +375,12 @@ function checkForm(num)
return true;
}
function showUser(selectObj) {
id = selectObj.options[selectObj.selectedIndex].value;
$('div.ajax').trigger('update', {userid: id});
}
<?php if(0): ?>
obj = -1;
function showUser(selectObj) {
if (obj != -1)
@ -383,6 +393,7 @@ function showUser(selectObj) {
obj = document.getElementById("keywords" + id);
obj.style.display = "";
}
<?php endif; ?>
</script>
<?php
$this->contentHeading(getMLText("user_management"));
@ -410,6 +421,8 @@ function showUser(selectObj) {
<div class="span8">
<div class="well">
<div class="ajax" data-href="../out/out.UsrMgr.php?action=form<?php if($seluser) echo "&userid=".$seluser->getID();?>"></div>
<?php if(0): ?>
<div id="keywords0" style="display : none;">
<?php $this->showUserForm(false); ?>
</div>
@ -420,6 +433,7 @@ function showUser(selectObj) {
$this->showUserForm($currUser);
print "</div>\n";
}
endif;
?>
</div>
</div>