File: D:/HostingSpaces/SBogers10/anvil.komma.pro/resources/views/kms/attributes/onOff.blade.php
<div class="entity-attribute entity-attribute-on-off @if($errors->has($attribute->getKey().'')) error @endif {!!$attribute->getStyleClass()!!}"
title="{!! $attribute->errors[0] or '' !!}"
>
<label for="{!! $attribute->getKey() !!}" class="toggle-label">{!! $attribute->getLabelText() !!}</label>
<input onchange="onOff.toggleOnOff('{!! $attribute->getKey() !!}')"
id="{!! $attribute->getKey() !!}"
name="{!! $attribute->getKey() !!}"
type="checkbox"
value="{!! $attribute->getValue() !!}"
@if($attribute->getValue() == '1') checked @endif
/>
<div onclick="onOff.toggleOnOffSwitch('{!! $attribute->getKey() !!}')"
id="{!! $attribute->getKey() !!}-switch"
class="on-off-switch @if($attribute->getValue() == '1') on @endif ">
</div>
</div>
<script>var onOff = new OnOff();</script>