{if $errorMessage}
    {include file="$template/includes/alert.tpl" type="error" msg=$errorMessage textcenter=true}
{/if}

<form method="post" action="{$WEB_ROOT}/pwreset.php" role="form">
    <input type="hidden" name="action" value="reset" />

    <div class="form-group">
        <label for="inputEmail">{lang key='loginemail'}</label>
        <div class="input-group input-group-merge auth-input-group">
            <div class="input-group-prepend">
              <span class="input-group-text"><i class="fas fa-envelope"></i></span>
            </div>
            <input type="email" class="form-control" name="email" id="inputEmail" placeholder="{lang key='loginemail'}" autofocus>
        </div>
    </div>

    {if $captcha->isEnabled()}
        <div class="text-center margin-bottom">
            {include file="$template/includes/captcha.tpl"}
        </div>
    {/if}

    <div class="form-group">
        <button type="submit" class="btn btn-primary auth-submit-btn{$captcha->getButtonClass($captchaForm)}">
            <i class="fas fa-paper-plane"></i>
            {lang key='pwresetsubmit'}
        </button>
    </div>

    <div class="auth-inline-divider"><span>/</span></div>

    <div class="form-group mb-0">
        <a href="{routePath('login-index')}" class="btn btn-default auth-submit-btn">
            <i class="fas fa-arrow-left"></i>
            {lang key='loginbutton'}
        </a>
    </div>

    <div class="auth-security-note">
        <span class="auth-security-note__icon"><i class="fas fa-shield-alt"></i></span>
        <div>
            <h4>{lang key='pwreset'}</h4>
            <p>{lang key='pwresetcheckemail'}</p>
        </div>
    </div>

</form>
