<div class="col-sm-8 ">
    <div class="row gray_ttc">
        <div class="col-sm-12 row"><br>
            <nav class="text-justify">
                <center>
                    <div class="col-sm-12 edit_admin_video_course_div_padding">
                        <span class="clo-sm-4 edit_admin_video_course_div_padding" title="Video Course Information">
                            <span class="text-left label edit_video_course_information_title">Edit Video Course Information</span>
                        </span>
                    </div>
                </center>
            </nav>
        </div>
        <div class="col-sm-12"><hr></div>
        <input type="hidden" id="baseUrl" value="<?php echo base_url();?>">
        <div class="col-sm-12"><br><br></div>
        <div class="col-sm-12">
            <div class="col-sm-12">
                <?php
                $url = 'update-admin-video-course/'.$edit_video_course_info->video_course_id;
                echo form_open_multipart($url, 'class="" id="updateVideoCourseForm" name="updateVideoCourseForm"');
                ?>
                
        <!-- ----------------Video Title Start---------------- -->
                <div class="form-group col-sm-12">
                    <div class="input-group">
                        <input type="text" 
                               class="form-control" 
                               name="video_course_title" 
                               id="video_course_title"
                               oninput="add_edit_admin_video_course_validation(this.value, 'video_course_title')"
                               value="<?php
                                        if (set_value('video_course_title')) {
                                            echo set_value('video_course_title');
                                        } else {
                                            echo $edit_video_course_info->video_course_title;
                                        }
                                        ?>"
                               placeholder="Please Type Video Course Title..">
                        <span class="input-group-addon" title="Please Type Video Title"><i class="fa fa-video-camera"></i></span>
                    </div>
                    <span class="edit_admin_video_course_error_display" id="video_course_title_error"><?php echo form_error('video_course_title');?></span>
                </div>
                <div class="col-sm-12"><br></div>
        <!-- ------------------------Video Title End---------------------- -->

       <!-- ------------------------Video Course Url Start---------------- -->
                <div class="form-group col-sm-6">
                    <div class="input-group">
                        <input type="text" disabled
                               class="form-control"
                               id="edit_video_course_url" 
                               name="edit_video_course_url" 
                               value="<?php echo $edit_video_course_info->url;?>"
                               placeholder="Please Type Video Course URL..">
                         <span class="input-group-addon" title="Please Type Video Course URL"><i class="fa fa-link"></i></span>
                    </div>
                    <span class="edit_admin_video_course_error_display" id="url_error"><?php echo form_error('edit_video_course_url');?></span>
                </div>
        <!-- --------------------Video Course Url End-------------------- -->
        
        
        <!-- --------------------Video Course Upload Video Type Start-------------------- -->
                <div class="form-group col-sm-6">
                    <select class="form-control" 
                            name="video_course_upload_video_type"
                            id="video_course_upload_video_type"
                            onchange="add_edit_admin_video_course_validation(this.value, 'video_course_upload_video_type')"
                            value="">
                        <option value="">Select Video Course Upload Video Type</option>
                        <option value="1" >TT</option>
                        <option value="2">Youtube</option>                        
                        <option value="3">Vimeo</option>                        
                    </select>
                    <script>
                        documentID('video_course_upload_video_type').value = '<?php
                            echo (set_value('video_course_upload_video_type') != '') ? set_value('video_course_upload_video_type') : $edit_video_course_info->video_course_upload_video_type;
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="video_course_upload_video_type_error"><?php echo form_error('video_course_upload_video_type');?></span>
                </div>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Upload Video Type End-------------------- -->
                
        
        <!-- --------------------Video Course Parent Topic Start-------------------- -->
                <div class="form-group col-sm-6">
                    <select class="form-control" 
                            name="parent_topic_id"
                            id="parent_topic_id"
                            onchange="getChildTopic(this.value, '<?php echo base_url().'view-child-topic'?>','parent_topic_id')">
                        <option value="">Select Parent Topic</option>
                        <?php
                            foreach($parent_topic as $topic_value){
                        ?>
                            <option value="<?php echo $topic_value->topic_id;?>"><?php echo $topic_value->topic_name;?></option>
                        <?php
                            }
                        ?>                       
                    </select>
                    <script>
                        documentID('parent_topic_id').value = '<?php
                        if($edit_video_course_info->parent_topic_id != 0){
                            echo $edit_video_course_info->parent_topic_id;
                        }else if($edit_video_course_info->parent_topic_id==0){
                            echo $edit_video_course_info->topic_id;
                        }
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="parent_topic_id_error"><?php echo form_error('parent_topic_id');?></span>
                </div>
        <!-- --------------------Video Course Parent Topic End-------------------- -->
                
               
        <!-- --------------------Video Course Topic Start-------------------- -->
        <?php
            if($edit_video_course_info->parent_topic_id!=0){
        ?>
                <div class="form-group col-sm-6 select_topic" id="video_course_child_topic">
                    <select 
                        class="form-control" 
                        name="topic_id" id="topic_id"
                        onchange="getOtherTopic(this.value);">
                    <option value="">Select Topic</option>
                    <?php foreach ($child_topic as $v_topic) { ?>
                        <option value="<?php echo $v_topic->topic_id; ?>"><?php echo $v_topic->topic_name; ?></option>
                    <?php } ?>
                        <option value="other">other</option>
                </select>
                    <script>
                        documentID('topic_id').value = '<?php
                            echo (set_value('topic_id') != '') ? set_value('topic_id') : $edit_video_course_info->topic_id;
                            ?>';
                    </script>
                </div>
        
        <?php
            }else{
        ?>
        <div class="form-group col-sm-6 select_topic edit_admin_video_course_div_display" id="video_course_child_topic">
            <select 
                class="form-control" 
                name="topic_id" id="topic_id"
                onchange="getOtherTopic(this.value);">
            <option value="">Select Topic</option>
            <?php foreach ($child_topic as $v_topic) { ?>
                <option value="<?php echo $v_topic->topic_id; ?>"><?php echo $v_topic->topic_name; ?></option>
            <?php } ?>
                <option value="other">other</option>
        </select>
        </div>
        <?php
            }
        ?>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Topic End-------------------- -->
                
        
        <!-- --------------------Video Course Other Topic Start-------------------- -->
                <div class="form-group col-sm-12 other_topic edit_admin_video_course_div_display">
                    <input type="text" 
                           class="form-control" 
                           id="other_topic_id" 
                           name="other_topic_id"
                           oninput="add_edit_admin_video_course_validation(this.value, 'other_topic_id')"
                           placeholder="Please Enter Topic Name"  
                           value="">
                </div>
        <span class="edit_admin_video_course_error_display" id="other_topic_id_error"><?php echo form_error('other_topic_id');?></span>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Other Topic End-------------------- -->  



        <!-- --------------------Video Course Resource person Start-------------------- -->
                    <div class="form-group col-sm-6">
                        <select class="form-control" 
                                name="resource_person_id" 
                                id="resource_person_id"
                                onchange="add_edit_admin_video_course_validation(this.value, 'resource_person_id')">
                            <option value="">Select Resource Person</option>
                            <?php 
                                foreach($resource_person as $v_resource_person){
                             ?>
                            <option value="<?php echo $v_resource_person->resource_person_id;?>" ><?php echo $v_resource_person->person_first_name;?></option>
                            <?php
                                }
                            ?>
                        </select>
                        <script>
                        documentID('resource_person_id').value = '<?php
                            echo (set_value('resource_person_id') != '') ? set_value('resource_person_id') : $edit_video_course_info->resource_person_id;
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="resource_person_id_error"><?php echo form_error('resource_person_id');?></span>
                    </div>
        <!-- --------------------Video Course Resource person End-------------------- -->       


        <!-- --------------------Video Course Level Start-------------------- -->
                <div class="form-group col-sm-6">
                    <select class="form-control" 
                            name="video_course_skill_level" 
                            id="video_course_skill_level"
                            onchange="add_edit_admin_video_course_validation(this.value, 'video_course_skill_level')">
                        <option value="">Select Video Course Skill Level</option>
                        <option value="1">Any</option>
                        <option value="2">Basic</option>
                        <option value="3">Intermediate</option>
                        <option value="4">Advance</option>
                    </select>
                    <script>
                        documentID('video_course_skill_level').value = '<?php
                            echo (set_value('video_course_skill_level') != '') ? set_value('video_course_skill_level') : $edit_video_course_info->video_course_skill_level;
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="video_course_skill_level_error"><?php echo form_error('video_course_skill_level');?></span>
                </div>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Level End-------------------- -->           

        
        <!-- --------------------Video Course Payment Type Start-------------------- -->
                <div class="form-group col-sm-6">
                    <label class="col-xs-4 col-sm-5  text-left label_black edit_admin_video_course_div_padding">Video Course type: </label>
                    <div  class="col-xs-8 col-sm-7 radio radio-success edit_admin_video_course_div_margin" id="radio_success">
                        <input 
                               class="" 
                               type="radio" 
                               name="video_course_payment_type" 
                               id="paid" 
                               value="2" 
                               onclick="getVideoCoursePaymentType(this.value,'video_course_payment_type')">
                        <label for="paid" class="label_black">Paid</label>
                        <span class="edit_admin_video_course_span_margin"></span>
                        <input  
                                class=""  
                                type="radio" 
                                name="video_course_payment_type" 
                                id="free" 
                                value="1"
                                onclick="getVideoCoursePaymentType(this.value,'video_course_payment_type')">
                        <label for="free" class="label_black">Free</label>
                    </div>
                    <script>
                        document.forms['updateVideoCourseForm'].elements['video_course_payment_type'].value = '<?php
                        echo (set_value('video_course_payment_type') != '') ? set_value('video_course_payment_type') : $edit_video_course_info->video_course_payment_type;
                    ?>';</script>
                    <span class="edit_admin_video_course_error_display" id="video_course_payment_validation"><?php echo form_error('video_course_payment_type');?></span>
                </div>
                <?php 
                 if($edit_video_course_info->video_course_payment_type == 1)   {
                ?>
                <div class="form-group col-sm-6 edit_admin_video_course_div_display" id="video_course_price_view">
                        <div class="input-group">
                            <input type="text" 
                                   
                                   class="form-control" 
                                   id="video_course_price" 
                                   name="video_course_price"
                                   value="<?php echo set_value('video_course_price'); ?>"
                                   placeholder="Set Video Course Price">
                            <span class="input-group-addon" title="Video Course Price">
                                <i id="bdt">&#x9f3;</i>
                            </span>
                        </div>
                    </div>
                    <?php
                        }else{
                    ?>
                    <div class="form-group col-sm-6"  id="video_course_price_view">
                        <div class="input-group">
                            <input type="text" 
                                   
                                   class="form-control" 
                                   id="video_course_price" 
                                   name="video_course_price"  
                                   value="<?php echo set_value('video_course_price'); ?>"
                                   oninput="check_price_validation(this.value,'video_course_price')"
                                   placeholder="Set Video Course Price">
                            <span class="input-group-addon" title="Video Course Price">
                                <i id="bdt">&#x9f3;</i>
                            </span>
                        </div>
                        <span class="edit_admin_video_course_error_display" id="video_course_price_error"><?php echo form_error('video_course_price');?></span>
                    </div>
                    <?php
                        }
                    ?>
                    <script>
                        documentID('video_course_price').value = '<?php
                            echo (set_value('video_course_price') != '') ? set_value('video_course_price') : $video_course_price->price;
                            ?>';
                    </script>
                    
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Payment Type End-------------------- -->       
        
                        
        <!-- --------------------Video Course Description Start-------------------- -->            
                <div class="form-group col-sm-12" >
                    <div class="input-group text-left">
                        <label class="label_black">Video Course Description:</label>
                        <textarea class="form-control  resoulation1280" 
                                  name="video_course_description"
                                  id="video_course_description"><?php echo $edit_video_course_info->video_course_description;?></textarea>
                    </div>
                    <span class="edit_admin_video_course_error_display" id="video_course_description_validation"><?php echo form_error('video_course_description');?></span>
                </div>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Description End-------------------- -->    
        

        <!-- --------------------Video Course Language Start-------------------- -->            
                <div class="form-group col-sm-6" >
                    <select class="form-control selectpicker"   
                            name="search_language_id" 
                            id="search_language_id"
                            onchange="language_validation(this.value,'search_language_id')"
                            data-live-search="true">
                        <option value="">Select Language</option>
                        <?php 
                            foreach($all_language_info as $v_langauge){
                        ?>
                        <option value="<?php echo $v_langauge->language_id;?>"><?php echo $v_langauge->language_name;?></option>
                        <?php 
                            }
                        ?>
                     </select>
                    <script>
                        documentID('search_language_id').value = '<?php
                            echo (set_value('search_language_id') != '') ? set_value('search_language_id') : $edit_video_course_info->language_id;
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="video_course_language_validation_id"><?php echo form_error('search_language_id');?></span>
                    <!--view search part-->
                 </div>
        <!-- --------------------Video Course Language End-------------------- -->            


        <!-- --------------------Video Course Access Level Start-------------------- -->            
                <div class="form-group col-sm-6">
                    <select class="form-control"   
                            name="video_course_access_level" 
                            id="video_course_access_level"
                            onchange="add_edit_admin_video_course_validation(this.value,'video_course_access_level')">
                        <option value="">Select Access Level</option>
                        <option value="1">Public</option>
                        <option value="2">TalhaTraining User</option>
                    </select>
                    <script>
                        documentID('video_course_access_level').value = '<?php
                            echo (set_value('video_course_access_level') != '') ? set_value('video_course_access_level') : $edit_video_course_info->video_course_access_level;
                            ?>';
                    </script>
                    <span class="edit_admin_video_course_error_display" id="video_course_access_level_error"><?php echo form_error('video_course_access_level');?></span>
                </div>
                <div class="col-sm-12"><br></div>
        <!-- --------------------Video Course Access Level End-------------------- -->   
        
        
        <!-- --------------------Video Course Publication Status Start-------------------- -->            
                <div class="form-group col-sm-12">
                    <label class="col-sm-2 text-left padding-zero label_black" for="video_course_publication_status"> Publication Status : &nbsp;</label>
                    <div class="radio radio-success col-sm-10 margin-zero" id="publication_status_id">
                        <input type="radio"
                               class="" 
                               name="video_course_publication_status" 
                               id="draft"
                               onclick="add_edit_admin_video_course_validation(this.value,'video_course_publication_status')"
                               value="1">
                        <label for="draft" class="label_black">Draft</label>
                        <span class="edit_admin_video_course_span_margin"></span>
                        <input type="radio"
                               class="" 
                               name="video_course_publication_status" 
                               id="published"
                               onclick="add_edit_admin_video_course_validation(this.value,'video_course_publication_status')"
                               value="2">
                        <label for="published" class="label_black">Active</label>
                        <span class="edit_admin_video_course_span_margin"></span>
                        <input type="radio" 
                               class="" 
                               name="video_course_publication_status" 
                               id="pending"
                               onclick="add_edit_admin_video_course_validation(this.value,'video_course_publication_status')"
                               value="3">
                        <label for="pending" class="label_black">Pending</label>
                        <span class="edit_admin_video_course_span_margin"></span>
                        <input type="radio"
                               class="" 
                               name="video_course_publication_status" 
                               id="archived"
                               onclick="add_edit_admin_video_course_validation(this.value,'video_course_publication_status')"
                               value="4">
                        <label for="archived" class="label_black">Archived</label>
                        <span class="edit_admin_video_course_span_margin"></span>
                    </div>
                    <script>
                        document.forms['updateVideoCourseForm'].elements['video_course_publication_status'].value = '<?php
                        echo (set_value('video_course_publication_status') != '') ? set_value('video_course_publication_status') : $edit_video_course_info->video_course_publication_status;
                    ?>';</script>
                    <span class="edit_admin_video_course_error_display" id="video_course_publication_status_validation"><?php echo form_error('video_course_publication_status');?></span>
                </div>
        <!-- --------------------Video Course Publication Status End-------------------- -->            

                <div class="col-sm-12"><br></div>
                <div class="form-group col-sm-4 col-sm-offset-4">
                    <button type="submit" class="btn btn-default"><i class="fa fa-save" title="Update Video Course"></i></button><br/><br/>
                </div>
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
</div>
<link href="<?php echo base_url();?>back_end_resource/Manage_admin_video_course/edit_admin_video_course.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo base_url();?>back_end_resource/Manage_admin_video_course/edit_admin_video_course.js" type="text/javascript"></script>
