<?php 
	$header_file=APPPATH.'views/include/header.php';
	require($header_file);
	$sidenav_file=APPPATH.'views/include/sidenav.php';
	require($sidenav_file);	?>
   
    <!-- BEGIN: Content-->
    <div class="app-content content">
      <div class="content-overlay"></div>
      <div class="content-wrapper">
        <div class="content-header row">
          <div class="content-header-left col-md-12 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-inline-block">Change Password </h3>
            <div class="row breadcrumbs-top d-inline-block">
              <div class="breadcrumb-wrapper col-12">
                <ol class="breadcrumb">
                  <li class="breadcrumb-item"><a href="#">Home</a>
                  </li>
                  <li class="breadcrumb-item"><a href="#">Change Password</a>
                  </li>
                  <li class="breadcrumb-item active">Change Password
                  </li>
                </ol>
              </div>
            </div>
          </div>
          
        </div>
        <div class="content-body"><!-- Basic form layout section start -->
<section id="basic-form-layouts">

	<div class="row justify-content-md-center">
		<div class="col-md-12">
			<div class="card">
				<div class="card-header">
					<h4 class="card-title" id="basic-layout-form-center">Change Password</h4>
					<a class="heading-elements-toggle"><i class="la la-ellipsis-v font-medium-3"></i></a>
					<div class="heading-elements">
						<ul class="list-inline mb-0">
							<li><a data-action="collapse"><i class="ft-minus"></i></a></li>
							<li><a data-action="reload"><i class="ft-rotate-cw"></i></a></li>
							<li><a data-action="expand"><i class="ft-maximize"></i></a></li>
							<li><a data-action="close"><i class="ft-x"></i></a></li>
						</ul>
					</div>
				</div>
				<div class="card-content collapse show">
					<div class="card-body">

						<form class="form" autocomplete="off" action="<?php echo site_url('Master/changePwd');?>" method="post">
							<div class="row justify-content-md-center">
							    
    								<div class="col-md-6">
    									<div class="form-body">
    										<div class="form-group">
    											<input type="text" name="uname"  id="uname" class="form-control" value="<?php echo $_SESSION['username']; ?>" readonly />
    											
    										</div>
    									</div>
    								</div>
    						</div>
    						 <div class="row justify-content-md-center">   
    							
        							<div class="col-md-6">
        								<div class="form-group">
        									<label>Enter New Password</label>
        									<input type="password" name="new_pass"  id="new_pass" class="form-control" required />
        									<input type="hidden" name="user_id"  id="user_id" class="form-control" value="<?php echo $_SESSION['user_id']; ?>" readonly />
        								</div>
        							</div>
        					 </div>
    						  <div class="row justify-content-md-center">  	
        							<div class="col-md-6">
        								<div class="form-group">
        									<label>Confirm Password</label>
        									<input type="password" name="conf_pass"  id="conf_pass" class="form-control" required />
        								</div>
        							
        								<div class="form-group" style="">
        									<span id='status'></span>
        								</div>
        							</div>
        							
        						</div>
        						

							<div class="form-actions text-right">
								<button type="reset" class="btn btn-warning mr-1">
									<i class="ft-x"></i> Reset
								</button>
								<button type="submit" id="submit" class="btn btn-primary">
									<i class="la la-check-square-o"></i> Save
								</button>
							</div>
						</form>	

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

</section>
<!-- // Basic form layout section end -->
        </div>
      </div>
    </div>
    <?php //require('include/theme_customizer.php');?>

   <?php 
  $footer_file=APPPATH.'views/include/footer.php';
	require($footer_file);
	?>
<script>
	$(document).ready(function(){
		$("#conf_pass").on('keyup', function () { 
			var new_pwd = $('#new_pass').val();
			var conf_pwd = $('#conf_pass').val();
			//alert(new_pwd);
			if(new_pwd == conf_pwd) {
				$('#status').html('<i class="material-icons" style="color:green;">Done</i>').css('color', 'green');
				$("#status").css({color:'#7cb342'});
				$("#submit").removeAttr('disabled', '');
			}
			else {
				$('#status').html('<i class="material-icons" style="color:red;">Does Not Match</i>').css('color', 'red');
				$("#status").css({color:'#ff0000'});
				$("#submit").attr('disabled', 'disabled');
			}
		});
	});
</script>  

  </body>
  <!-- END: Body-->

<!-- Mirrored from pixinvent.com/modern-admin-clean-bootstrap-4-dashboard-html-template/html/ltr/vertical-modern-menu-template/form-layout-basic.html by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Apr 2020 09:38:02 GMT -->
</html>