## -*- coding: utf-8 -*-
<%inherit file="base/root.html"/>

<%block name="title">
    ${_('Password Reset')}
</%block>

<%block name="js_extra">
    %if c.captcha_active:
        <script src="https://www.google.com/recaptcha/api.js"></script>
    %endif
</%block>

<%include file="/base/flash_msg.html"/>
<div class="container">
<div class="row">
<div class="centered-column">
<div id="register" class="panel panel-primary">
    <div class="panel-heading">
        %if c.site_name:
            <h5>${_('Reset Your Password to %s') % c.site_name}</h5>
        %else:
            <h5>${_('Reset Your Password')}</h5>
        %endif
    </div>
    <div class="panel-body">
        ${h.form(url('password_reset'))}
        <div class="form">
                <div class="form-group">
                    <label class="control-label" for="email">${_('Email Address')}:</label>
                    <div>
                        ${h.text('email', class_='form-control')}
                    </div>
                </div>

                %if c.captcha_active:
                <div class="form-group">
                    <label class="control-label" for="recaptcha_field">${_('Captcha')}:</label>
                    <div>
                        <div id="recaptcha_field" class="g-recaptcha" data-sitekey="${c.captcha_public_key}"></div>
                    </div>
                </div>
                %endif

                <div class="form-group">
                    <div class="buttons">
                        ${h.submit('send',_('Send Password Reset Email'),class_="btn btn-default")}
                    </div>
                </div>

                <div class="alert alert-info">
                    ${_('A password reset link will be sent to the specified email address if it is registered in the system.')}
                </div>
        </div>
        ${h.end_form()}
        <script>
         'use strict';
         $(document).ready(function(){
            $('#email').focus();
         });
        </script>
    </div>
</div>
</div>
</div>
</div>
