lasthourcloud/resources/views/components/form-input.blade.php
Andras Bacsai 2487dde69e add new server
add new private key
check server connection
2023-04-26 15:38:50 +02:00

42 lines
1.2 KiB
PHP

@if ($type === 'checkbox')
<label for={{ $id }}>
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
*
@endif
<input type="checkbox" id={{ $id }}
@if ($instantSave) wire:click='instantSave' wire:model.defer={{ $id }} @else wire:model.defer={{ $id }} @endif>
</label>
@error($id)
<span class="text-red-500">{{ $message }}</span>
@enderror
@else
<label for={{ $id }}>
@if ($label)
{{ $label }}
@else
{{ $id }}
@endif
@if ($required)
*
@endif
</label>
@if ($type === 'textarea')
<textarea type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}
@if ($required) required @endif @if ($disabled) disabled @endif
@if ($readonly) readOnly disabled @endif></textarea>
@else
<input type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}
@if ($required) required @endif @if ($disabled) disabled @endif
@if ($readonly) readOnly disabled @endif />
@endif
@error($id)
<div class="text-red-500">{{ $message }}</div>
@enderror
@endif