<script type="text/javascript">

function validate_password(){
	
		if($("#user_password").val()==''){
		    $("#user_password").addClass('error');
		    $("#user_password").focus();
		    $("#msg_user_password").html('Please enter password').show();
			return false;
			
		}else if($("#user_password").val()!='' && $("#user_password").val()!=$("#user_repassword").val()){
		    $("#user_password").removeClass('error');
		    $("#user_repassword").addClass('error');
		    $("#user_repassword").focus();
		    $("#msg_user_repassword").html('Password and confirm password does not matched').show();
			return false;
		}else{
			$("#user_password").removeClass('error');
			$("#user_repassword").removeClass('error');
		    $("#msg_admin_password").hide();
		    $("#msg_user_repassword").hide();
	   }
	
}

</script>


<div class="breadcrumb">
    <h1>Change Password</h1>
    <ul>
        <li><a href="<?php echo SITE_URL.ADMIN_DIR ?>">Dashboard</a></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">Change Password</div>
                <form action="" method="post" onsubmit="return validate_password();" enctype="multipart/form-data">
                	<input type="hidden" id="user_id" name="user_id" value="<?php echo $_REQUEST['user_id'] ?>" />
                	<input type="hidden" id="user_type" name="user_type" value="<?php echo $_REQUEST['user_type'] ?>" />

					<div class="row">
					<div class="col-md-6 form-group mb-3">
                        <label for="user_password">Password <span class="asterisk">*</span></label>
                        <input type="password" class="form-control" id="user_password" name="user_password" placeholder="Enter your password">
                        <div class="invalid-tooltip" id="msg_user_password"></div>
                    </div>

                   <div class="col-md-6 form-group mb-3">
                        <label for="user_repassword">Confirm Password <span class="asterisk">*</span></label>
                        <input type="password" class="form-control" id="user_repassword" name="user_repassword" placeholder="Enter your password again">
                        <div class="invalid-tooltip" id="msg_user_repassword"></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>