This commit is contained in:
ludo
2024-03-03 22:52:00 +01:00
parent 44391e817c
commit e4e2126ada
18 changed files with 465 additions and 353 deletions

View File

@@ -1,21 +1,30 @@
@include('components.form.label')
@if (($disabled ?? false) || ($readonly ?? false))
@include('components.form.input', ['type' => 'hidden', 'label' => false, 'disabled' => false, 'readonly' => false])
@include('components.form.input', [
'type' => 'hidden',
'label' => false,
'disabled' => false,
'readonly' => false,
])
@endif
<input type="{{ $type ?? 'text'}}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name,'-') }}" class="form-control {{ $class ?? ''}}" value="{{ $value ?? null}}"
@if ($required ?? false) required @endif
@if ($disabled ?? false) disabled @endif
@if ($readonly ?? false) readonly @endif
@if ($autofocus ?? false) autofocus @endif
@if ($size ?? false) size="{{ $size }}" @endif
@if ($autocomplete ?? false) autocomplete="{{ $autocomplete }}" @endif
@if ($minlength ?? false) minlength={{ $minlength }} @endif
@if ($maxlength ?? false) maxlength={{ $maxlength }} @endif
@if ($formid ?? false) form="{{ $formid }}" @endif
@if ($mask ?? false) data-inputmask="'mask': '{{ $mask }}'" @endif
@if ($pattern ?? false) pattern="{{ $pattern }}" @endif
@if ($placeholder ?? false) placeholder="{{ $placeholder }}" @endif
@if ($step ?? false) step="{{ $step }}" @endif
{!! $meta ?? '' !!} >
<input type="{{ $type ?? 'text' }}" name="{{ $name }}" id="{{ $id_name ?? str_slug($name, '-') }}"
class="form-control {{ $class ?? '' }}" value="{{ $value ?? (old($name) ?? '') }}"
@if ($required ?? false) required @endif @if ($disabled ?? false) disabled @endif
@if ($readonly ?? false) readonly @endif @if ($autofocus ?? false) autofocus @endif
@if ($size ?? false) size="{{ $size }}" @endif
@if ($autocomplete ?? false) autocomplete="{{ $autocomplete }}" @endif
@if ($minlength ?? false) minlength={{ $minlength }} @endif
@if ($maxlength ?? false) maxlength={{ $maxlength }} @endif
@if ($formid ?? false) form="{{ $formid }}" @endif
@if ($mask ?? false) data-inputmask="'mask': '{{ $mask }}'" @endif
@if ($pattern ?? false) pattern="{{ $pattern }}" @endif
@if ($placeholder ?? false) placeholder="{{ $placeholder }}" @endif
@if ($step ?? false) step="{{ $step }}" @endif {!! $meta ?? '' !!}>
@error($name)
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror