From 0cd30706b6536147ace74f547f89727c52ddfc69 Mon Sep 17 00:00:00 2001 From: Glenn Jacobs Date: Sun, 1 Jun 2014 17:25:22 +0100 Subject: [PATCH] Fix to optgroup --- src/Forma/Tags/Optgroup.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Forma/Tags/Optgroup.php b/src/Forma/Tags/Optgroup.php index 9d8643b..432fdea 100644 --- a/src/Forma/Tags/Optgroup.php +++ b/src/Forma/Tags/Optgroup.php @@ -7,13 +7,13 @@ class Optgroup extends BaseTag protected $tagName = 'optgroup'; protected $selected; - function __construct($text=null,$options=null,$selected=false) + function __construct($label=null,$options=null,$selected=false) { - if ($selected) - $this->attributes['selected'] = null; + if ($label) + $this->attributes['label'] = $label; + + $this->selected = $selected; - $this->text = \Forma\Helpers::hasLang($text) ? \Forma\Helpers::lang($text) : $text; - $this->options($options); }