add new public repo
This commit is contained in:
34
resources/views/components/form-input.blade.php
Normal file
34
resources/views/components/form-input.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
@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>
|
||||
<input type={{ $type }} id={{ $id }} wire:model.defer={{ $id }}
|
||||
@if ($required) required @endif
|
||||
@if ($readonly) readOnly=true disabled=true @endif />
|
||||
@error($id)
|
||||
<div class="text-red-500">{{ $message }}</div>
|
||||
@enderror
|
||||
@endif
|
||||
Reference in New Issue
Block a user