set fall back value for attributes of type checkbox to ''

This commit is contained in:
Uwe Steinmann 2018-03-19 11:31:50 +01:00
parent e9c9b48140
commit 44b9525615

View File

@ -1205,7 +1205,7 @@ $(document).ready(function() {
function printAttributeEditField($attrdef, $attribute, $fieldname='attributes', $norequire=false) { /* {{{ */
switch($attrdef->getType()) {
case SeedDMS_Core_AttributeDefinition::type_boolean:
echo "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"0\" />";
echo "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"\" />";
echo "<input type=\"checkbox\" id=\"".$fieldname."_".$attrdef->getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".(($attribute && $attribute->getValue()) ? 'checked' : '')." />";
break;
case SeedDMS_Core_AttributeDefinition::type_date: