<div class="col-sm-10">
    <div class="row gray">
        <div class="course-detail-tab margin-zero ">
            <h3 style="padding-left: 10px">Add Work File</h3>
            <div id="my-tab-content" class="tab-content">
                <!--Work file-->    

                <div id="add_work_file">
                    <div class="tab-content panel-body">
                        <?php
                        $url = 'admin/course/save-work-file';
                        echo form_open_multipart($url, 'name="add_course_work_form"');
                        ?>
                        <input type="hidden" id="baseUrl" value="<?php echo base_url(); ?>">
                        <input type="hidden" id="course_url" name="course_url" value="">
                        <div class="col-sm-12  "><br></div>
                        <div class="col-sm-10 col-sm-offset-1 padding-zero"><br> 
                            <div class="col-sm-12 padding-zero white" ><br>

                                <div class="col-sm-12" id="topicView">
                                    <div class="form-group col-sm-10">
                                        <div class="input-group">
                                            <select class="form-control"
                                                    name="topic_id" 
                                                    id="topic_id">
                                                <option value="">Select Topic</option>
                                                <?php
                                                foreach ($parent_topic as $value) {
                                                    echo '<option value="' . $value->topic_id . '">' . $value->topic_name . '</option>';
                                                }
                                                ?>
                                            </select>
                                            <span class="input-group-addon" id="basic-addon1" title="Please Select Topic"><i class="fa fa-book"></i></span>
                                        </div>
                                        <span style="color: red; display: none;" id="topic_id_error"><?php echo form_error('topic_id'); ?></span>
                                    </div>



                                    <div class="col-sm-12 form-group"></div>
                                    <div class="form-group col-sm-10">
                                        <div class="input-group">
                                            <select class="form-control" 
                                                    name="child_topic_id" 
                                                    id="child_topic_id">
                                                <option value="">Select Child Topic</option>
                                            </select>
                                            <span class="input-group-addon" id="basic-addon1" title="Please Select Child Topic"><i class="fa fa-book"></i></span>
                                        </div>
                                        <span style="color: red; display: none;" id="child_topic_id_error"><?php echo form_error('child_topic_id'); ?></span>
                                    </div>

                                    <div class="col-sm-12 form-group"></div>
                                    <div class="form-group col-sm-10">
                                        <div class="input-group">
                                            <select class="form-control" 
                                                    name="course_id" 
                                                    id="course_id">
                                                <option value="">Select Course</option>
                                            </select>
                                            <span class="input-group-addon" id="basic-addon1" title="Please Select Course Name"><i class="fa fa-book"></i></span>
                                        </div>
                                        <span style="color: red; display: none;" id="course_id_error"><?php echo form_error('course_id'); ?></span>
                                    </div>
                                </div>


                                <div class="col-sm-12 form-group"></div>
                                <div class="col-sm-12" id="folder_view" style="display: none">
                                    <div class="form-group col-sm-10" >
                                        <div class="input-group">
                                            <input type="text" 
                                                   class="form-control"
                                                   id="work_file_folder_name"
                                                   name="work_file_folder_name"
                                                   value="<?php echo set_value('work_file_folder_name'); ?>"
                                                   placeholder="Please Type Work Folder Name">
                                            <span class="input-group-addon"  title="Please Type Work Folder Name"><i class="fa fa-folder"></i></span>
                                        </div>
                                        <div id="folder_name_error" style="color: red; display: none"><?php echo form_error('work_file_folder_name'); ?></div>
                                    </div>
                                </div>
                            </div>


                            <div id="upload_WorkFile_heaader">

                            </div>
                        </div>



                        <div class="form-group col-sm-3 col-sm-offset-9 " >
                            <button type="button" id="add_more_course_work_file_button"
                                    class="btn btn-success">Add More</button>
                        </div>
                        <div class="col-sm-12"><br> </div>
                        <div id="final_error_message" style="color:red;" class="col-sm-12 text-center">
                            <?php
                            if (isset($this->session->work_file_error_msg)) {
                                echo $this->session->work_file_error_msg;
                                $this->session->unset_userdata('work_file_error_msg');
                            }
                            ?>
                        </div>
                        <div class="form-group col-sm-12">
                            <div id="submit_status"></div>
                            <div class="checkbox col-sm-12">
                                <center>
                                    <button type="submit" id="submit_work_file"
                                            class="btn btn-default" >Add Course Work File</button>
                                </center>
                            </div>
                        </div>
                        <?php echo form_close(); ?>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <br>
    <div class="row gray">
        <div class="col-sm-12 ">
            <label><a href="<?php echo base_url(); ?>super-admin">Dashboard</a> ->> <a href="<?php echo base_url(); ?>admin/manage-course">Manage Course</a>->>Create Course Work File</label>
        </div>
    </div>
</div>

<script type="text/javascript" src="<?php echo base_url() ?>back_end_resource/course/course_work_file.js">
</script>