<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?><?
ShowMessage($arParams["~AUTH_RESULT"]);
?>
<div class="user_forms">
    <form name="bform" method="post" target="_top" action="<?= $arResult["AUTH_URL"] ?>">
        <?
        if ($arResult["BACKURL"] <> '') {
            ?>
            <input type="hidden" name="backurl" value="<?= $arResult["BACKURL"] ?>"/>
            <?
        }
        ?>
        <input type="hidden" name="AUTH_FORM" value="Y">
        <input type="hidden" name="TYPE" value="SEND_PWD">
        <div class="user_forms_mess">
            <strong><? echo GetMessage("sys_forgot_pass_note_email") ?></strong>
        </div>
        <div class="user_forms_item">
            <input type="text" name="USER_LOGIN" value="<?= $arResult["USER_LOGIN"] ?>" autocomplete="off" placeholder="E-mail"/>
            <input type="hidden" name="USER_EMAIL"/>
        </div>
        <? if ($arResult["PHONE_REGISTRATION"]): ?>
            <div style="margin-top: 16px">
                <div><b><?= GetMessage("sys_forgot_pass_phone") ?></b></div>
                <div><input type="text" name="USER_PHONE_NUMBER" value="<?= $arResult["USER_PHONE_NUMBER"] ?>"/></div>
                <div><? echo GetMessage("sys_forgot_pass_note_phone") ?></div>
            </div>
        <? endif; ?>
        <? if ($arResult["USE_CAPTCHA"]): ?>
            <div class="user_forms_capch">
                <input type="hidden" name="captcha_sid" value="<?= $arResult["CAPTCHA_CODE"] ?>"/>
                <img src="/bitrix/tools/captcha.php?captcha_sid=<?= $arResult["CAPTCHA_CODE"] ?>" width="180"
                     height="40" alt="CAPTCHA"/>
                <input type="text" name="captcha_word" maxlength="50" value="" placeholder="<? echo GetMessage("system_auth_captcha") ?>"/>
            </div>
        <? endif ?>
        <div class="user_forms_submit">
            <input class="btn btn_colored" type="submit" name="send_account_info" value="<?= GetMessage("AUTH_SEND") ?>"/>
            <a href="/personal/auth/" rel="nofollow">
                Вспомнили пароль?
            </a>
        </div>
    </form>
</div>
<script type="text/javascript">
    document.bform.onsubmit = function () {
        document.bform.USER_EMAIL.value = document.bform.USER_LOGIN.value;
    };
    document.bform.USER_LOGIN.focus();
</script>