File: D:/HostingSpaces/SBogers10/rentman2019.komma.pro/resources/views/kms/attributes/onOff.blade.php
@php /** @var \App\Komma\Kms\Core\Attributes\OnOff $attribute **/ @endphp
<div class="entity-attribute entity-attribute-on-off @if($errors->has($attribute->getKey().'')) error @endif {!!$attribute->getStyleClass()!!}" data-key="{!! $attribute->getKey() !!}" title="{!! $attribute->errors[0] or '' !!}"
@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">
<input id="{!! $attribute->getKey() !!}" name="{!! $attribute->getKey() !!}" {{ old((string)$attribute->getKey(), $attribute->getValue()) == "1" ? "checked" : "" }} value="{{ old((string)$attribute->getKey(), $attribute->getValue()) }}" type="checkbox">
<label for="{!! $attribute->getKey() !!}" class="toggle-label">{!! $attribute->getLabelText() !!}</label>
<div class="placeholder">
<div class="on-off-switch @if(old((string)$attribute->getKey(), $attribute->getValue()) == "1") on @endif" ></div>
@if($attribute->getExplanation())<span class="explanation">{!! $attribute->getExplanation() !!}</span> @endif
</div>
</div>