add label to checkboxes

This commit is contained in:
Uwe Steinmann 2024-04-03 09:21:43 +02:00
parent 7b65c50b7e
commit bad9db377b

View File

@ -1218,6 +1218,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
foreach($value['attributes'] as $a)
echo ' '.$a[0].'="'.$a[1].'"';
echo ">";
echo '<label class="form-check-label" '.($value['id'] ?? 'for="'.$value['id'].'"').'>'.($value['label'] ?? $value['label']).'</label>';
echo "</div>";
break;
default:
@ -1973,6 +1974,7 @@ $(document).ready(function() {
$objvalue = $attribute ? (is_object($attribute) ? $attribute->getValue() : $attribute) : '';
$content .= "<input type=\"hidden\" name=\"".$attr_name."\" value=\"\" />";
$content .= "<input type=\"checkbox\" id=\"".$attr_id."\" name=\"".$attr_name."\" value=\"1\" ".($objvalue ? 'checked' : '')." />";
$content .= '<label class="form-check-label" for="'.$attr_id.'"></label>';
break;
case SeedDMS_Core_AttributeDefinition::type_date:
$objvalue = $attribute ? getReadableDate((is_object($attribute) ? $attribute->getValue() : $attribute)) : '';