mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-09 07:28:43 +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']))
|
if ($label && !$readonly && ($accesskey || $label_for || $type != 'label' && $cell['name']))
|
||||||
{
|
{
|
||||||
$label = html::label($label,$label_for ? self::form_name($cname,$label_for) :
|
if ($label_for) // if label_for starts with a '#', it is already an id - no need to create default id from it
|
||||||
$form_name.($set_val?"[$set_val]":''),$accesskey);
|
{
|
||||||
|
$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
|
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