2023-04-19 14:00:31 +02:00
|
|
|
@if ($type === 'checkbox')
|
|
|
|
<label for={{ $name }}>
|
|
|
|
@if ($label)
|
|
|
|
{{ $label }}
|
|
|
|
@else
|
|
|
|
{{ $name }}
|
|
|
|
@endif
|
|
|
|
@if ($required)
|
|
|
|
*
|
|
|
|
@endif
|
|
|
|
<input type="checkbox" id={{ $name }}
|
|
|
|
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $name }} @else wire:model.defer={{ $name }} @endif
|
|
|
|
name={{ $name }}>
|
|
|
|
</label>
|
|
|
|
@else
|
|
|
|
<label for={{ $name }}>
|
|
|
|
@if ($label)
|
|
|
|
{{ $label }}
|
|
|
|
@else
|
|
|
|
{{ $name }}
|
|
|
|
@endif
|
|
|
|
@if ($required)
|
|
|
|
*
|
|
|
|
@endif
|
|
|
|
</label>
|
2023-04-25 10:06:45 +02:00
|
|
|
<input type={{ $type }} id={{ $name }} wire:model.defer={{ $name }}
|
|
|
|
name={{ $name }} @if ($required) required @endif
|
2023-04-19 14:00:31 +02:00
|
|
|
@if ($readonly) readOnly=true disabled=true @endif />
|
|
|
|
@endif
|
|
|
|
|
2023-04-17 14:11:02 +02:00
|
|
|
@error($name)
|
|
|
|
<span class="text-red-500">{{ $message }}</span>
|
|
|
|
@enderror
|