<?php
/*
Template Name: Customer Reset Your Password
*/
 get_header();
 $v_code=$_REQUEST["code"];
 $msg=$_REQUEST["msg"];
 ?>
<!--.contentPart-->   
      <div id="primary" class="content-area">
		<main id="main" class="site-main">
		  <div class="PageTitleSection">
			  <div class="container">
			  <h2>Reset Your Password</h2>
			 </div>
			 </div>
			  <section id="contentPage">  
			<div class="ContactFormSection">
			<div class="container">
			
			<div class="FormMainContentWrap FormMainContent">
			<h2 class="TitleTxt">Reset Your Password</h2>
			<div class="inquiryForm signin_form">
			<form id="signin_form" class="signin_form" action="/proccessform.php?actions=resetyourpasswordcustomer" name="logincustomer" onsubmit="return CheckRecord();" method="post">
			<input id="v_code" name="v_code" type="hidden" value="<?=$v_code?>" />
			<div class="row">
			<div class="col-sm-12 form-group">
			<label for="email">New Password</label>
			<input class="form-control" id="password1" name="password1" type="password" />
			</div>
			<div class="col-sm-12 form-group">
			<label for="email">Retype Password</label>
			<input  class="form-control" id="password2" name="password2" type="password" />
			</div>
			</div>
			<div class="FormButtonSection mrgB15">
			<input type="submit" value="Submit" class="button" />
			<span class="forgotLink"> <a href="/sign-in/">Sign In?</a><br /><? if($msg==1){?><font color="#FF0000" size="+1">Your password has been changed successfully!</font><br /><? }elseif($msg==2){?><font color="#FF0000" size="+1">Your reset password link is expired please try new link!</font><br /><? }?></span>
			</div>
			</form>
			</div>			
			<? require("needhelp.php");?>
		</div>
	  </div>
	 </div> 			 
	</section>			  
  </main><!-- .site-main -->
 </div>
</section> 
<!--/.contentPart--> 
<script language="JavaScript">
	function CheckRecord()
	{	
		var IsValid = true;
		var password1 = $('#password1').val();
		if(password1 == ''){
			$('#password1').css("border", "2px solid #FF0000");
			IsValid = false;
		}
		else{
			$('#password1').css("border", "1px solid #a1a1a1");
		}
		var password2 = $('#password2').val();
		if(password2 == ''){
			$('#password2').css("border", "2px solid #FF0000");
			IsValid = false;
		}
		else{
			$('#password2').css("border", "1px solid #a1a1a1");
		}
		if(password1 != password2){
			alert('Password not match!');
			$('#password1').val('');
			$('#password2').val('');
			IsValid = false;
		}
		return IsValid;	
	}
</script>
 <?php get_footer();?>