Skip to content

Commit

Permalink
Dev Switch always has a default disabled value of '0'
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed May 20, 2016
1 parent a62aa66 commit 4910d24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions application/extensions/yiiwheels/widgets/switch/WhSwitch.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ public function init()
if (!$this->animated) {
$this->htmlOptions['data-animate'] = 'false';
}

if (!isset($this->htmlOptions['uncheckValue']))
{
$this->htmlOptions['uncheckValue']='0';
}

$this->htmlOptions['data-on-text'] = $this->onLabel;
$this->htmlOptions['data-off-text'] = $this->offLabel;
$this->htmlOptions['data-label-text'] = $this->textLabel;
Expand Down

0 comments on commit 4910d24

Please sign in to comment.