<script type="text/javascript">

function validate_hygiene(){
	
    if($("#hygiene_title").val()==''){
        $("#hygiene_title").addClass('error');
        $("#hygiene_title").focus();
        $("#msg_hygiene_title").html('Please enter name').show();
        return false;
    }else{
        $("#hygiene_title").removeClass('error');
        $("#msg_hygiene_title").hide();
    }
    if($("#hygiene_desc").val()==''){
        $("#hygiene_desc").addClass('error');
        $("#hygiene_desc").focus();
        $("#msg_hygiene_desc").html('Please enter desc').show();
        return false;
    }else{
        $("#hygiene_desc").removeClass('error');
        $("#msg_hygiene_desc").hide();
    }
}

</script>


<div class="breadcrumb">
    <h1>Practice Hygiene Feature</h1>
    <ul>
        <li><a href="<?php echo SITE_URL.ADMIN_DIR ?>">Dashboard</a></li>
        <li>Add New hygiene feature</li>

    </ul>
</div>


<div class="separator-breadcrumb border-top"></div>

<div class="row">
    <div class="col-md-12">
        <div class="card mb-4">
            <div class="card-body">
                <div class="card-title mb-3">Add New Hygiene Feature</div>
                <form action="" method="post" onsubmit="return validate_hygiene();" enctype="multipart/form-data">

                    <?php if(isset($hygieneDetail->hygiene_id) && $hygieneDetail->hygiene_id!=0) { ?>
                        <input type="hidden" id="hygiene_id" name="hygiene_id" value="<?php echo $hygieneDetail->hygiene_id ?>" />
                    <?php } ?>

                    <div class="row">
                        <div class="col-md-6 form-group mb-3">
                            <label for="hygiene_title">hygiene Title <span class="asterisk">*</span></label>
                            <input type="text" class="form-control" id="hygiene_title" name="hygiene_title" value="<?php echo $hygieneDetail->hygiene_title; ?>" placeholder="Enter hygiene name">
                            <div class="invalid-tooltip" id="msg_hygiene_title"></div>
                        </div>
                        <div class="col-md-6 form-group mb-3">
                            <label for="hygiene_desc">hygiene Description <span class="asterisk">*</span></label>
                            <input type="text" class="form-control" id="hygiene_desc" name="hygiene_desc" value="<?php echo $hygieneDetail->hygiene_desc; ?>" placeholder="Enter hygiene name">
                            <div class="invalid-tooltip" id="msg_hygiene_desc"></div>
                        </div>
		
                        <div class="col-md-12 form-group mb-3">
                            <label class="control-label">Status</label>
                            <div class="controls">
                              <label class="switch switch-primary mr-3">
                                <input type="checkbox" id="hygiene_status" name="hygiene_status" <?php echo ($hygieneDetail->hygiene_status=='1') ? "checked='checked'" : "" ?>>
                                <span class="slider"></span>
                             </label>
                            </div>
    	                  </div>

                        <div class="col-md-12">
                            <button class="btn btn-primary" id="submit" name="submit">Submit</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>