<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(); ?>Management/view_staff">All Staff</a>
                </li>
                <li class="breadcrumb-item">
                    Add New Staff
                </li>
            </ul>
    
            
            <form  method="post" enctype="multipart/form-data" class="form-outer">
                <div class="add-teacher">
                    <h1 class="main-heading">Add New Staff</h1><hr>
                    <?php if($success){ ?>
                    <p class="alert alert-success"> <?php echo $success; ?></p>
                    <?php } ?>
                    <?php if($error){ ?>
                    <p class="alert alert-danger"> <?php echo $error; ?></p>
                    <?php } ?>
                    <div class="fgw-25">
                        <label>Salutation</label>
                        <!--<input type="text" name="salutation" class="input-field-1">-->
                        <select class="input-field-1" name="salutation" required>
                            <option value="Mr">Mr</option>
                            <option value="Miss">Miss</option>
                            <option value="Mrs">Mrs</option>
                        </select>
                    </div>
                    
                    <div class="fgw-25">
                        <label>Name</label>    
                        <input type="text" class="input-field-1" name="teacher_name" placeholder="Teacher Name" required>
                    </div>
                    <div class="fgw-25">
                        <label>Designation</label>
                        <input type="text" name="designation" class="input-field-1" placeholder="Designation" required>
                    </div>
                    <div class="fgw-25">
                        <label>Gender</label>
                        <select class="input-field-1" name="gender">
                            <option value="Male">Male</option>
                            <option value="Female">Female</option>
                        </select>
                    </div>
                    
                    <div class="fgw-25">
                        <label>D.O.B.</label>
                        <input type="date" name="dob" class="input-field-1">
                     </div>
                    
                    <div class="fgw-25">
                        <label>Mobile Number:</label>    
                        <input type="number" class="input-field-1" name="mobile_number" placeholder="Mobile Number" required min="1000000000">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Alt Mobile Number</label>
                        <input type="number" name="alt_mobile_number" class="input-field-1" placeholder="Alternate Mobile No">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Email</label>
                        <input type="email" name="email" class="input-field-1" placeholder="Email">
                    </div>
                    
                    
                    <div class="fgw-50">
                        <label>Address</label>
                        <input type="text" name="address" class="input-field-1" placeholder="Current Address">
                    </div>
                    <div class="fgw-50">
                        <label>Permanent Address</label>
                        <input type="text" name="permanent_address" class="input-field-1" placeholder="Permanent Address">
                    </div>
                    
                    <div class="fgw-50">
                        <label>Profile Picture</label>
                        <input type="file" name="user_profile_picture" class="input-field-1">
                    </div>
                    <div class="fgw-50">
                        <label>Signature</label>
                        <input type="file" name="signature" class="input-field-1">
                    </div>
                    
                    <div class="fgw-50">
                        <label>Staff Category</label>
                        <select class="input-field-1" name="staff_category" required>
                            <option value="">-- Staff Category --</option>
                            <option value="teaching-staff">Teaching Staff</option>
                            <option value="non-teaching-staff">Non Teaching Staff</option>
                        </select>
                    </div>
                    
                    <div class="fgw-50">
                        <label>Status</label>
                        <select class="input-field-1" name="status" required>
                            <option value="">-- Select Status --</option>
                            <option value="1">Active</option>
                            <option value="0">Inactive</option>
                        </select>
                    </div>
                    
                    <div class="fgw-100">
                        <hr>
                        <h3 class="main-heading">Permissions</h3>
                    </div>
                    
                   
                    
                    <div class="fgw-25">
                        <label>Accounts </label>
                        <input type="checkbox" class="checkbox" name="accounts" value="1">
                    </div>
                     <div class="fgw-25">
                        <label>Attendance(Student)</label>
                        <input type="checkbox" class="checkbox" name="student_attendance" value="1">
                    </div>
                    
                     <div class="fgw-25">
                        <label>Attendance(Staff) </label>
                        <input type="checkbox" class="checkbox" name="staff_attendance" value="1">
                    </div>
                    
                     <div class="fgw-25">
                        <label>Add Edit Courses </label>
                        <input type="checkbox" class="checkbox" name="courses" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Enquiry</label>
                        <input type="checkbox" class="checkbox" name="enquiry" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Admission </label>
                        <input type="checkbox" class="checkbox" name="admission" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Add/Edit Fee Structure </label>
                        <input type="checkbox" class="checkbox" name="fee_structure" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Exam </label>
                        <input type="checkbox" class="checkbox" name="exam" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Fee </label>
                        <input type="checkbox" class="checkbox" name="fee" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Documents </label>
                        <input type="checkbox" class="checkbox" name="documents" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Add/Edit Staff </label>
                        <input type="checkbox" class="checkbox" name="staff" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Transport </label>
                        <input type="checkbox" class="checkbox" name="transport" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Edit / View Students</label>
                        <input type="checkbox" class="checkbox" name="students" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Fee Defaulter</label>
                        <input type="checkbox" class="checkbox" name="fee_defaulter" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Delete Fee Invoice</label>
                        <input type="checkbox" class="checkbox" name="delete_fee_invoice" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Delete Student</label>
                        <input type="checkbox" class="checkbox" name="delete_student" value="1">
                    </div>
                    
                    
                    <div class="fgw-25">
                        <label>Acedemic Session</label>
                        <input type="checkbox" class="checkbox" name="acedemic_session_permission" value="1" <?php if($acedemic_session_permission == 1){ echo "checked"; } ?>>
                    </div>
                    
                    <div class="fgw-25">
                        <label>Circular</label>
                        <input type="checkbox" class="checkbox" name="circular" value="1" <?php if($circular == 1){ echo "checked"; } ?>>
                    </div>
                    
                    <div class="fgw-25">
                        <label>Admin</label>
                        <input type="checkbox" class="checkbox" name="admin" value="1" <?php if($admin == 1){ echo "checked"; } ?>>
                    </div>
                    
                    <div class="fgw-25">
                        <label>Time Table</label>
                        <input type="checkbox" class="checkbox" name="time_table" value="1" <?php if($time_table == 1){ echo "checked"; } ?>>
                    </div>
                    
                    <div class="fgw-25">
                        <label>Edit Fee</label>
                        <input type="checkbox" class="checkbox" name="edit_fee" value="1">
                    </div>
                    
                    <div class="fgw-25">
                        <label>Back Date Fee</label>
                        <input type="checkbox" class="checkbox" name="back_date_fee" value="1">
                    </div>
                    <div class="fgw-25">
                        <label>Check All</label>
                        <input type="checkbox" name="check_all" id="select_all">
                    </div>
                    <div class="form-group fgw-100">
                        <!--<input type="submit" class="btn btn-sm btn-success" name="add_teacher" placeholder="" value="Submit">-->
                        <button class="btn btn-sm btn-success" name="add_teacher">Submit</button>
                    </div>


                </div>

            </form>
        </div>
    </div>
</div>


<script>
    $(document).ready(function(){
        // alert();        
        $('#select_all').on('click',function(){
            if(this.checked){
                $('.checkbox').each(function(){
                    this.checked = true;
                });
            }else{
                $('.checkbox').each(function(){
                    this.checked = false;
                });
            }
        });
    });
</script>