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

<form id="update_driver_form">
    <div class="modal-body">
        <div class="row">
            <div class="col-md-6">
                <div class="form-group">
                    <label for="name">نام <span class="text-danger">*</span></label>
                    <input type="text" id="name" autofocus class="form-control" name="name"
                           value="{{ $driver->name }}">
                    <span class="text-danger u_error" id="u_name_error"></span>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="cnic">شناختی کارڈ نمبر <span class="text-danger">*</span></label>
                    <input type="text" id="cnic" autofocus class="form-control" name="cnic"
                           value="{{ $driver->cnic }}">
                    <span class="text-danger u_error" id="u_cnic_error"></span>
                </div>
            </div>
            <div class="col-md-6">
                <div class="form-group">
                    <label for="mobile_number">موبائل نمبر: <span class="text-danger">*</span></label>
                    <input type="text" id="mobile_number" autofocus class="form-control" name="mobile_number"
                           value="{{ $driver->mobile }}">
                    <span class="text-danger u_error" id="u_mobile_number_error"></span>
                </div>
            </div>
            <div class="col-md-6">
                <label for="">شامل ہونے کی تاریخ:</label>
                <input type="date" class="form-control" name="joining_date"
                       value="{{ date('Y-m-d', strtotime($driver->joining_date)) }}">
                <span class="text-danger u_error" id="u_joining_date_error"></span>
            </div>

        </div>
        <div class="row mt-2">
            <div class="col-md-12">
                <label for="">تنخواہ:</label>
                <input type="text" class="form-control" id="" name="salary" value="{{ $driver->salary }}">
                <span class="text-danger error" id="u_salary_error"></span>
            </div>
        </div>
        <div class="row mt-2">
            <div class="col-md-6">
                <label for="">شناختی کارڈ سامنے:</label>
                <input type="file" class="form-control" name="front_cnic"><br>
                <span class="text-danger u_error" id="u_front_cnic_error"></span>
            </div>
            <div class="col-md-6">
                <label for="">شناختی کارڈ پیچھے:</label>
                <input type="file" class="form-control" name="back_cnic"><br>
                <span class="text-danger u_error" id="u_back_cnic_error"></span>
            </div>
        </div>
        <div class="row mt-3">
            <div class="col-md-6">

                <img src="{{ $driver->img_front_cnic }}" alt="" class="img-thumbnil" height="100px" width="100px">

            </div>
            <div class="col-md-6">
                <img src="{{ $driver->img_back_cnic }}" alt="" class="img-thumbnil" height="100px" width="100px">
            </div>

        </div>
    </div>
    <div class="modal-footer">
        @csrf
        <button id="update_btn" class="btn btn-sm btn-info" type="submit">
            Update
        </button>
        <input type="hidden" name="update_id" value="{{ $driver->id }}">
    </div>
</form>
