<div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h3 class="page-header">
                            Change Password
                        </h3>
                        
                    </div>
                </div>
                <!-- /.row -->

                <div class="row">
                    <div class="col-lg-6">

                        <?php $attributes = array('id' => 'form1','method'=>'post');
                        echo form_open('user/change_password', $attributes);
                        ?>
                        <div id="status_div">
                        
                        <?php if($this->session->flashdata('error')) { ?>
                        <div class="alert-info">  <?php echo $this->session->flashdata('error');?></div>
                        <?php } ?>
                        </div>

                            <div class="form-group">
                                <label>Old Password</label>
                                <input class="form-control" type="password" name="old_password" value="<?php  if(isset($old_password)){ echo $old_password;} ?>"  id="old_password" required="">
                                 <label class="error">
                                  <?php if(form_error('old_password')) { echo form_error('old_password'); } ?>
                                </label>
                            </div>

                            <div class="form-group">
                                <label>New Password</label>
                                <input class="form-control" type="password" name="password" value="<?php  if(isset($password)){ echo $password;} ?>"  id="password" required="">
                                <label class="error">
                                  <?php if(form_error('password')) { echo form_error('password'); } ?>
                                </label>
                            </div>


                            <div class="form-group">
                                <label>Confirm Password</label>
                                <input class="form-control" type="password" name="confirm_pass" value="<?php  if(isset($confirm_pass)){ echo $confirm_pass;} ?>"  id="confirm_pass" required="">
                                <label class="error">
                                  <?php if(form_error('confirm_pass')) { echo form_error('confirm_pass'); } ?>
                                </label>
                            </div>

                            
                            <button type="submit"  class="btn btn-primary">SUBMIT</button>
                           

                        </form>

                    </div>
                    
                </div>
                <!-- /.row -->

            </div>
            <!-- /.container-fluid -->

        </div>
        <!-- /#page-wrapper -->

     </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="<?php echo base_url()?>js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="<?php echo base_url()?>js/bootstrap.min.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>js/jquery.validate.js"></script>
<script language='JavaScript' type='text/JavaScript'>
    $(document).ready(function() { 
    $("#form1").validate({
            rules : {
                old_password: { 
                        required : true, minlength: 3,maxlength: 150
                  },
                password: { 
                        required: true, minlength: 3,maxlength: 150
                  }, 
                confirm_pass: { 
                        required: true, equalTo: "#password"
                  }, 
            }, 
            messages : {
                        old_password :'Please specify your Old Password',
                        password     : 'Please specify your New Password',
                        confirm_pass : 'Please specify your New Password Again',
               }
          });
    });

</script>
<style type="text/css">
.error
{
  color:rgb(238, 57, 57) !important ;
}
</style>
</body>

</html>