Fix checkbox component when rendering old values, fix form select rendering blank option
This commit is contained in:
parent
83470c3ff5
commit
ba18a2a21c
@ -1,5 +1,5 @@
|
|||||||
<x-leenooks::form.base {{ $attributes }}>
|
<x-leenooks::form.base {{ $attributes }}>
|
||||||
<div class="form-check text-right">
|
<div class="form-check text-right">
|
||||||
<input type="checkbox" class="form-check-input {{ $class ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @checked(isset($checked)) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
<input type="checkbox" class="form-check-input {{ $class ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" value="{{ old($old ?? $name,$value ?? '') }}" @checked(old($old ?? $name)) @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
||||||
</div>
|
</div>
|
||||||
</x-leenooks::form.base>
|
</x-leenooks::form.base>
|
@ -1,7 +1,7 @@
|
|||||||
<x-leenooks::form.base {{ $attributes }}>
|
<x-leenooks::form.base {{ $attributes }}>
|
||||||
<input type="hidden" id="{{ $name }}_disabled" name="{{ $name }}" value="" disabled>
|
<input type="hidden" id="{{ $name }}_disabled" name="{{ $name }}" value="" disabled>
|
||||||
<select class="form-control @error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @required(isset($required)) @disabled(isset($disabled))>
|
<select class="form-control @error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @required(isset($required)) @disabled(isset($disabled))>
|
||||||
@if(! empty($value) || isset($addnew) || isset($choose))
|
@if(empty($value) || isset($addnew) || isset($choose))
|
||||||
<option value=""></option>
|
<option value=""></option>
|
||||||
@isset($addnew)
|
@isset($addnew)
|
||||||
<option value="new">{{ $addnew ?: 'Add New' }}</option>
|
<option value="new">{{ $addnew ?: 'Add New' }}</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user