<div class="modal-header">
    <button type="button" class="close" data-dismiss="modal">&times;</button>
    <h4 class="modal-title">گاڑی کی تبدیلی</h4>
</div>

<form id="update_vehicle_form">
    <div class="modal-body">
        <div class="row">
            <div class="col-md-12">
                <div class="form-group">
                    <label for="driver_name">ڈرائیورز
                        <span class="text-danger">*</span></label>
                    <select name="driver[]" id="u_driver" onchange="get_driver_detail()" class="form-control"
                            multiple>
                        @forelse ($drivers as $driver)
                            <option value="{{ $driver->id }}"
                                {{ in_array($driver->id , $ids) ? 'selected': '' }} >{{ $driver->name }}</option>
                        @empty
                        @endforelse
                    </select>
                    <span class="text-danger u_error" id="u_driver_error"></span>
                </div>
            </div>
            <div class="col-md-12">
                <div class="form-group">
                    <label for="vehicle_number">گاڑی نمبر <span class="text-danger">*</span></label>
                    <input type="text" id="vehicle_number" placeholder="e.g. ABC-2022"
                           value="{{ $vehicle->vehicle_no }}"
                           class="form-control" name="vehicle_number" onblur="checkVehicle()">
                    <p id="warning" class="bg-danger blink_me"></p>
                    <p id="error" class="bg-success"></p>
                    <span class="text-danger u_error" id="u_vehicle_number_error"></span>
                </div>
            </div>

        </div>

    </div>
    <div class="modal-footer">
        @csrf
        <input type="hidden" name="update_id" value="{{ $vehicle->id }}">
        <button id="update_btn" class="btn btn-sm btn-info" type="submit">
            اپڈیٹ
        </button>
    </div>
</form>
