<?php
/**
 * Copyright © 2017 Codazon, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

// @codingStandardsIgnoreFile

/** @var \Magento\Customer\Block\Form\Login $block */
?>
<?php
/**
 * Customer login form template
 *
 * @see \Magento\Customer\Block\Form\Login
 * @var $block \Magento\Customer\Block\Form\Login
 */
?>
<!-- login style default -->
<?php
$uid = uniqid('-');
?>
<div class="block-customer-login">
    <div class="block-content" aria-labelledby="block-customer-login-heading">
        <?= $this->getBlockHtml('mageplaza-social-login-buttons') ?>
        <form name="loginForm" action="<?php echo $block->escapeUrl($block->getPostActionUrl()); ?>" method="post" data-mage-init='{"themewidgets":{"codazon.customValidation": {}}}'>
            <?php echo $block->getBlockHtml('formkey'); ?>
            <div class="field email required">
                <label class="label" for="email<?= $uid ?>"><span><?= $block->escapeHtml(__('Email')) ?></span></label>
                <div class="control">
                    <input name="login[username]" value="<?= $block->escapeHtmlAttr($block->getUsername()) ?>" <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> id="email<?= $uid ?>" type="email" class="input-text" title="<?= $block->escapeHtmlAttr(__('Email')) ?>" data-mage-init='{"mage/trim-input":{}}' data-validate="{required:true, 'validate-email':true}">
                </div>
            </div>
            <div class="field password required">
                <label for="pass<?= $uid ?>" class="label"><span><?= $block->escapeHtml(__('Password')) ?></span></label>
                <div class="control">
                    <input name="login[password]" type="password" <?php if ($block->isAutocompleteDisabled()) : ?> autocomplete="off"<?php endif; ?> class="input-text" id="pass<?= $uid ?>" title="<?= $block->escapeHtmlAttr(__('Password')) ?>" data-validate="{required:true}">
                </div>
            </div>
            <?php if ($captcha = $this->getLayout()->getBlock('mini-login-msp-recaptcha')) : ?>
            <?= $captcha->setCustomRecaptchaId("msp-recaptcha".$uid)->toHtml(); ?>
            <?php endif ?>
            <?= $this->getBlockHtml('cdz-login-form-additional') ?>
            <div class="actions-toolbar">
                <div class="primary"><button type="submit" class="action login primary" name="send" id="send2<?= $uid ?>"><span><?= $block->escapeHtml(__('Sign In')) ?></span></button></div>
                <div class="secondary"><a class="action remind" href="<?= $block->escapeUrl($block->getForgotPasswordUrl()) ?>"><span><?= $block->escapeHtml(__('Forgot Your Password?')) ?></span></a></div>
            </div>
        </form>
    </div>
</div>