<main id="js-page-content" role="main" class="page-content">
    <ol class="breadcrumb page-breadcrumb">
        <li class="breadcrumb-item"><a href="javascript:void(0);">Dashboard</a></li>
        <li class="breadcrumb-item active">Hotel Facility Form</li>
        <li class="position-absolute pos-top pos-right d-none d-sm-block"><span class="js-get-date"></span></li>
    </ol>
 <div id="panel-2" class="panel">
    <div class="panel-hdr">
        <h2>
            Hotel Facility <span class="fw-300"></span>
        </h2>
    </div>
    <div class="panel-container show">
        <div class="panel-content p-0">
            <form class="needs-validation"  action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" novalidate >
                <div class="panel-content">
                    <div class="form-row">
                        <div class="col-md-12 mb-3">
                                <div class="form-group" hidden="">
                                    <label for="int">FiMenuId <?php echo form_error('fiMenuId') ?></label>
                                    <input type="text" class="form-control" name="fiMenuId" id="fiMenuId" placeholder="FiMenuId" value="<?php echo $fiMenuId; ?>" />
                                </div>
                           <!--  <label class="form-label" for="customControlValidation5">Menu select</label>
                            <select class="custom-select" id="customControlValidation5" name="fiMenuId" required>
                                <option value="<?php echo $fiMenuId; ?>">Select Menu</option>    
                                <?php

                                   if(count($menuLists) > 0){
                                      foreach($menuLists as $menulistvalue){
                                ?>
                                <option value="<?php echo $menulistvalue['id'] ?>" <?php echo $menulistvalue['id']==$fiMenuId?'selected':''; ?>>  <?php echo $menulistvalue['fsTitle'] ?></option>
                                <?php

                                  }
                                }
                                ?> 
                            </select>
                         
                            <div class="valid-feedback">
                                Looks good! -->
                            
                        </div>
                        <div class="col-md-12 mb-3">
                            <label class="form-label" for="validationCustom01"> Hotel Facility Name<span class="text-danger">*</span> </label>
                            <input type="text" class="form-control" id="validationCustom01" name="fsTitle" id="fsTitle" placeholder=" Hotel Facility name" value="<?php echo $fsTitle; ?>" required>
                            <div class="valid-feedback">
                                Looks good!
                            </div>
                        </div>
                        <div class="col-md-12 mb-3">
                            <label class="form-label" for="validationCustom01"> Hotel Facility Image (250x250)<span class="text-danger">*</span> </label>
                           <?php if($fsImage!=""): ?>
                               
                               <img style="background: #CCC; padding: 5px; max-width: auto;  margin-bottom:  10px; margin-left: 10px;  object-fit: cover; object-position: center; height: 60px;" class="alignment_speech" target="_blank" src="<?php echo base_url().$fsImage; ?>"></img>
                            <?php endif; ?>
                            <input style="padding-top: 5px;" accept=".jpeg,.png,.jpg" cols="12" rows="5" type="file" class="form-control form-control-file" name="fsImage" id="fsImage" placeholder="Description" value="<?php echo $fsImage; ?>" ></input>
                        </div>
                    </div>
                    
                </div>
                <div class="panel-content border-faded border-left-0 border-right-0 border-bottom-0 d-flex flex-row align-items-center">
                    <input type="hidden" name="id" value="<?php echo $id; ?>" /> 
                    <button class="btn btn-primary ml-auto" value="Upload Image" type="submit">Submit</button>
                    <a style="margin-left: 5px;" href="<?php echo site_url('category/index/'.$fiMenuId.'') ?>" class="btn btn-danger">Cancel</a>
                </div>
            </form>
            <script>
                // Example starter JavaScript for disabling form submissions if there are invalid fields
                (function()
                {
                    'use strict';
                    window.addEventListener('load', function()
                    {
                        // Fetch all the forms we want to apply custom Bootstrap validation styles to
                        var forms = document.getElementsByClassName('needs-validation');
                        // Loop over them and prevent submission
                        var validation = Array.prototype.filter.call(forms, function(form)
                        {
                            form.addEventListener('submit', function(event)
                            {
                                if (form.checkValidity() === false)
                                {
                                    event.preventDefault();
                                    event.stopPropagation();
                                }
                                form.classList.add('was-validated');
                            }, false);
                        });
                    }, false);
                })();

            </script>
        </div>
    </div>
</div>
</main>