53 lines
3.1 KiB
PHP
53 lines
3.1 KiB
PHP
<div class="row mb-3">
|
|
<div class="col-12">
|
|
<form id="searchForm" action="{{ request()->url() }}">
|
|
<div class="input-group">
|
|
<label class="input-group-text" for="searchField" title="{{ __('search.keywords_here', ['fields' => $searchFields]) }}">
|
|
<i class="fas fa-magnifying-glass"></i>
|
|
<span class="visually-hidden">{{ __('search.label') }}</span>
|
|
</label>
|
|
<input class="d-none" id="search-status" name="status" type="text" value="{{ Session::get('order.filter.status') }}">
|
|
<input class="d-none" id="search-delivery-status" name="delivery_status" type="text"
|
|
value="{{ Session::get('order.filter.delivery_status') }}">
|
|
<input class="d-none" id="search-shipping-discount" name="shipping_discount_id" type="text"
|
|
value="{{ Session::get('order.filter.shipping_discount_id') }}">
|
|
<input class="d-none" id="search-date-from" name="date_from" type="text" value="{{ Session::get('order.filter.date_from') }}">
|
|
<input class="d-none" id="search-date-to" name="date_to" type="text" value="{{ Session::get('order.filter.date_to') }}">
|
|
<input class="d-none" id="search-refunded" name="refunded" type="text" value="{{ Session::get('order.filter.refunded') }}">
|
|
@if (request()->input('sort_col'))
|
|
<input class="d-none" name="sort_col" type="text" value="{{ request()->input('sort_col') }}">
|
|
@endif
|
|
@if (request()->input('sort_way'))
|
|
<input class="d-none" name="sort_way" type="text" value="{{ request()->input('sort_way') }}">
|
|
@endif
|
|
@if (request()->input('rangefilter'))
|
|
<input class="d-none" name="rangefilter" type="text" value="{{ request()->input('rangefilter') }}">
|
|
@endif
|
|
@if (request()->input('group'))
|
|
<input class="d-none" name="group" type="text" value="{{ request()->input('group') }}">
|
|
@endif
|
|
<input class="form-control" id="searchField" name="search" type="search" value="{{ request()->input('search') }}"
|
|
placeholder="{{ $searchFields }}" />
|
|
<button class="btn btn-primary" data-bs-toggle="tooltip" type="submit" title="{{ __('search.launch') }}">
|
|
<i class="fas fa-search"></i>
|
|
</button>
|
|
<button class="btn btn-danger" id="searchDelete" data-bs-toggle="tooltip" type="button" title="{{ __('search.clear') }}">
|
|
<i class="fas fa-backspace"></i>
|
|
</button>
|
|
@push('scripts')
|
|
<script nonce="{{ Vite::cspNonce() }}">
|
|
document.getElementById('searchDelete').addEventListener('click', function(e) {
|
|
['search-status', 'search-delivery-status', 'search-shipping-discount', 'search-date-from', 'search-date-to', 'search-refunded']
|
|
.forEach(function(id) {
|
|
var el = document.getElementById(id);
|
|
if (el) el.value = '';
|
|
});
|
|
document.getElementById('searchField').value = '';
|
|
document.getElementById('searchForm').submit();
|
|
});
|
|
</script>
|
|
@endpush
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|