mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-23 01:51:25 +00:00
fix getAttributeEditField() for boolean attributes
This commit is contained in:
parent
74a07c9593
commit
a3898e36de
|
@ -1515,8 +1515,9 @@ $(document).ready(function() {
|
|||
$content = '';
|
||||
switch($attrdef->getType()) {
|
||||
case SeedDMS_Core_AttributeDefinition::type_boolean:
|
||||
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
|
||||
$content .= "<input type=\"hidden\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"\" />";
|
||||
$content .= "<input type=\"checkbox\" id=\"".$fieldname."_".$attrdef->getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".(($attribute && $attribute->getValue()) ? 'checked' : '')." />";
|
||||
$content .= "<input type=\"checkbox\" id=\"".$fieldname."_".$attrdef->getId()."\" name=\"".$fieldname."[".$attrdef->getId()."]\" value=\"1\" ".($objvalue ? 'checked' : '')." />";
|
||||
break;
|
||||
case SeedDMS_Core_AttributeDefinition::type_date:
|
||||
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
|
||||
|
|
Loading…
Reference in New Issue
Block a user