<div class="col-sm-8">
    <div class="row gray_ttc">
        <div class="col-sm-12">
            <div class="col-sm-12">
                <nav class="text-justify">
                    <div class="col-sm-12">
                        <center>
                            <span class="clo-sm-4" title="Course Details" style="padding: 0">
                                <span class="number badge" style="background-color: green">1</span>
                                <span class="text-left label" style="color: #000;font-size: 16px;font-weight: normal">Edit Schedule Class</span>
                                <span class="nav-arrow" id="cborder" style="margin-right: 8px"><img src="<?php echo base_url(); ?>image/border.jpg"></span>
                            </span>

                            <span class="clo-sm-4" title="Review And Publish" style="padding: 0">
                                <span class="number badge" style="background-color: gray">2</span>
                                <span class="text-left label" style="color: #000;font-size: 16px;font-weight: normal">Review and Publish</span>
                            </span>
                        </center>
                    </div>
                </nav>
                <div class="col-sm-12"><br></div>
            </div>

            <div class="col-sm-12"><br></div>
            <div class="col-sm-12">
                <?php
                echo $this->session->userdata('person_id') . '----' . $feature_info->virtual_classroom_number . '---' . $feature_info->virtual_classroom_per_day;
                $url = 'edit-scheduled-class/' . $classroom_info->url;
                echo form_open($url, 'class="" id="formID2" name="scheduleClassroom" onsubmit="return cehckSubmit(' . $feature_status . ');"');
                ?>
                <div class="col-sm-12">
                    <div class="col-sm-12" id="feature_status_error" 
                    <?php
                    if (form_error('hidden_feature_stauus') != '') {
                        echo 'style="display: block"';
                    } else {
                        echo 'style="display: none"';
                    }
                    ?>>
                        <div class="col-sm-8" >
                            <span style="color: red;">Please update your account to create paid course</span>
                            <a href="<?php echo base_url() . 'pricing' ?>" target="blank" class="btn btn-success" title="Update Account">
                                <i class="fa fa-arrow-up"></i>
                            </a>
                        </div>
                        <br><br>
                    </div>

                    <div class="col-sm-12">
                        <div class="input-group">
                            <input type="text"
                                   data-errormessage-value-missing="Class Title is Required!"
                                   class="form-control validate[required, custom[courseName]] text-input"
                                   name="classroom_title" 
                                   id="classroom_title"
                                   oninput="getClassroomTitle(this.value)"
                                   placeholder="Type your Class Title.." aria-describedby="basic-addon1"
                                   value="<?php
                                   if (set_value('classroom_title')) {
                                       echo set_value('classroom_title');
                                   } else {
                                       echo $classroom_info->classroom_title;
                                   }
                                   ?>">
                            <span class="input-group-addon" id="basic-addon1"><i class="fa fa-institution"></i></span>
                        </div>
                        <div id="classroom_title_error" style="color:red">
                            <?php echo form_error('classroom_title'); ?>
                        </div>
                    </div>
                    <div class="col-sm-12"><br> <br></div>



                    <div class="col-sm-12">
                        <div class="col-sm-6" id="add_course_button" style="display: block;">
                            <div class="input-group">
                                <span class="input-group-addon" id="basic-addon1">
                                    <a href="" data-toggle="modal" data-target="#add_course"><i class="fa fa-plus-circle pull-left" >Add Course</i></a>
                                </span>
                            </div>
                        </div>
                        <br><br>
                    </div>


                    <div class="col-sm-12" id="submitted_course_name"><?php
                        if (set_value('hidden_course_name')) {
                            echo set_value('hidden_course_name');
                        } else {
                            echo '<b>Course Name : </b>' . $classroom_info->course_name;
                        }
                        ?></div>
                    <input type="hidden" id="hidden_course_id" name="hidden_course_id" value="<?php
                    if (set_value('hidden_course_id')) {
                        echo set_value('hidden_course_id');
                    } else {
                        echo $classroom_info->course_id;
                    }
                    ?>">
                    <input type="hidden" id="hidden_course_name" name="hidden_course_name" value="<?php
                    if (set_value('hidden_course_name')) {
                        echo set_value('hidden_course_name');
                    } else {
                        echo $classroom_info->course_name;
                    }
                    ?>">
                    <div class="col-sm-12" id="course_id_error" style="color: red;"><?php echo form_error('hidden_course_id'); ?></div>
                    <input type="hidden" id="hidden_feature_stauus" name="hidden_feature_stauus" value="<?php echo $feature_status; ?>">


                    <div class="col-sm-12"><br> <br></div>
                    <div class="col-sm-6">
                        <div class="form-group">
                            <div class="input-group date" id="datetimepicker1">
                                <input type="text"
                                       data-errormessage-value-missing="Class start Date is Required!"
                                       class="form-control validate[required,custom[nowandthen]] text-input"
                                       name="class_date" 
                                       id="class_date"
                                       aria-describedby="basic-addon1"
                                       onblur="checkDate(this.value, '<?php echo base_url() . 'check-classroom-start-date' ?>', '<?php echo $feature_info->virtual_classroom_per_day ?>','<?php echo $classroom_info->classroom_id ?>')"
                                       value="<?php
                                       if (set_value('class_date')) {
                                           echo set_value('class_date');
                                       } else {
                                           $date = strtotime($classroom_info->class_start_time);
                                           echo date('Y-m-d', $date);
                                       }
                                       ?>"
                                       placeholder="yyyy-mm-dd">
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                            <label >[Select Your Class Start Date]</label>
                        </div>
                    </div>
                    <input type="hidden" id="class_start_date_validate" value="1">
                    <div class="col-sm-6"><span id="class_start_date_error" style="color: red"><?php echo form_error('class_date'); ?></span></div>
                    <div class="col-sm-12"><br></div>



                    <div class="col-sm-12">
                        <div class="col-sm-6" style="padding: 0">
                            <div class='col-sm-5' style="padding: 0">
                                <div class="form-group">
                                    <div class='input-group date' id='datetimepicker3'>
                                        <input type='text' data-errormessage-value-missing="Class start Time is Required!"
                                               class="form-control validate[required, custom[nowandthen2]] text-input"
                                               name="class_start_time" 
                                               id="class_start_time"
                                               onblur="checkStartTime(this.value, '<?php echo base_url() . 'check-class-start-date-time'; ?>')"
                                               value="<?php
                                               if (set_value('class_start_time')) {
                                                   echo set_value('class_start_time');
                                               } else {
                                                   $date = strtotime($classroom_info->class_start_time);
                                                   echo date('H:i a', $date);
                                               }
                                               ?>" />
                                        <span class="input-group-addon">
                                            <span class="glyphicon glyphicon-time"></span>
                                        </span>
                                    </div>
                                    <label>[Class Start Time]</label>
                                </div>
                                <input type="hidden" id="class_start_time_validate" value="1">
                                <div class="col-sm-12" id="class_start_time_error" style="color: red"><?php echo form_error('class_start_time'); ?></div>
                            </div>



                            <div class="col-sm-1">&nbsp;&nbsp;</div>
                            <div class='col-sm-5' style="padding: 0">
                                <div class="form-group">
                                    <div class='input-group'>
                                        <input type='text' data-errormessage-value-missing="Class Duration is Required!"
                                               class="form-control validate[required, custom[integer], custom[classDuration]] text-input"
                                               aria-describedby="basic-addon1"
                                               name="duration" 
                                               id="duration"
                                               oninput="checkDuration('<?php echo base_url() . 'check-date-time-feature-status' ?>','<?php echo $feature_info->virtual_classroom_number ?>','<?php echo $classroom_info->classroom_id ?>')"
                                               value="<?php
                                               if (set_value('duration')) {
                                                   echo set_value('duration');
                                               } else {
                                                   echo $classroom_info->class_duration;
                                               }
                                               ?>"
                                               maxlength="3"
                                               placeholder="Class Duration"/>
                                    </div>
                                    <label>[in Minute]</label>
                                </div>
                                <div class="col-sm-12" id="duration_error" style="color: red"><?php echo form_error('duration'); ?></div>
                            </div>
                        </div>


                        <div class="col-sm-6">
                            <div class="col-sm-12 text-left" style="padding:0 ">  
                                <span id="class_duration"><?php
                                    $date = strtotime($classroom_info->class_end_time);
                                    echo '<b>Class End Time</b> : ' . date('H:i:s a', $date);
                                    ?></span>
                            </div>
                            <div class="col-sm-12 text-left" style="padding:0 ">  <span id="extra_time_message" style="color: red;"></span></div>
                        </div>
                    </div>



                    <div class="col-sm-12"><br></div>
                    <div class="col-sm-12">
                        <div class="input-group">
                            <textarea
                                data-errormessage-value-missing="Classroom Instruction is Required!"
                                class="form-control validate[required] text-input"
                                name="classroom_instruction" id="classroom_instruction"
                                rows="3"  cols="100" placeholder="Class Instruction" style="max-width:590px;max-height: 100px"><?php
                                    if (set_value('classroom_instruction')) {
                                        echo set_value('classroom_instruction');
                                    } else {
                                        echo $classroom_info->classroom_instruction;
                                    }
                                    ?></textarea>
                        </div>
                    </div>
                    <div class="col-sm-12"><br></div>



                    <div class="col-sm-6">
                        <div class="col-sm-12 text-left" style="padding-left:0">
                            <label >Max attendees : <span id="attendees_number"><?php
                                    echo $feature_info->virtual_classroom_attendees_number;
                                    ?></span>
                            </label>
                        </div>
                    </div>



                    <div class="col-sm-6">
                        <div class="col-sm-12 text-left" style="padding-left:0">
                            <label>Class type : <span id="virtual_classroom_type"><?php
                                    if ($feature_info->virtual_classroom_type == 1) {
                                        echo 'Live Broadcasting';
                                    } else if ($feature_info->virtual_classroom_type == 2) {
                                        echo 'Live Broadcasting and Recording';
                                    }
                                    ?></span></label>
                        </div>
                    </div>

                    <div class="col-sm-12"><br><br><br></div>

                    <div class="col-sm-3"></div>
                    <div class="col-sm-6">
                        <input type="submit" 
                               class="green-btn btn btn-default" value="Update Schedule and Continue!"><br/><br/>
                    </div>
                    <div class="col-sm-3"></div>

                    <div class="col-sm-12" id="required_message" style="color: red"></div>

                </div>
                <!--</form>-->
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
</div>
<?php include 'class_modal/add_course.php'; ?>


<script type="text/javascript" src="<?php echo base_url() ?>front_end_resource/classroom/classroom.js"></script>
<script>
