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

This commit is contained in:
Uwe Steinmann 2021-05-04 13:53:29 +02:00
commit 4cb4cce922
4 changed files with 23 additions and 21 deletions

View File

@ -187,6 +187,7 @@ $(document).ready( function() {
<input type="hidden" name="action" value="addgroup"> <input type="hidden" name="action" value="addgroup">
<?php <?php
} }
$this->contentContainerStart();
$this->formField( $this->formField(
getMLText("name"), getMLText("name"),
array( array(
@ -207,14 +208,15 @@ $(document).ready( function() {
'value'=>($group ? htmlspecialchars($group->getComment()) : '') 'value'=>($group ? htmlspecialchars($group->getComment()) : '')
) )
); );
$this->contentContainerEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save')); $this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('save'));
?> ?>
</form> </form>
<?php <?php
if($group) { if($group) {
$this->contentSubHeading(getMLText("group_members")); $this->contentHeading(getMLText("group_members"));
?> ?>
<table class="table-condensed"> <table class="table table-condensed table-sm">
<?php <?php
$members = $group->getUsers(); $members = $group->getUsers();
if (count($members) == 0) if (count($members) == 0)
@ -228,9 +230,9 @@ $(document).ready( function() {
print "<td>" . htmlspecialchars($member->getFullName()) . "</td>"; print "<td>" . htmlspecialchars($member->getFullName()) . "</td>";
print "<td>" . ($group->isMember($member,true)?getMLText("manager"):"&nbsp;") . "</td>"; print "<td>" . ($group->isMember($member,true)?getMLText("manager"):"&nbsp;") . "</td>";
print "<td>"; print "<td>";
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"action\" value=\"rmmember\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('rmmember')."<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-remove\"></i> ".getMLText("delete")."</button></form>"; print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"action\" value=\"rmmember\" /><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('rmmember')."<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"fa fa-remove\"></i><span class=\"d-none d-lg-block\"> ".getMLText("delete")."</span></button></form>";
print "&nbsp;"; print "&nbsp;";
print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"tmanager\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('tmanager')."<button type=\"submit\" class=\"btn btn-mini\"><i class=\"fa fa-random\"></i> ".getMLText("toggle_manager")."</button></form>"; print "<form action=\"../op/op.GroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"groupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"tmanager\" /><input type=\"hidden\" name=\"userid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('tmanager')."<button type=\"submit\" class=\"btn btn-secondary btn-mini btn-sm\"><i class=\"fa fa-random\"></i><span class=\"d-none d-lg-block\"> ".getMLText("toggle_manager")."</span></button></form>";
print "</td></tr>"; print "</td></tr>";
} }
} }
@ -238,7 +240,7 @@ $(document).ready( function() {
</table> </table>
<?php <?php
$this->contentSubHeading(getMLText("add_member")); $this->contentHeading(getMLText("add_member"));
?> ?>
<form class="form-horizontal" 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">
@ -246,6 +248,7 @@ $(document).ready( function() {
<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();?>">
<?php <?php
$this->contentContainerStart();
$options = array(); $options = array();
$allUsers = $dms->getAllUsers($sortusersinlist); $allUsers = $dms->getAllUsers($sortusersinlist);
foreach ($allUsers as $currUser) { foreach ($allUsers as $currUser) {
@ -271,6 +274,7 @@ $(document).ready( function() {
'value'=>1 'value'=>1
) )
); );
$this->contentContainerEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('add')); $this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText('add'));
?> ?>
</form> </form>
@ -329,13 +333,11 @@ $(document).ready( function() {
} }
$this->columnEnd(); $this->columnEnd();
$this->columnStart(8); $this->columnStart(8);
$this->contentContainerStart();
if($accessop->check_view_access($this, array('action'=>'form'))) { if($accessop->check_view_access($this, array('action'=>'form'))) {
?> ?>
<div class="ajax" data-view="GroupMgr" data-action="form" <?php echo ($selgroup ? "data-query=\"groupid=".$selgroup->getID()."\"" : "") ?>></div> <div class="ajax" data-view="GroupMgr" data-action="form" <?php echo ($selgroup ? "data-query=\"groupid=".$selgroup->getID()."\"" : "") ?>></div>
<?php <?php
} }
$this->contentContainerEnd();
$this->columnEnd(); $this->columnEnd();
$this->rowEnd(); $this->rowEnd();
$this->contentEnd(); $this->contentEnd();

View File

@ -252,6 +252,7 @@ $(document).ready( function() {
<input type="hidden" name="action" value="adduser"> <input type="hidden" name="action" value="adduser">
<?php <?php
} }
$this->contentContainerStart();
$this->formField( $this->formField(
getMLText("user_login"), getMLText("user_login"),
array( array(
@ -269,7 +270,7 @@ $(document).ready( function() {
if($passwordstrength > 0) { if($passwordstrength > 0) {
$this->formField( $this->formField(
getMLText("password_strength"), getMLText("password_strength"),
'<div id="strengthbar'.($currUser ? $currUser->getID() : "0").'" class="progress" style="width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger" style="width: 0%;"></div></div>' '<div id="strengthbar'.($currUser ? $currUser->getID() : "0").'" class="progress" style="_width: 220px; height: 30px; margin-bottom: 8px;"><div class="bar bar-danger bg-danger" style="width: 0%;"></div></div>'
); );
} }
$this->formField( $this->formField(
@ -551,6 +552,7 @@ $(document).ready( function() {
); );
} }
} }
$this->contentContainerEnd();
$this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText($currUser ? "save" : "add_user")); $this->formSubmit("<i class=\"fa fa-save\"></i> ".getMLText($currUser ? "save" : "add_user"));
?> ?>
</form> </form>
@ -610,14 +612,12 @@ $(document).ready( function() {
} }
$this->columnEnd(); $this->columnEnd();
$this->columnStart(8); $this->columnStart(8);
$this->contentContainerStart();
?> ?>
<?php if($accessobject->check_view_access($this, array('action'=>'form'))) { ?> <?php if($accessobject->check_view_access($this, array('action'=>'form'))) { ?>
<div class="ajax" data-view="UsrMgr" data-action="form" <?php echo ($seluser ? "data-query=\"userid=".$seluser->getID()."\"" : "") ?>></div> <div class="ajax" data-view="UsrMgr" data-action="form" <?php echo ($seluser ? "data-query=\"userid=".$seluser->getID()."\"" : "") ?>></div>
<?php } ?> <?php } ?>
</div> </div>
<?php <?php
$this->contentContainerEnd();
$this->columnEnd(); $this->columnEnd();
$this->rowEnd(); $this->rowEnd();
$this->contentEnd(); $this->contentEnd();

View File

@ -1041,9 +1041,9 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
function contentHeading($heading, $noescape=false) { /* {{{ */ function contentHeading($heading, $noescape=false) { /* {{{ */
if($noescape) if($noescape)
echo "<legend>".$heading."</legend>\n"; echo "<legend class=\"border-bottom\">".$heading."</legend>\n";
else else
echo "<legend>".htmlspecialchars($heading)."</legend>\n"; echo "<legend class=\"border-bottom\">".htmlspecialchars($heading)."</legend>\n";
return; return;
} /* }}} */ } /* }}} */

View File

@ -521,11 +521,11 @@ $(document).ready( function() {
pwsp = 100*data.score; pwsp = 100*data.score;
$('#'+target+' div.bar').width(pwsp+'%'); $('#'+target+' div.bar').width(pwsp+'%');
if(data.ok) { if(data.ok) {
$('#'+target+' div.bar').removeClass('bar-danger'); $('#'+target+' div.bar').removeClass('bg-danger');
$('#'+target+' div.bar').addClass('bar-success'); $('#'+target+' div.bar').addClass('bg-success');
} else { } else {
$('#'+target+' div.bar').removeClass('bar-success'); $('#'+target+' div.bar').removeClass('bg-success');
$('#'+target+' div.bar').addClass('bar-danger'); $('#'+target+' div.bar').addClass('bg-danger');
} }
} }
}); /* }}} */ }); /* }}} */
@ -588,11 +588,11 @@ $(document).ready( function() {
pwsp = 100*data.score; pwsp = 100*data.score;
$('#'+target+' div.bar').width(pwsp+'%'); $('#'+target+' div.bar').width(pwsp+'%');
if(data.ok) { if(data.ok) {
$('#'+target+' div.bar').removeClass('bar-danger'); $('#'+target+' div.bar').removeClass('bg-danger');
$('#'+target+' div.bar').addClass('bar-success'); $('#'+target+' div.bar').addClass('bg-success');
} else { } else {
$('#'+target+' div.bar').removeClass('bar-success'); $('#'+target+' div.bar').removeClass('bg-success');
$('#'+target+' div.bar').addClass('bar-danger'); $('#'+target+' div.bar').addClass('bg-danger');
} }
} }
}); /* }}} */ }); /* }}} */
@ -804,7 +804,7 @@ function onAddClipboard(ev) { /* {{{ */
this.statusbar = $("<div class='statusbar "+row+"'></div>"); this.statusbar = $("<div class='statusbar "+row+"'></div>");
this.filename = $("<div class='filename'></div>").appendTo(this.statusbar); this.filename = $("<div class='filename'></div>").appendTo(this.statusbar);
this.size = $("<div class='filesize'></div>").appendTo(this.statusbar); this.size = $("<div class='filesize'></div>").appendTo(this.statusbar);
this.progressBar = $("<div class='progress'><div class='bar bar-success'></div></div>").appendTo(this.statusbar); this.progressBar = $("<div class='progress'><div class='bar bg-success'></div></div>").appendTo(this.statusbar);
this.abort = $("<div class='btn btn-mini btn-danger'>" + abortBtnLabel + "</div>").appendTo(this.statusbar); this.abort = $("<div class='btn btn-mini btn-danger'>" + abortBtnLabel + "</div>").appendTo(this.statusbar);
// $('.statusbar').empty(); // $('.statusbar').empty();
obj.after(this.statusbar); obj.after(this.statusbar);