
 <!-- //////////////////////////////////////////////////////////////////// -->
<!-- setting content -->
<div class="container-fluid py-2 px-0">
        <h5 class="px-2 mb-3">Change Password </h5>
    <?=$this->session->flashdata('message_name');?>


        <h6 class="py-2"></h6>
        <div class="row">
          
  <div class="col-md-5 mx-auto mt-2 bg-white py-2 rounded-3 " id="w-sum">
      <h4 class ="text-center">Change Your Password</h4>
    <form method="post" action="<?php echo base_url();?>Admin/change_password" class="form-material row">
          <div class="form-group">
              <label class="form-label" for="old">Enter Old Password</label>

              <input class="form-control form-control-sm" readonly="" type="text" value="<?=$admin_data['password']?>" placeholder="Enter Old Password">
              <input type="hidden" value="<?php echo  $this->session->userdata('admin_login_id')?>" name="admin_id" placeholder="Enter Old Password">
          </div>
          <div class="form-group mt-2">
              <label class="form-label" for="new">Enter New Password</label>
             <input type="password" class="form-control form-control-sm"  placeholder="" name="password" id="password">
              <div><span id="passwordCHECK" ></span></div>
          </div>
           <div class="form-group mt-2">
              <label class="form-label" for="con">Enter Confirm Password</label>
               <input type="password" class="form-control form-control-sm"  placeholder="" id="password2">
          </div>
          <div class="text-center py-2">
              <button type="submit" class="btn btn-primary btn-sm" id="validate">Change Password</button>
          </div>
      </form>
  </div>

</div>
</div>
</div>
<script>
   $(document).ready(function(){  
      $('#validate').on("click", function() {
        var pass1 = document.getElementById("password").value;
        var pass2 = document.getElementById("password2").value;
       
   if(pass1==""){
        $('#passwordCHECK').html('Enter Password').css('color','red');
         $('#emailischeck').focus();
          return false;
   }
    if (pass1 != pass2)
    {
          $('#passwordCHECK').html('Passwords Do Not Match').css('color','red');
          $('#emailischeck').focus();
          return false;
    }

    
  });  
      $('#validates').on("click", function() {
        var pass1 = document.getElementById("passwords").value;
        var pass2 = document.getElementById("passwords2").value;
       
   if(pass1==""){
        $('#passwordsCHECK').html('Enter Password').css('color','red');
        
          return false;
   }
    if (pass1 != pass2)
    {
          $('#passwordsCHECK').html('Passwords Do Not Match').css('color','red');
         
          return false;
    }

    
  });  

 }); 
    </script>