<div class="modal-body text-center" style="padding: 20px 0px 0px;">
    <div class="row">
        <input type="hidden" value="{$operation->id}" name="id">
        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Doctor</label>
                <div class="col-md-9">
                    <select class="form-control select2edit" required="required" name="doctor_id" data-placeholder="Select...">
                        <option></option>
                        {foreach $doctors as $doctor}
                            <option value="{$doctor.user_id}" {if $operation->doctor_id eq $doctor.user_id} selected {/if}>{$doctor.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Assistant</label>
                <div class="col-md-9">
                    <select class="form-control select2edit" name="assistant_id" data-placeholder="Select...">
                        <option></option>
                        {foreach $doctors as $doctor}
                            <option value="{$doctor.user_id}" {if $operation->assistant_id eq $doctor.user_id} selected {/if}>{$doctor.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Operation</label>
                <div class="col-md-9">
                    <select class="form-control select2edit" required="required" name="operation_type_id" id="operation_type_id" data-placeholder="Select...">
                        <option></option>
                        {foreach $operation_types as $operation_type}
                            <option value="{$operation_type->id}" {if $operation->operation_type_id eq $operation_type->id} selected {/if}>{$operation_type->title}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>

        <div class="clearfix"></div>
        <hr>
        <h3 style="padding: 10px 15px;">Residence</h3>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Start time</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop timepicker timepicker-custom start_time_change"
                           data-type="residence" data-time-plus="{$plusTime.res_time}"
                           name="res_start_time" id="res_start_time_edit" value="{$operation->res_start_time|date_format:'h:i A'}" required="required"/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">End time</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop timepicker timepicker-custom"
                           name="res_end_time" id="res_end_time_edit" value="{$operation->res_end_time|date_format:'h:i A'}"
                           required="required"/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Room</label>
                <div class="col-md-9">
                    <select class="form-control select2edit" required="required" name="res_room_id" id="res_room_id" data-placeholder="Select...">
                        <option></option>
                        {foreach $residenceRooms as $room}
                            <option value="{$room->id}" {if $operation->res_room_id eq $room.id} selected {/if}>{$room->name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>
        <div class="col-md-2">
            <div class="col-md-5" style="margin-top: 12px;">
                <input type="checkbox" id="vip" class="md-check" name="vip" value="1" {if $operation->vip eq 1}checked{/if}>
                <label for="vip">
                    حجز </label>
            </div>
        </div>
        <div class="clearfix"></div>
        <hr>
        <h3 style="padding: 10px 15px;">Operation</h3>
        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Start time</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop timepicker timepicker-custom start_time_change" name="start_time"
                           data-type="operation" data-time-plus="{$plusTime.time}"
                           id="start_time_edit" value="{$operation->start_time|date_format:'h:i A'}" required="required"/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">End time</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop timepicker timepicker-custom" name="end_time"
                           id="end_time_edit" value="{$operation->end_time|date_format:'h:i A'}" required="required"/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Room</label>
                <div class="col-md-9">
                    <select class="form-control select2edit" required="required" name="room_id" id="room_id" data-placeholder="Select...">
                        <option></option>
                        {foreach $operation_rooms as $room}
                            <option value="{$room.id}" {if $operation->room_id eq $room.id} selected {/if}>{$room.name}</option>
                        {/foreach}
                    </select>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group" id="patient_input">
                <label class="col-md-3 txtl">Patient</label>
                <div class="col-md-9">
                    <input type="text" class="form-control" name="patient_id" required="required" value="{$operation->patient_id}" id="search_patient_op_edit" data-placeholder="Select..."/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Cost</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop" number="true" name="cost" id="cost_edit" value="{$operation->cost}" required="required"/>
                </div>
            </div>
        </div>

        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Visit for</label>
                <div class="col-md-9">
                    <div class="md-radio-inline">
                        <div class="md-radio">
                            <input type="radio" id="for_husband0" name="for_husband" class="md-radiobtn for_husband" value="0" {if $operation->for_husband eq 0}checked{/if}>
                            <label for="for_husband0">
                                <span></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                Wife </label>
                        </div>

                        <div class="md-radio">
                            <input type="radio" id="for_husband_1" name="for_husband" class="md-radiobtn for_husband" value="1" {if $operation->for_husband eq 1}checked{/if}>
                            <label for="for_husband_1">
                                <span></span>
                                <span class="check"></span>
                                <span class="box"></span>
                                Husband </label>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="col-md-12" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-2 txtl">Notes</label>
                <div class="col-md-10">
                    <input type="text" class="form-control notPop" name="notes" id="notes" value="{$operation->notes}"/>
                </div>
            </div>
        </div>


        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">Cost details</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop" value="{$operation->cost_details}" name="cost_details" id="cost_details_edit"/>
                </div>
            </div>
        </div>


        <div class="col-md-6" style="padding: 10px 15px;">
            <div class="form-group">
                <label class="col-md-3 txtl">instructions</label>
                <div class="col-md-9">
                    <input type="text" class="form-control notPop" value="{$operation->instructions}" name="instructions" id="instructions_edit"/>
                </div>
            </div>
        </div>

    </div>
</div>
<div class="modal-footer">
    <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
    <button type="button" id="update_btn" class="btn btn-primary">Save changes</button>
</div>