2024-07-23 08:47:36 +00:00
|
|
|
<x-leenooks::form.base {{ $attributes }}>
|
2024-07-25 03:52:29 +00:00
|
|
|
<input type="file" class="form-control {{ $classes ?? ''}}@error($old ?? $name) is-invalid @enderror" id="{{ $id ?? $name }}" name="{{ $name }}" @readonly(isset($readonly)) @required(isset($required)) @disabled(isset($disabled))>
|
2024-07-23 08:47:36 +00:00
|
|
|
</x-leenooks::form.base>
|
|
|
|
{{ $slot }}
|
|
|
|
|
|
|
|
@section('page-scripts')
|
|
|
|
<script>
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#{{ $id ?? $name }}').on('change',function(){
|
|
|
|
//get the file name
|
|
|
|
var fileName = $(this).val();
|
|
|
|
//replace the "Choose a file" label
|
|
|
|
$(this).parent().next('.input-helper').html(fileName);
|
|
|
|
})
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|