
    <!--start main wrapper-->
    <main class="main-wrapper">
        <div class="main-content">
            <button class="btn guestBtn d-flex gap-2 align-items-center" id="backBtn"><img
                    src="<?php echo base_url(); ?>assets/images/arowleft.svg" alt="" width="15px"> Back</button>
            <div class="row">
                <div class="col-md-8 my-2">
                    <h3 class="fmon fw-bold"><i class="fa fa-plus"></i> Add Case </h3>
                </div>

            </div>
            <div class="modal-body">
<?php
// echo "<pre>";
// print_r($units);
// echo "</pre>";
?>

                <form class="row" action="<?php echo base_url('site/addcasepost'); ?>" method="post" enctype="multipart/form-data">
                    <div class="col-md-6 my-2">


                        <select name="unit" id="unit" class="form-control FormInput form-select Formselet" required>
                            <option value="" selected>Unit/Zone</option>
                            <?php foreach($units as $k=> $unit){
                                $myid=$k;
                                if($unit['owner']!=''){
                               $myid=$k."-".$unit['owner'];
                                }else{
                                    $myid=$k."-".$unit['tenant'];
                                }
                                ?>
                            <option value="<?php echo $myid; ?>"><?php echo $unit['unit'].' ('.$unit['zone'].')'; ?></option>
                            <?php } ?>
                        </select>
                        <ul id="houseNumberList" class="list-group mt-2"></ul>
                    </div>
                    <div class="col-md-6 my-2">
                        <select name="category" id="category" class="form-select Formselet" required>
                        
                        <option value="" selected>Category</option>
                        <option value="WATER">WATER</option>
                        <option value="LAUNDRY">LAUNDRY</option>
                        <option value="ELECTRICITY">ELECTRICITY</option>
                        <option value="INTERNET">INTERNET</option>
                        <option value="ELEVATOR">ELEVATOR</option>
                        <option value="CLEANING">CLEANING</option>
                        <option value="SECURITY">SECURITY</option>
                        <option value="OTHER">OTHER</option>
                        </select>
                    </div>
                    <!-- <div class="col-md-6 my-2">
                        <input type="text" name="created_by" id="created_by" class="form-control FormInput"
                            placeholder="Created by">
                    </div> -->
                    <div class="col-md-12 my-2">
                        <input type="text" name="subject" id="subject" class="form-control FormInput"
                            placeholder="Subject">
                    </div>
                    
                    <div class="col-md-12 my-2">

                        <div class="col-md-12 my-2">
                            <textarea class="form-control FormInput" name="comment" id="comment"
                                placeholder="comment (Max 10000 characters)" maxlength="10000"></textarea>
                            <small id="noteCount" class="form-text text-muted">0/10000</small>
                        </div>

                    </div>
                            
                    <div class="col-m-12 my-2">
                        <div class="brower2 d-flex justify-content-center align-items-center" id="drop-zone">
                            <div class="d-flex flex-column align-items-center">
                                <img src="<?php echo base_url(); ?>assets/images/up2.png" alt="" width="20px">
                                <small>Drag and Drop here or
                                    <label for="file" class="text-primary" style="cursor: pointer;">
                                        Browse Files
                                    </label>
                                </small>
                                <input class="d-none" type="file" name="file" id="file">
                            </div>
                        </div>
                    </div>

                    <div class="col-md-12 my-2">
                        <div class="row d-flex justify-content-center mb-3">
                            <div class="col-md-12 my-2 d-flex justify-content-center">
                                <button type="submit" class="btn autBtn py-2 px-5">Submit</button>
                            </div>
                        </div>
                    </div>
                </form>

                <!-- button for attahmnts -->



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

    </main>
    <!--end main wrapper-->
