<?php
/**
 * Copyright 2011 Adobe
 * All Rights Reserved.
 *
 * @var $block \Magento\Customer\Block\Account\Forgotpassword
 */

// phpcs:disable Generic.Files.LineLength.TooLong

/** @var \Magento\Customer\Block\Account\Forgotpassword $block */
if (!$block->getButtonLockManager()) {
    // phpcs:ignore
    $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
    $block->setButtonLockManager(
        $objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
    );
}
/** @var $escaper \Magento\Framework\Escaper */
?>
<form class="form password forget"
      action="<?= $escaper->escapeUrl($block->getUrl('*/*/forgotpasswordpost')) ?>"
      method="post"
      id="form-validate"
      data-mage-init='{"validation":{}}'>
    <fieldset class="fieldset" data-hasrequired="<?= $escaper->escapeHtmlAttr(__('* Required Fields')) ?>">
        <div class="field note"><?= $escaper->escapeHtml(__('Please enter your email address below to receive a password reset link.')) ?></div>
        <div class="field email required">
            <label for="email_address" class="label"><span><?= $escaper->escapeHtml(__('Email')) ?></span></label>
            <div class="control">
                <input type="email" name="email" alt="email" id="email_address" class="input-text" value="<?= $escaper->escapeHtmlAttr($block->getEmailValue()) ?>" data-validate="{required:true, 'validate-email':true}">
            </div>
        </div>
        <?= $block->getChildHtml('form_additional_info') ?>
    </fieldset>
    <div class="actions-toolbar">
        <div class="primary">
            <button type="submit" class="action submit primary" id="send2" <?php if ($block->getButtonLockManager()->isDisabled('customer_forgot_password_form_submit')): ?> disabled="disabled" <?php endif; ?>><span><?= $escaper->escapeHtml(__('Reset My Password')) ?></span></button>
        </div>
        <div class="secondary">
            <a class="action back" href="<?= $escaper->escapeUrl($block->getLoginUrl()) ?>"><span><?= $escaper->escapeHtml(__('Go back')) ?></span></a>
        </div>
    </div>
</form>
<?php // phpcs:ignore Magento2.Legacy.PhtmlTemplate ?>
<script type="text/x-magento-init">
    {
        "*": {
            "Magento_Customer/js/block-submit-on-send": {
                "formId": "form-validate"
            }
        }
    }
</script>
