HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/Neopoints/momsecurity.be/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">

    <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">

    <div class="on-off-switch"></div>
</div>