From 27ee6469f784b9163c03ee760e34c7ef751be148 Mon Sep 17 00:00:00 2001 From: Andrey Date: Thu, 12 May 2016 18:57:40 +0300 Subject: [PATCH] default label option - false --- Toggle.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Toggle.php b/Toggle.php index 890c28a..7a9ccbe 100644 --- a/Toggle.php +++ b/Toggle.php @@ -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, ]; /** @@ -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);