Skip to content

Commit

Permalink
default label option - false
Browse files Browse the repository at this point in the history
  • Loading branch information
loveorigami committed May 12, 2016
1 parent 953d1ed commit 27ee646
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Toggle.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ class Toggle extends InputWidget
* @var array the default options for the widget.
*/
protected $woptions = [
'data-toggle' => 'toggle',
'data-onstyle' => 'success',
'data-offstyle' => 'danger'
'data-toggle' => 'toggle',
'data-onstyle' => 'success',
'data-offstyle' => 'danger',
'label' => false,
];

/**
Expand Down Expand Up @@ -90,7 +91,7 @@ public function registerClientScript()
public function run()
{

$this->options = ArrayHelper::merge($this->woptions, $this->options);
$this->options = ArrayHelper::merge($this->woptions, $this->options);

if ($this->hasModel()) {
$input = Html::activeCheckbox($this->model, $this->attribute, $this->options);
Expand Down

0 comments on commit 27ee646

Please sign in to comment.