<?php defined('BASEPATH') OR exit('No direct script access allowed');?>
<div class="row">
   <div class="col-12 col-md-12 col-lg-12">
      <div class="card">
         <div class="card-body">
            <?php echo form_open_multipart('', array('role'=>'form')); ?>
            <div class="row">
               <div class="col-6">
                  <div class="form-group <?php echo form_error('name') ? ' has-error' : ''; ?>">
                     <?php echo form_label('Session Name'); ?>  
                     <span class="required">*</span>
                     <input type="text" name="name" id="name" class="form-control" value="<?php echo set_value('name') ?>">
                     <span class="small form-error"> <?php echo strip_tags(form_error('name')); ?> </span>  
                  </div>
               </div>
               <div class="col-6">
                  <div class="form-group <?php echo form_error('video_link') ? ' has-error' : ''; ?>">
                     <?php echo form_label('Video Link'); ?>  
                     <span class="required">*</span>
                     <input type="text" name="video_link" id="video_link" class="form-control" value="<?php echo set_value('video_link') ?>">
                     <span class="small form-error"> <?php echo strip_tags(form_error('video_link')); ?> </span>  
                  </div>
               </div>

               <!-- <div class="col-6">
                  <div class="form-group <?php echo form_error('assessment_link') ? ' has-error' : ''; ?>">
                     <?php echo form_label('Assessment Link'); ?>  
                     <span class="required">*</span>
                     <input type="text" name="assessment_link" id="assessment_link" class="form-control" value="<?php echo set_value('assessment_link') ?>">
                     <span class="small form-error"> <?php echo strip_tags(form_error('assessment_link')); ?> </span>  
                  </div>
               </div> -->

               <div class="col-6">
                  <div class="form-group <?php echo form_error('duration_min') ? ' has-error' : ''; ?>">
                     <?php echo form_label('Session Duration In Minute '); ?>  
                     <span class="required">*</span>
                     <input type="text" name="duration_min" id="duration_min" class="form-control" value="<?php echo set_value('duration_min') ?>">
                     <span class="small form-error"> <?php echo strip_tags(form_error('duration_min')); ?> </span>  
                  </div>
               </div>

               <div class="form-group col-md-6 col-lg-6 col-sm-12<?php echo form_error('category') ? ' has-error' : ''; ?>">
                        <?php echo  form_label('Question Language', 'category', array('class' => 'control-label'));
                        ?>
                        <span class="required">*</span>


                        <select name="category" id="category" class="form-control input-lg">
                            <option value="">Select Question Language</option> 
                           <?php
                           foreach ($question_lang as $row) {
                              echo '<option value="' . $row->id . '">' . $row->category_title . '</option>';
                           }
                           ?>
                        </select>
                        <span class="small text-danger"> <?php echo strip_tags(form_error('category')); ?> </span>
               </div>
               <div class="form-group col-md-6 col-lg-6 col-sm-12<?php echo form_error('testId') ? ' has-error' : ''; ?>">
                        <?php echo  form_label('Test', 'testId', array('class' => 'control-label'));
                        ?>
                        <!-- <span class="required">*</span> -->


                        <select name="testId" id="testId" class="form-control input-lg">
                           <option value="">Select Test Name</option> 
                           <?php
                           foreach ($test_list as $row) {
                              echo '<option value="' . $row->id . '">' . $row->title . '</option>';
                           }
                           ?>
                        </select>
                        <span class="small text-danger"> <?php echo strip_tags(form_error('testId')); ?> </span>
               </div>

               <div class="col-12">
                  <div class="form-group <?php echo form_error('description') ? ' has-error' : ''; ?>">
                     <?php echo form_label('Session Description '); ?>  
                     <span class="required">*</span>
                     <textarea   name="description" id="description"  class="form-control"><?php echo set_value('description'); ?> 
                     </textarea>
                     <span class="small form-error"> <?php echo strip_tags(form_error('description')); ?> </span>  
                  </div>
               </div>
            </div> 
            <input type="submit" value="<?php echo ucfirst(lang('core_button_save'));?>" class="btn btn-primary btn-lg">
            <a href="<?php echo base_url("admin/session");?>" class="btn btn-dark btn-lg"><?php echo lang('core_button_cancel'); ?></a>
            <?php echo form_close(); ?>
         </div>
      </div>
   </div>
</div>
