- attributes can be attached to folders

This commit is contained in:
steinm 2012-10-09 10:00:58 +00:00
parent 5f9032979c
commit 88eceaba85
2 changed files with 15 additions and 1 deletions

View File

@ -56,7 +56,8 @@ if (!is_numeric($sequence)) {
$name = $_POST["name"];
$comment = $_POST["comment"];
$subFolder = $folder->addSubFolder($name, $comment, $user, $sequence);
$attributes = $_POST["attributes"];
$subFolder = $folder->addSubFolder($name, $comment, $user, $sequence, $attributes);
if (is_object($subFolder)) {
// Send notification to subscribers.

View File

@ -87,6 +87,19 @@ function checkForm()
<td class="inputDescription"><?php printMLText("sequence");?>:</td>
<td><?php UI::printSequenceChooser($folder->getSubFolders());?></td>
</tr>
<?php
$attrdefs = $dms->getAllAttributeDefinitions(array(LetoDMS_Core_AttributeDefinition::objtype_folder, LetoDMS_Core_AttributeDefinition::objtype_all));
if($attrdefs) {
foreach($attrdefs as $attrdef) {
?>
<tr>
<td><?php echo htmlspecialchars($attrdef->getName()); ?></td>
<td><?php UI::printAttributeEditField($attrdef, '') ?></td>
</tr>
<?php
}
}
?>
<tr>
<td colspan="2"><br><input type="Submit" value="<?php printMLText("add_subfolder");?>"></td>
</tr>