File: D:/HostingSpaces/SBogers10/stempel.komma.pro/resources/views/kms/attributes/onOff.blade.php
<div class="entity-attribute entity-attribute-on-off @if($errors->has((string) $attribute->getKey())) error @endif {!!$attribute->getStyleClass()!!}" data-key="{!! $attribute->getKey() !!}" title="{!! $attribute->errors[0] ?? '' !!}"
@foreach($attribute->getDataAttributes() as $dataAttributeName => $dataAttributeValue)
{{ $dataAttributeName }}="{{ $dataAttributeValue }}"
@endforeach
>
<!--The hidden input has the same name as the checkbox input, and will only be submitted as the checkbox is unchecked. Else the checkbox value is submitted-->
<input type="hidden" name="{!! $attribute->getKey() !!}" value="0">
<label for="{!! $attribute->getKey() !!}" class="toggle-label">{!! $attribute->getLabelText() !!}</label>
<input id="{!! $attribute->getKey() !!}" name="{!! $attribute->getKey() !!}" {{ old((string)$attribute->getKey(), $attribute->getValue()) == "1" ? "checked" : "" }} value="{{ old((string)$attribute->getKey(), $attribute->getValue()) }}" type="checkbox" dusk="{!! $attribute->getKey() !!}">
<div class="on-off-switch" dusk="active_toggle"></div>
</div>