<?php 
$academic_session_table="academic_session_details";
$all_acedemic_sessions=$this->TimeTableModel->get_data($academic_session_table);
?>
<style>
/* The container */
.check-container {
display: block;position: relative;padding-left: 35px;margin-bottom: 12px;cursor: pointer;font-size: 22px;user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}

/* Hide the browser's default checkbox */
.check-container input {position: absolute;opacity: 0;cursor: pointer;height: 0;width: 0;}

/* Create a custom checkbox */
.checkmark {
position: absolute;top: 0;left: 0;height: 25px;width: 25px;background-color: #eee;}

/* On mouse-over, add a grey background color */
.check-container:hover input ~ .checkmark {background-color: #ccc;}

/* When the checkbox is checked, add a blue background */
.check-container input:checked ~ .checkmark {background-color: #2196F3;}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {content: "";position: absolute;display: none;}

/* Show the checkmark when checked */
.check-container input:checked ~ .checkmark:after {display: block;}

/* Style the checkmark/indicator */
.check-container .checkmark:after {
left: 9px;top: 5px;width: 5px;height: 10px;border: solid white;border-width: 0 3px 3px 0;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);transform: rotate(45deg);
}
.w-25{float:left;width:25%;}
</style>
<div class="container-fluid mt-3 mb-3 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(); ?>TimeTableManagement">Time Table</a>
                </li>
                <li class="breadcrumb-item">Add New Time Table</li>
            </ul>
            
            <form method="post" action="#">
                <h2 class="main-heading">Add New Time Table</h2><hr>
                <?php 
                if($success){
                ?>
                <div class="alert alert-success"><?php echo $success; ?></div>
                <?php
                }
                ?>
                
                <?php 
                if($error){
                ?>
                <div class="alert alert-danger"><?php echo $error; ?></div>
                <?php
                }
                ?>
                <div class="form-group">
                    <label>Title</label>
                    <input type="text" name="title" class="form-control" placeholder="Title" required>
                </div>
                
                <div class="form-group">
                    <label>Acedemic Session</label>
                    <select class="form-control" name="acedemic_session" required>
                        <option value="">-- Select Acedemic Session --</option>
                        <?php
                        if($all_acedemic_sessions){
                            foreach($all_acedemic_sessions as $ace_sess_data){
                        ?>
                        <option value="<?php echo $ace_sess_data['id']; ?>"  <?php if($ace_sess_data['status'] == 1){ echo "selected"; } ?>><?php echo $ace_sess_data['year_long']; ?></option>
                        <?php
                            }
                        }
                        ?>
                    </select>
                </div>
                
                <div class="form-group w-25">
                    <label class="check-container">April
                        <input type="checkbox" class="" name="april" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">May
                        <input type="checkbox" class="" name="may" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">June
                        <input type="checkbox" class="" name="june" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">July
                        <input type="checkbox" class="" name="july" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                
                <div class="form-group w-25">
                    <label class="check-container">August
                        <input type="checkbox" class="" name="august" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">September
                        <input type="checkbox" class="" name="september" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">October
                        <input type="checkbox" class="" name="october" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">November
                        <input type="checkbox" class="" name="november" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                
                <div class="form-group w-25">
                    <label class="check-container">December
                        <input type="checkbox" class="" name="december" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">January
                        <input type="checkbox" class="" name="january" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">February
                        <input type="checkbox" class="" name="february" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                <div class="form-group w-25">
                    <label class="check-container">March
                        <input type="checkbox" class="" name="march" value="1">
                        <span class="checkmark"></span>
                    </label>
                </div>
                
                <div class="form-group">
                    <button class="btn btn-sm btn-success" type="submit" name="add_time_table">Submit</button>
                </div>
            </form>
        </div>
    </div>
</div>