<div class="col-sm-10">
    <div class="row gray_ttc">
        <div class="col-sm-10 ">
            <div class="col-sm-12">
                <h3>Add Batch Information</h3>  
            </div>
            <div class="col-sm-12"> <hr><br></div>
            <div class="col-sm-12">
                <?php                       
                echo validation_errors();
                $url = 'super-admin/create-batch';
                echo form_open($url, 'class="" id="formID2" name="createBatch" onsubmit="check_form()"');
                ?>
                <div class="col-sm-12">
                    <div class="col-sm-12 form-group">
                        <div class="input-group">
                            <input type="text" 
                                   data-errormessage-value-missing="Batch name is required"
                                   class="form-control validate[required] text-input" 
                                   name="course_batch_name" id="course_batch_name"
                                   placeholder="Type your Batch Name.." aria-describedby="basic-addon1"
                                   value="<?php echo set_value('course_batch_name'); ?>">
                            <span class="input-group-addon" id="basic-addon1" title="Type your Batch Name"><i class="fa fa-ge"></i></span>
                        </div>
                        <span id="course_batch_name_message" style="color: red"><?php //echo form_error('course_batch_name');  ?></span>
                    </div>
                    <div class="col-sm-12"><br></div>
                    <!-----------------  start search --------------->

                    <div class="col-sm-12 form-group">
                        <select class="form-control" 
                           name="course_type" id="course_type"
                           onchange="getCourseType(this.value, '<?php echo base_url().'super-admin/select-course-type' ?>')">
                            <option value=""> -Select Course Type- </option>
                            <option value="2"> All Course</option>
                            <option value="1">TT Course </option>
                            <option value="3">Organization Course</option>
                            <option value="4">Teacher Course</option>
                        </select>
                        <span id="course_message" style="color: red"><?php echo form_error('course'); ?></span>
                    </div>
                    <div id="search_area" style="display:none">
                    <div class="col-sm-12"><br></div>
                    <div class="col-sm-12 form-group" >
                        <div class="input-group">
                            <input type="text" 
                                   data-errormessage-value-missing="Search Here"
                                   class="form-control  text-input" 
                                   name="search_course" id="search_course"
                                   oninput ="getCourseSearchValue(this.value, course_type.value, '<?php echo base_url().'super-admin/search-course-type' ?>')"
                                   placeholder="Search Here.." aria-describedby="basic-addon1"
                                   value="<?php echo set_value('search_course'); ?>">
                            <span class="input-group-addon" id="basic-addon1" title="Type your Batch Name"><i class="fa fa-search"></i></span>
                        </div>
                        <span id="search_course_message" style="color: red"><?php //echo form_error('course_batch_name');  ?></span>
                    </div>
                    </div>
                    <!--------------------     end search    ------------->

                    <div class="col-sm-12"><br></div>
                    <div class="col-sm-12 form-group" id="course_area">
                        <select data-errormessage-value-missing="Course is required"
                                class="form-control validate[required]" 
                                name="course" id="course"
                                onchange="getCourseInfo(this.value, '<?php echo base_url() . 'super-admin/batch-course-info' ?>')">
                            <option value=""> -Select Course - </option>
                            <?php foreach ($courses as $v_courses) { ?>
                                <option value="<?php echo $v_courses->course_id; ?>"><?php echo $v_courses->course_name; ?></option>
                            <?php } ?>
                        </select>
                        <span id="course_message" style="color: red"><?php echo form_error('course'); ?></span>
                    </div>
                    <div class="col-sm-12"><br></div>
                    <div id="course_info">
                        <div class="col-sm-12 form-group text-left">
                            <strong id="course_resource_person">
                                <input type="hidden" name="resource_person_id" id="resource_person_id" value="<?php //echo $resource_person_info->resource_person_id;  ?>">
                                Resource Person Name :
                            </strong>
                        </div>

                        <div class="col-sm-6 form-group">
                            <div class="input-group " id="datetimepicker1">
                                <input type="text" 
                                       data-errormessage-value-missing="Class start Date is Required!"
                                       class="form-control validate[required,custom[mindate],custom[batchFinishedDate]] text-input"
                                       name="course_batch_start_date" id="course_batch_start_date" 
                                       placeholder="Please Select  Start Date"
                                       value="<?php echo set_value('course_batch_start_date'); ?>">
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar" title="Please Select  Start Date"></span>
                                </span>
                            </div>
                            <span id="course_batch_start_date_message" style="color: red"><?php //echo form_error('course_batch_start_date');  ?></span>
                        </div>

                        <div class="col-sm-6 form-group">
                            <div class="input-group " id="datetimepicker5">
                                <input type="text" 
                                       data-errormessage-value-missing="Class finish Date is Required!"
                                       class="form-control validate[required,custom[mindate],custom[batchFinishedDate]] text-input"
                                       name="course_batch_finish_date" id="course_batch_finish_date" 
                                       placeholder="Please Select Finish Date"
                                       value="<?php echo set_value('course_batch_finish_date'); ?>">
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar" title="Please Select Finish Date"></span>
                                </span>
                            </div>
                            <span id="course_batch_finish_date_message" style="color: red"><?php //echo form_error('course_batch_finish_date');  ?></span>                        
                        </div>
                        <div class="col-sm-12 form-group text-left">
                            <strong>Batch Status: </strong> Create
                        </div>
                    </div>
                    <div class="col-sm-12"><br><br></div>
                    <div class="form-group col-sm-4 col-sm-offset-4">
                        <input type="submit" class="green-btn btn btn-default" value=" Create">
                    </div>
                    <div class="form-group col-sm-2"></div>
                    <div class="col-sm-12"><br><br></div>
                </div>
                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript" src="<?php echo base_url()?>front_end_resource/batch/batch.js"></script>
