<div class="row gray_ttc">
    <h2>Update Education</h2><hr><br>
    <div class="col-sm-12 ">
        <div class="col-sm-12 row"><br></div>
        <form action="javascript:void(0)" name="edit_education_form" method="post"
              onsubmit="return updateEducation('<?php echo base_url() . 'update-education/' . $edication_details->person_education_details_id; ?>', '<?php echo $edication_details->person_education_details_id; ?>')" >
            <div class="col-sm-12 ">
                <div class="form-group col-sm-12 ">
                    <label for="New_attended" class="col-sm-2 padding-zero text-left">Attended For :  &nbsp;&nbsp;</label>
                    <div class="radio radio-success col-sm-10 padding-zero margin-zero">
                        <input type="radio" 
                               name="new_attended" 
                               id="school" 
                               value="1" 
                               onchange="selectEditInstitute()">
                        <label for="school">School</label>
                        <span style="margin-right: 25px"></span>

                        <input type="radio" 
                               name="new_attended" 
                               id="Collage" 
                               value="2"
                               onchange="selectEditInstitute()">
                        <label for="Collage">Collage</label>
                        <span style="margin-right: 25px"></span>

                        <input type="radio" 
                               name="new_attended" 
                               id="Graduation" 
                               value="3"
                               onchange="selectEditInstitute()">
                        <label for="Graduation">Graduation</label>
                        <span style="margin-right: 25px"></span>

                        <input type="radio" 
                               name="new_attended" 
                               id="Post_Graduation" 
                               value="4"
                               onchange="selectEditInstitute()">
                        <label for="Post_Graduation">Post-Graduation</label>
                        <span style="margin-right: 25px"></span>

                        <input type="radio" 
                               name="new_attended" 
                               id="phd" 
                               value="5"
                               onchange="selectEditInstitute()">
                        <label for="phd">PHD</label>
                        <span style="margin-right: 25px"></span>

                        <input type="radio" 
                               name="new_attended" 
                               id="Post_phd" 
                               value="6"
                               onchange="selectEditInstitute()">
                        <label for="Post_phd">Post-PHD</label>
                    </div>
                    <span id="attended" style="color: red"></span>
                </div>
                <?php
                //echo '<pre>';
                //print_r($edication_details);
                ?>
                
                <input type="hidden" id="hidden_attended_for" value="<?php echo $edication_details->attended_for; ?>">
                <input type="hidden" id="hidden_edu_country" value="<?php echo $edication_details->education_institute_country; ?>">
                <input type="hidden" id="hidden_edu_city" value="<?php echo $edication_details->education_institute_city; ?>">
                <input type="hidden" id="hidden_edu_institute_id" value="<?php echo $edication_details->education_institute_id; ?>">
                <input type="hidden" id="hidden_edu_institute_status" value="<?php echo $edication_details->education_institute_status; ?>">
                <input type="hidden" id="hidden_edu_institute_name" value="<?php echo $edication_details->education_institute_name; ?>">
                <input type="hidden" id="hidden_current_edu_institute_status" value="<?php echo $edication_details->person_current_education_instute; ?>">
                <input type="hidden" id="hidden_edu_view_status" value="<?php echo $edication_details->person_education_view_status; ?>">
                <div class="col-sm-12 row"><br></div>
                <div class="col-sm-12 row">
                    <div class="form-group col-sm-6">
                        <div class="input-group">
                            <select autofocus selected
                                    class="form-control validate[required] text-input" 
                                    id="person_country" 
                                    name ="person_country"
                                    autofocus
                                    onchange="selectEditInstitute()">
                            </select>
                            <span class="input-group-addon" id="basic-addon1" title="Please select country name"><i class="fa fa-flag-checkered"></i></span>
                        </div>
                        <span id="country" style="color: red"></span>
                    </div>
                    <div class="form-group col-sm-6">
                        <div class="input-group">
                            <select  
                                class="form-control validate[required] text-input" 
                                name ="person_city" 
                                id ="person_city" autofocus
                                onchange="selectEditInstitute()">
                                <option value=" ">Select State</option>
                            </select>
                            <span class="input-group-addon" id="basic-addon1" title="please select person city"><i class="fa fa-flag"></i></span>
                        </div>
                        <span id="city_id" style="color: red"></span>
                    </div>
                </div>

                <input type="hidden" name="country_code" id ="country_code" >

                <div class="col-sm-12 row"><br></div>
                <div class="col-sm-12 row">
                    <div class="form-group col-sm-6" id="institution_id">
                        <select autofocus class="form-control" 
                                id="education_institute_id" 
                                name="education_institute_id" 
                                onchange="otherInstitution(this.value)">
                            <option value=""> -Select  Institution Name - </option>
                            <option value="other">Other</option>
                        </select>
                        <span id="institute_id" style="color: red"></span>
                    </div>

                    <div class="form-group col-sm-6 ">
                        <div id="O_Institution" style="display: none">
                            <div class="input-group">
                                <input autofocus type="text" 
                                       name="other_education_institute_name"
                                       id="other_education_institute_name"
                                       class="form-control" 
                                       placeholder="Please Type Institute Name" 
                                       aria-describedby="basic-addon1" >
                                <span class="input-group-addon" id="basic-addon1"  title="Please Type New Category"> <i class="fa fa-retweet"></i></span>
                            </div>
                            <span id="other_institute_id" style="color: red"></span>
                        </div>
                    </div>
                </div>
                <br>
                <div class="col-sm-12 "><br></div>
                <div class="form-group col-sm-6">
                    <div class='input-group' id='datetimepicker1'>
                        <input type='text' 
                               id="New_attended_date" 
                               name="new_attended_date" 
                               value="<?php echo $edication_details->start_time_period; ?>" 
                               onblur="checkEditCurrentDate(this.value)"
                               class="form-control" 
                               placeholder=" Attended date"/>
                        <span class="input-group-addon">
                            <span class="glyphicon glyphicon-calendar" title="Please select Attended Date"></span><br>
                        </span>
                    </div>
                    <span id="start_date" style="color: red"></span>
                </div>
                <div class="form-group col-sm-6">
                    <label for="person_current_education_instute" class="col-sm-8 padding-zero">Current Education Institute  :  &nbsp;&nbsp;</label>
                    <div class="radio radio-success col-sm-4 padding-zero margin-zero" id="status">
                        <input type="radio" 
                               class="validate[required]"
                               onclick="EducationStatus(this.value)" 
                               onblur="compareEditEducationDate()"
                               name="person_current_education_instute" 
                               id="yes" 
                               value="1" >
                        <label for="yes">Yes</label>
                        <span style="margin-right: 30px"></span>
                        <input type="radio" 
                               class="validate[required]"
                               onclick="EducationStatus(this.value)"
                               onblur="compareEditEducationDate()"
                               name="person_current_education_instute" 
                               id="no" 
                               value="2">
                        <label for="no">No</label>
                    </div>
                </div>
                <span id="current_status" style="color: red"></span>
            </div>
            <div class="col-sm-12" id="eduEndDate" style="display: none">
                <div class="form-group col-sm-6">
                    <div class="col-sm-12 "><br></div>
                    <div class='input-group' id='datetimepicker3'>
                        <input type='text' 
                               id="New_finished_date" 
                               name="new_finished_date" 
                               value="<?php echo $edication_details->end_time_period; ?>" 
                               class="form-control" 
                               onblur="compareEditEducationDate()"
                               placeholder=" Finished date"/>
                        <span class="input-group-addon">
                            <span class="glyphicon glyphicon-calendar" title="Please Select Finished Date"></span><br>
                        </span>
                    </div>
                    <span id="end_date" style="color: red"></span>
                </div>
            </div>
            <div class="col-sm-12 "><br></div>
            <div class="col-sm-12">
                <div class="form-group col-sm-12">
                    <textarea name="new_education_description" id="new_education_description" 
                              data-errormessage-value-missing="Educational Description is required!"
                              class="form-control col-sm-4 validate[required] text-input" 
                              placeholder="Please type Educational Description"><?php echo $edication_details->educational_description; ?></textarea>
                    <span id="endu_description" style="color: red"></span>
                </div>

            </div>

            <div class="col-sm-12 row"> <br></div>
            <div class="col-sm-12 row">
                <div class="col-sm-12 ">
                    <div class="form-group col-sm-6">
                        <select class="form-control" name="new_education_view_type" >
                            <option value=""> -Who can see my Education details- </option>
                            <option value="1">Public</option>
                            <option value="2">Talha Training User</option>
                            <option value="3">Link</option>
                            <option value="4">Only Me</option>
                        </select>
                        <span id="edu_view_type" style="color: red"></span>
                    </div>
                    <div class="col-sm-6"></div>
                </div>
            </div>
            <div class="col-sm-12 "><br></div>
            <div class="form-group col-sm-5"></div>
            <div class="form-group col-sm-1 ">
                <button type="submit" id="edit_education_button" class=" btn btn-default">
                    <i class="fa fa-save" title="Update Education"></i>
                </button>
            </div>

            <div class="form-group col-sm-1">
                <a class=" btn btn-default" href="javascript:void(0)"
                   onclick="cancelUpdateEducation('<?php echo base_url() ?>cancel-update-education', '<?php echo $edication_details->person_education_details_id; ?>')" >
                    <i class="fa fa-times" title="Cancel"></i></a>
            </div>

        </form>
    </div>
</div>
<div><input type="hidden" id="check_education_form_view" value="1"></div>