<style>
    .form-outer{
        display:inline-block;
        width:100%;
    }
    
    .w-20{
        float:left;
        padding:10px;
        width:20%;
    }
    
    .w-25{
        float:left;
        padding:10px 10px 0px 10px;
        width:20%;
    }
</style>

<?php 
$academic_session=$this->session->userdata("acedemic_session");
$y1=$this->session->userdata("y1");
$y2=$this->session->userdata("y2");
?>
<div class="container-fluid bg-white">
    <div class="row">
        <div class="col-sm-12 pt-3 pb-3">
            <ul class="breadcrumb">
                <li class="breadcrumb-item">
                    <a href="<?php echo base_url(); ?>Welcome">Home</a>
                </li>
                <li class="breadcrumb-item"><a href="<?php echo base_url(); ?>ExamManagement/exam_subjects_master">Exam Subjet Master</a></li>
                <li class="breadcrumb-item">Add New Subject</li>
            </ul>
            
            <div class="form-outer">
                <form method="post" action="#">
                    <h1 class="main-heading text-center">Add New Subject</h1><hr>
                    <div class="w-100">
                        <?php 
                        if($success){
                        ?>
                        <div class="alert alert-success"><?php echo $success; ?></div>
                        <?php
                        }
                        
                        if($error){
                        ?>
                        <div class="alert alert-danger"><?php echo $error; ?></div>
                        <?php
                        }
                        ?>
                    </div>
                    <div class="form-group w-25">
                        <label>Class</label>
                        <select class="form-control" name="class" required>
                            <option value="">--- Select Class ---</option>
                            <?php
                            $courses_table="courses";
                            $all_classes=$this->NewFeeModel->get_class_list($courses_table);
                            if($all_classes){
                                foreach($all_classes as $courses){
                            ?>
                            <option value="<?php echo $courses['course']; ?>"><?php echo $courses['course']; ?></option>
                            <?php
                                }
                            }
                            ?>
                        </select>
                    </div>
                    
                    <div class="for-group w-25">
                        <label>Subject</label>
                        <input type="text" name="subject" class="form-control" placeholder="Subject" required>
                    </div>
                    
                    <div class="for-group w-25">
                        <label>Subject Order</label>
                        <input type="number" name="subject_order" class="form-control" placeholder="Subject Order" min="1" required>
                    </div>
                    
                    <div class="form-group w-25">
                        <label>Status</label>
                        <select class="form-control" name="status" required>
                            <option value="">--- Status ---</option>
                            <option value="active">Active</option>
                            <option value="inactive">Inactive</option>
                        </select>
                    </div>
                    
                    
                    <div class="form-group w-25">
                        <label>MM</label>
                        <input type="number" class="form-control" name="max_marks" placeholder="Max Marks" >
                    </div>
                    
                    <div class="form-group w-25">
                        <label>Exam Type</label>
                        <select class="form-control" name="exam_type" required>
                            <option value="">--- Select Exam Type ---</option>
                            <option value="Marks">Marks</option>
                            <option value="Grade">Grade</option>
                        </select>
                    </div>
                    
                    <div class="form-group w-25">
                        <label>Subject Type</label>
                        <select class="form-control" name="subject_type" required>
                            <option value="">--- Select Subject Type ---</option>
                            <option value="Main Subject">Main Subject</option>
                            <option value="Additional Subject">Additional Subject</option>
                        </select>
                    </div>
                    
                    <div class="form-group w-25">
                        <label>Academic Session</label>
                        <select class="form-control" name="academic_session" required>
                            <option value="<?php echo $academic_session; ?>"><?php echo $y1."-".$y2; ?></option>
                        </select>
                    </div>
                    
                    <div class="form-group w-25">
                        <!--<label>&nbsp;</label><br>-->
                        <button class="btn btn-sm btn-success" name="aad_new_subject" type="submit">Submit</button>
                    </div>
                    
                    
                    <!--id 	 	subject 	status 	created_at 	created_by 	updated_at 	updated_by 	-->
                </form>
            </div>
            
            
        </div>
    </div>
</div>