replace old table layout with bootstrap form

This commit is contained in:
Uwe Steinmann 2021-06-28 12:37:53 +02:00
parent 696dde1288
commit 3c081b3439

View File

@ -79,7 +79,6 @@ $(document).ready(function() {
$this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder); $this->pageNavigation($this->getFolderPathHTML($folder, true), "view_folder", $folder);
$this->contentHeading(getMLText("edit_existing_attribute_groups")); $this->contentHeading(getMLText("edit_existing_attribute_groups"));
$this->contentContainerStart();
$attrgrpIDs = array(); $attrgrpIDs = array();
@ -101,7 +100,7 @@ $(document).ready(function() {
print "<input type=\"Hidden\" name=\"action\" value=\"delattributegroup\">\n"; print "<input type=\"Hidden\" name=\"action\" value=\"delattributegroup\">\n";
print "<input type=\"Hidden\" name=\"groupid\" value=\"".$attrgrp['group']->getID()."\">\n"; print "<input type=\"Hidden\" name=\"groupid\" value=\"".$attrgrp['group']->getID()."\">\n";
print "<td>"; print "<td>";
print "<button type=\"submit\" class=\"btn btn-mini\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>"; print "<button type=\"submit\" class=\"btn btn-danger btn-mini btn-sm\"><i class=\"icon-remove\"></i> ".getMLText("delete")."</button>";
print "</td>"; print "</td>";
print "</form>\n"; print "</form>\n";
}else print "<td></td>"; }else print "<td></td>";
@ -122,35 +121,31 @@ $(document).ready(function() {
?> ?>
<br> <br>
<form action="../op/op.FolderAttributeGroup.php" method="post" id="form1" name="form1"> <form action="../op/op.FolderAttributeGroup.php" class="form-horizontal" method="post" id="form1" name="form1">
<?php echo createHiddenFieldWithKey('folderattributegroup'); ?> <?php echo createHiddenFieldWithKey('folderattributegroup'); ?>
<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="addattributegroup"> <input type="hidden" name="action" value="addattributegroup">
<table class="table-condensed"> <?php
<tr> $this->contentContainerStart();
<td><?php printMLText("group");?>:</td> $options = array();
<td> $options[] = array(0, getMLText('select_one'));
<select name="groupid"> foreach($allGroups as $groupObj) {
<option value="-1"><?php printMLText("select_one");?> $options[] = array($groupObj->getID(), htmlspecialchars($groupObj->getName()), $user->isAdmin() && in_array($groupObj->getID(), $attrgrpIDs));
<?php }
foreach ($allGroups as $groupObj) { $this->formField(
if ($user->isAdmin() && !in_array($groupObj->getID(), $attrgrpIDs)) { getMLText("group"),
print "<option value=\"".$groupObj->getID()."\">" . htmlspecialchars($groupObj->getName()) . "\n"; array(
} 'element'=>'select',
} 'name'=>'groupid',
?> 'options'=>$options
</select> )
</td> );
</tr> $this->contentContainerEnd();
<tr> $this->formSubmit('<i class="fa fa-save"></i> '.getMLText("add"));
<td></td> ?>
<td><input type="submit" class="btn" value="<?php printMLText("add") ?>"></td>
</tr>
</table>
</form> </form>
<?php <?php
$this->contentContainerEnd();
$this->contentEnd(); $this->contentEnd();
$this->htmlEndPage(); $this->htmlEndPage();
} /* }}} */ } /* }}} */