remove table from access list

This commit is contained in:
Uwe Steinmann 2018-06-22 10:20:17 +02:00
parent 2c101da222
commit c7a02f2ff1

View File

@ -31,12 +31,17 @@ require_once("class.Bootstrap.php");
*/ */
class SeedDMS_View_FolderAccess extends SeedDMS_Bootstrap_Style { class SeedDMS_View_FolderAccess extends SeedDMS_Bootstrap_Style {
function printAccessModeSelection($defMode) { /* {{{ */ function printAccessModeSelection($defMode) { /* {{{ */
print "<select name=\"mode\">\n"; echo self::getAccessModeSelection($defMode);
print "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "\n"; } /* }}} */
print "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "\n";
print "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "\n"; function getAccessModeSelection($defMode) { /* {{{ */
print "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "\n"; $content = "<select name=\"mode\">\n";
print "</select>\n"; $content .= "\t<option value=\"".M_NONE."\"" . (($defMode == M_NONE) ? " selected" : "") . ">" . getMLText("access_mode_none") . "\n";
$content .= "\t<option value=\"".M_READ."\"" . (($defMode == M_READ) ? " selected" : "") . ">" . getMLText("access_mode_read") . "\n";
$content .= "\t<option value=\"".M_READWRITE."\"" . (($defMode == M_READWRITE) ? " selected" : "") . ">" . getMLText("access_mode_readwrite") . "\n";
$content .= "\t<option value=\"".M_ALL."\"" . (($defMode == M_ALL) ? " selected" : "") . ">" . getMLText("access_mode_all") . "\n";
$content .= "</select>\n";
return $content;
} /* }}} */ } /* }}} */
function js() { /* {{{ */ function js() { /* {{{ */
@ -234,53 +239,47 @@ $(document).ready(function() {
print "</table><br>"; print "</table><br>";
} }
?> ?>
<form action="../op/op.FolderAccess.php" id="form1" name="form1"> <form class="form-horizontal" action="../op/op.FolderAccess.php" id="form1" name="form1">
<?php echo createHiddenFieldWithKey('folderaccess'); ?> <?php echo createHiddenFieldWithKey('folderaccess'); ?>
<input type="hidden" name="folderid" value="<?php print $folder->getID()?>"> <input type="hidden" name="folderid" value="<?php print $folder->getID()?>">
<input type="hidden" name="action" value="addaccess"> <input type="hidden" name="action" value="addaccess">
<table class="table-condensed">
<tr>
<td><?php printMLText("user");?>:</td>
<td>
<select name="userid">
<option value="-1"><?php printMLText("select_one");?>
<?php <?php
foreach ($allUsers as $userObj) { $options = array();
if ($userObj->isGuest()) { $options[] = array(-1, getMLText('select_one'));
continue; 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()))));
} }
print "<option value=\"".$userObj->getID()."\">" . htmlspecialchars($userObj->getLogin() . " - " . $userObj->getFullName()) . "</option>\n"; $this->formField(
} getMLText("user"),
?> array(
</select> 'element'=>'select',
</td> 'name'=>'userid',
</tr> 'class'=>'chzn-select',
<tr> 'options'=>$options
<td class="inputDescription"><?php printMLText("group");?>:</td> )
<td> );
<select name="groupid"> $options = array();
<option value="-1"><?php printMLText("select_one");?> $options[] = array(-1, getMLText('select_one'));
<?php
foreach ($allGroups as $groupObj) { foreach ($allGroups as $groupObj) {
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n"; $options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName()));
} }
$this->formField(
getMLText("group"),
array(
'element'=>'select',
'name'=>'groupid',
'class'=>'chzn-select',
'attributes'=>array(array('data-placeholder', getMLText('select_group'))),
'options'=>$options
)
);
$this->formField(
getMLText("access_mode"),
$this->getAccessModeSelection(M_READ)
);
$this->formSubmit("<i class=\"icon-plus\"></i> ".getMLText('add'));
?> ?>
</select>
</td>
</tr>
<tr>
<td class="inputDescription"><?php printMLText("access_mode");?>:</td>
<td>
<?php
$this->printAccessModeSelection(M_READ);
?>
</td>
</tr>
<tr>
<td></td>
<td><input type="submit" class="btn" value="<?php printMLText("add");?>"></td>
</tr>
</table>
</form> </form>
<?php <?php