Commit 53db15c3 authored by Klimov Paul's avatar Klimov Paul

Fixed `yii\bootstrap\ButtonDropdown` renders two buttons have same with id if 'split' is enabled

parent dbb0ed70
...@@ -74,6 +74,7 @@ class ButtonDropdown extends Widget ...@@ -74,6 +74,7 @@ class ButtonDropdown extends Widget
*/ */
public function run() public function run()
{ {
// @todo use [[options]] instead of [[containerOptions]] and introduce [[buttonOptions]] before 2.1 release
Html::addCssClass($this->containerOptions, 'btn-group'); Html::addCssClass($this->containerOptions, 'btn-group');
$options = $this->containerOptions; $options = $this->containerOptions;
$tag = ArrayHelper::remove($options, 'tag', 'div'); $tag = ArrayHelper::remove($options, 'tag', 'div');
...@@ -102,6 +103,7 @@ class ButtonDropdown extends Widget ...@@ -102,6 +103,7 @@ class ButtonDropdown extends Widget
$options = $this->options; $options = $this->options;
$this->options['data-toggle'] = 'dropdown'; $this->options['data-toggle'] = 'dropdown';
Html::addCssClass($this->options, 'dropdown-toggle'); Html::addCssClass($this->options, 'dropdown-toggle');
unset($this->options['id']);
$splitButton = Button::widget([ $splitButton = Button::widget([
'label' => '<span class="caret"></span>', 'label' => '<span class="caret"></span>',
'encodeLabel' => false, 'encodeLabel' => false,
......
...@@ -9,6 +9,7 @@ Yii Framework 2 bootstrap extension Change Log ...@@ -9,6 +9,7 @@ Yii Framework 2 bootstrap extension Change Log
- Enh #41: Added `submenuOptions` support at `yii\bootstrap\Dropdown` (spikyjt, klimov-paul) - Enh #41: Added `submenuOptions` support at `yii\bootstrap\Dropdown` (spikyjt, klimov-paul)
- Enh #42: Added support for the glyphicons via `yii\bootstrap\Html::icon()` (klimov-paul) - Enh #42: Added support for the glyphicons via `yii\bootstrap\Html::icon()` (klimov-paul)
- Enh #43: Added support for the static form controls via `yii\bootstrap\Html` (klimov-paul) - Enh #43: Added support for the static form controls via `yii\bootstrap\Html` (klimov-paul)
- Enh #44: Fixed `yii\bootstrap\ButtonDropdown` renders two buttons have same with id if 'split' is enabled (klimov-paul)
2.0.4 May 10, 2015 2.0.4 May 10, 2015
......
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