<?php		defined('BASEPATH') OR exit('No direct script access allowed');	$this->load->view("admin_includes/head"); ?>	   

<body class="fix-menu">
    <!-- Pre-loader start -->
    <div class="theme-loader">
    <div class="ball-scale">
        <div class='contain'>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
            <div class="ring"><div class="frame"></div></div>
        </div>
    </div>
</div>
    <!-- Pre-loader end -->
    <section class="login-block">
        <!-- Container-fluid starts -->
        <div class="container-fluid">
            <div class="row ">
                <div class="col-sm-12 login_panel bounceInLeft animated">
                    <!-- Authentication card start -->
                    
													<form name="rest_passwordform" id="rest_passwordform" action="<?php echo base_url(); ?>index.php/Login/do_reset_password" method="post"  class="bv-form">
													
													 <div class="text-center">
                            <!-- <img src="<?php echo base_url(); ?>\files\assets\images\logo.png" alt="logo.png"> -->
                        <h3>Set Password</h3>
                        </div>
                        <div class="auth-box card">
                            <div class="card-block">
														<button class="btn btn-primary btn-md btn-block waves-effect text-center m-b-20" type="submit" class="bv-hidden-submit" style="display: none; width: 0px; height: 0px;"></button>		
														 				
														<input type="hidden" name="check_id" placeholder="New Password" value="<?php echo  $check_id; ?>"/>
														
														<input type="hidden" name="check_flag" placeholder="New Password" value="<?php echo  $check_flag; ?>"/>
														
														<input type="hidden" name="clinic_id" placeholder="New Password" value="<?php //echo  $clinic; ?>"/>						
													 	<input type="hidden" name="curr_url" placeholder="New Password" value="<?php echo base_url(); ?>"/>						
													 <div class="form-group form-primary">	
													 <label for="bio">Username: *	</label>				
																<input type="text" id="clinic_username" class="form-control" required name="clinic_username">					
															 	 						
															</div>	 		
														 <div class="form-group form-primary">				
																<label for="bio">Password: *	</label>
																<input name="rest_new_password" id="rest_new_password"  class="form-control"  placeholder="New Password" type="password" required="" data-bv-field="rest_new_password">											
															</div> 	
														 <div class="form-group form-primary">											
																<label for="bio">Confirm Password: *	</label>	
																<input name="rest_confirm_password"  class="form-control"  id="rest_confirm_password" placeholder="Confirm Password" type="password" required="" data-bv-field="rest_confirm_password">								
															</div>		 							
														<div class="sign-up form-group">			
															<input type="submit" name="reset_pwd_btn" id="reset_pwd_btn" value="Submit" class="btn btn-primary btn-md btn-block waves-effect text-center m-b-20" ><a href="<?php echo base_url(); ?>" id="back_tologin" class="btn btn-info pull-right" name="back_tologin" style="margin: 2em 0 0;"> Back to login</a>	
														</div>									
													</form>			
												</div>		
											</div> 	
										</div>
									</div>
								</div>	
							</div>	
						</div>
					</div>
				</div>
			</div>
		</div>       
	</div>
	
	<?php $this->load->view("admin_includes/footer"); ?>
</div>
<script>  
	
	$(function() {    
		$("#rest_passwordform").validate({      		
			
			rules: {        
				
				rest_new_password: {   	
					required: true      
				},              
				rest_confirm_password: {     
					required: true,			
					equalTo: "#rest_new_password" 
				}         		
			},     		
			
			messages: {  
				rest_new_password: {
					required: "Enter a Password "     
				}, 							
				rest_confirm_password: {		
					required: "Enter a Password"   
				}         		
			}, 
			
			errorElement: 'div', 
			errorPlacement: function(error, element) {  
				var placement = $(element).data('error'); 
				if (placement) {              
					$(placement).append(error) 		
					} else {             		
					error.insertAfter(element); 
				}        
			},      		
			
			invalidHandler: function(e, validator) {	
				var errors = validator.numberOfInvalids();
				if (errors) {               
					$('.error-alert-bar').show();  	
				}         			
			}     
		});	
	}); 
</script>			