Commit 2daa5e91 by KiTE

Fixed label attributes in BaseHtml

parent 795a09c2
......@@ -961,9 +961,9 @@ class BaseHtml
*/
public static function activeLabel($model, $attribute, $options = [])
{
$for = array_key_exists('for', $options) ? $options['for'] : static::getInputId($model, $attribute);
$attribute = static::getAttributeName($attribute);
$label = isset($options['label']) ? $options['label'] : static::encode($model->getAttributeLabel($attribute));
$for = array_key_exists('for', $options) ? $options['for'] : static::getInputId($model, $attribute);
unset($options['label'], $options['for']);
return static::label($label, $for, $options);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment