<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote.min.js"></script>
<div class="row align-items-center">
    <div class="col-sm-6">
        <div class="page-title-box">
          <!--   <h4 class="font-size-18">Pages</h4> -->

        </div>
    </div>

    <div class="col-sm-6">
        <div class="float-right d-none d-md-block">

            <!-- <a class="btn btn-primary waves-effect waves-light" href="<?php echo base_url(); ?>Pages/get_pages">
                <i class="mdi mdi-plus mr-2"></i> 
            </a> -->
        </div>
    </div>
</div>
<br>
<?php
if (validation_errors()) {
?>
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">×</span>
        </button>
        <?php echo validation_errors(); ?>
    </div>
<?php
}
?>
<?php if ($this->session->flashdata('check_email_alert_danger')) { ?>
    <div class="alert alert-danger alert-dismissible fade show" role="alert">
        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
            <span aria-hidden="true">×</span>
        </button>
        <strong>Success!</strong> <?php echo $this->session->flashdata('check_email_alert_danger'); ?>
    </div>
<?php } ?>
<div class="row">
    <div class="col-lg-12">
        <div class="card">
            <div class="card-body">
                <h4 class="card-title">Faculty edit</h4><bR>
                <form action="<?php echo base_url(); ?>ApplicationController/update/<?php echo $records['id']; ?>" method="post" enctype="multipart/form-data">
                    <div class="row">
                        <div class="form-group col-md-4">
                            <label class="">Name</label>
                            <input type="text" class="form-control" name="facultyname" value="<?php echo $records['f_name']; ?>">
                        </div>

                        <div class="form-group col-md-4">
                            <label class="">Mobile</label>
                            <input name="mobile" id="mobile" type="number" class="form-control" placeholder="Mobile_number" value="<?php echo $records['f_mobile']; ?>" required>
                            <?php if ($this->session->flashdata('mobile')) : ?>
                                <span style="color: red;"><?= $this->session->flashdata('mobile') ?></span>
                                <?php unset($_SESSION['mobile']); ?>
                            <?php endif;  ?>
                        </div>
                        <div class="form-group col-md-4">
                            <label>Email</label>
                            <input name="email" id="email" type="email" class="form-control" placeholder="Email" value="<?php echo $records['f_email']; ?>" >
                            <?php if (form_error('email')) { ?>
                                <div id="summernote" class="alert alert-danger alert-dismissible fade show" role="alert">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                        <span aria-hidden="true">×</span>
                                    </button>
                                    <?php echo form_error('email'); ?>
                                </div>
                            <?php } ?>
                        </div>
                        <div class="form-group col-md-4">
                            <label>Password</label>
                            <input name="Password" id="Password" type="psw" class="form-control" placeholder="Password" value="<?php echo (isset($_POST[''])) ? $_POST[''] : ''; ?>" >
                            <?php if (form_error('Password')) { ?>
                                <div id="summernote" class="alert alert-danger alert-dismissible fade show" role="alert">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                        <span aria-hidden="true">×</span>
                                    </button>
                                    <?php echo form_error('Password'); ?>
                                </div>
                            <?php } ?>
                        </div>
                        <div class="form-group col-md-4">
                            <label>Confirm Password</label>
                            <input name="confirm_password" id="confirm_password" type="psw" class="form-control" placeholder="confirm_password" value="<?php echo (isset($_POST[''])) ? $_POST[''] : ''; ?>" >
                            <?php if (form_error('confirm_password')) { ?>
                                <div id="summernote" class="alert alert-danger alert-dismissible fade show" role="alert">
                                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                                        <span aria-hidden="true">×</span>
                                    </button>
                                    <?php echo form_error('confirm_password'); ?>
                                </div>
                            <?php } ?>
                        </div>

                        <div class="form-group mt-3 col-md-4">
                            <div>
                                <button name="submit" type="submit" class="btn btn-primary waves-effect waves-light mr-1">
                                    Submit
                                </button>
                                <a href="<?php echo base_url('ApplicationController/faculty'); ?>" class="btn btn-secondary waves-effect">Cancel </a>
                            </div>
                        </div>
                    </div>
                    
                </form>

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

<body>
    <script>
        $(document).ready(function() {
            $('#summernote').summernote();
        });
    </script>
</body>
<style type="text/css">
    .required:after {
        content: " *" !important;
        color: red !important;
    }
</style>