Fixed issue with labels
This commit is contained in:
parent
358bf0eefa
commit
3babea7dea
2 changed files with 20 additions and 8 deletions
|
@ -63,11 +63,17 @@ class HTML extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($attributes['label'], $attributes['name']))
|
||||
if (is_array($attributes) && isset($attributes['label']))
|
||||
{
|
||||
if (isset($attributes['name']))
|
||||
{
|
||||
$label = $this->label(array('for' => $attributes['name']), $attributes['label']);
|
||||
|
||||
unset($attributes['label']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$label = $this->label($attributes['label']);
|
||||
}
|
||||
|
||||
return $label . $this->$method($attributes);
|
||||
}
|
||||
|
|
10
jar.php
10
jar.php
|
@ -4222,11 +4222,17 @@ class HTML extends Object
|
|||
}
|
||||
}
|
||||
|
||||
if (isset($attributes['label'], $attributes['name']))
|
||||
if (is_array($attributes) && isset($attributes['label']))
|
||||
{
|
||||
if (isset($attributes['name']))
|
||||
{
|
||||
$label = $this->label(array('for' => $attributes['name']), $attributes['label']);
|
||||
|
||||
unset($attributes['label']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$label = $this->label($attributes['label']);
|
||||
}
|
||||
|
||||
return $label . $this->$method($attributes);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue