{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}

{% import "macro_functions.phtml" as mf %}

{% block meta_title %}{% trans 'Reset password' %}{% endblock %}

{% block content_before %}
        <!-- Page Heading/Breadcrumbs -->
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">{% trans 'Reset password' %}</h1>
				<ol class="breadcrumb">
					<li><a href="{{''|link }}">{% trans 'Home' %}</a></li>
					<li class="active">{% trans 'Reset password' %}</li>
				</ol>
            </div>
        </div>
        <!-- /.row -->
{% endblock %}
{% block content %}
            <!--<form action="" method="post" id="password-reset" class="form-inline">-->
			<form method="post" action="" class="api_form form-inline" data-api-url="guest/client/reset_password" data-api-msg="{% trans 'Password reset confirmation email was sent' %}">
				<legend>{% trans 'Enter your email to reset password. You will receive new password after reset link is confirmed.' %}</legend>
				<div class="form-group">
					<label for="exampleInputName2">{% trans 'Email Address' %}:</label>
					<input type="email" class="form-control" name="email" value="{{ request.email }}" required="required">
				</div>
                <input class="btn btn-warning" type="submit" value="{% trans 'Reset password' %}">
            </form>

{% endblock %}

{% block js %}
<script type="text/javascript">
$(function() {
    $('#password-reset').bind('submit',function(event){
        bb.post(
            'guest/client/reset_password',
            $(this).serialize(),
            function(result) {
                bb.msg('{% trans "Password reset confirmation email was sent" %}');
            }
        );
        return false;
    });
});
</script>
{% endblock %}