mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
"if label_for starts with a '#', it is already an id - no need to create default id from it"
This commit is contained in:
parent
19090879c4
commit
a1d81f3e06
@ -1687,8 +1687,15 @@ class etemplate extends boetemplate
|
||||
}
|
||||
if ($label && !$readonly && ($accesskey || $label_for || $type != 'label' && $cell['name']))
|
||||
{
|
||||
$label = html::label($label,$label_for ? self::form_name($cname,$label_for) :
|
||||
$form_name.($set_val?"[$set_val]":''),$accesskey);
|
||||
if ($label_for) // if label_for starts with a '#', it is already an id - no need to create default id from it
|
||||
{
|
||||
$label_for = $label_for[0] == '#' ? substr($label_for,1) : self::form_name($cname,$label_for);
|
||||
}
|
||||
else
|
||||
{
|
||||
$label_for = $form_name.($set_val?"[$set_val]":'');
|
||||
}
|
||||
$label = html::label($label,$label_for,$accesskey);
|
||||
}
|
||||
if ($type == 'radio' || $type == 'checkbox' || $label && strpos($label,'%s')!==false) // default for radio is label after the button
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user