<div class="ma_page_content">
	<!-- Forgot Box -->
	<div class="reset_page">
		<div class="reset-page">
			<div class="reset-form">
				<h4>{{LANG Forgot your password?}}</h4>
				<p>{{LANG Enter your email to get password reset link.}}</p>
				<form action="" method="POST" id="forgot-form">
					<div class="alert alert-danger alert-empty" id="output-forgot-errors"></div>
					<div class="form-group mat_input">
						<input type="email" class="form-control" placeholder="{{LANG Email address}}" required autofocus name="email">
					</div>
					<button type="submit" class="btn btn-block btn-primary btn-mat" id="btn-forgot-submit">{{LANG Send Link}}</button>
				</form>
			</div>    
		</div>
	</div>
	<!-- End Forgot Box -->
	
	<!-- Footer -->
	<?php echo loadPage('home/footer'); ?>
	<!-- End Footer -->
</div>
<script>
$(document).ready(function() { 
    var options = { 
    	url: "{{CONFIG ajax_url}}/auth/forgot-password?hash_id=" + getHashID(),
        beforeSubmit:  function () {
        	$('#output-forgot-errors').removeClass("alert-success").addClass('alert-danger');
        	$('#output-forgot-errors').empty();
        	$("#btn-forgot-submit").text("{{LANG Please wait..}}");
        }, 
        success: function (data) {
        	$("#btn-forgot-submit").text("{{LANG Send Link}}");
        	if (data.status == 200) {
        		$('#output-forgot-errors').removeClass("alert-danger").addClass('alert-success');
        		$('#output-forgot-errors').html(data.message);
        	} else if (data.status == 400) {
        		var errros = data.errors.join("<br>");
        		$('#output-forgot-errors').html(errros);
        	}
        }
    }; 

    $('#forgot-form').ajaxForm(options); 
}); 
</script>