fix output of checkboxes in printAttributeEditField()

This commit is contained in:
Uwe Steinmann 2015-12-03 15:08:12 +01:00
parent 881925d201
commit 423ef654c4

View File

@ -1055,7 +1055,7 @@ function folderSelected<?php echo $form ?>(id, name) {
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes') { /* {{{ */
switch($attrdef->getType()) {
case SeedDMS_Core_AttributeDefinition::type_boolean:
echo "<input type=\"checkbox\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".($objvalue ? 'checked' : '')." />";
echo "<input type=\"checkbox\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".(($attribute && $attribute->getValue()) ? 'checked' : '')." />";
break;
case SeedDMS_Core_AttributeDefinition::type_date:
?>