add attribute 'for' to label in formField()

This commit is contained in:
Uwe Steinmann 2021-09-09 08:17:52 +02:00
parent 4a5426a180
commit c376e352b5

View File

@ -1076,7 +1076,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
function formField($title, $value, $params=array()) { /* {{{ */
if($title !== null) {
echo "<div class=\"control-group\">";
echo " <label class=\"control-label\"".(!empty($params['help']) ? " title=\"".$params['help']."\" style=\"cursor: help;\"" : "").">".$title.":</label>";
echo " <label class=\"control-label\"".(!empty($params['help']) ? " title=\"".$params['help']."\" style=\"cursor: help;\"" : "").(!empty($value['id']) ? ' for="'.$value['id'].'"' : '').">".$title.":</label>";
echo " <div class=\"controls\">";
}
if(isset($params['field_wrap'][0]))