70 lines
2.9 KiB
PHTML
70 lines
2.9 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
|
|
/** @var \Magento\Newsletter\Block\Subscribe $block */
|
|
if (!$block->getButtonLockManager()) {
|
|
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
|
|
$block->setButtonLockManager(
|
|
$objectManager->get(\Magento\Framework\View\Element\ButtonLockManager::class)
|
|
);
|
|
}
|
|
/** @var $escaper \Magento\Framework\Escaper */
|
|
?>
|
|
<div class="block newsletter">
|
|
<div class="footer-top-left">
|
|
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('footer_top_left')->toHtml(); ?>
|
|
</div>
|
|
<div class="footer-top-right">
|
|
<div class="content">
|
|
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('footer_subscribe_text')->toHtml(); ?>
|
|
<form class="form subscribe"
|
|
novalidate
|
|
action="<?= $escaper->escapeUrl($block->getFormActionUrl()) ?>"
|
|
method="post"
|
|
data-mage-init='{"validation": {"errorClass": "mage-error"}}'
|
|
id="newsletter-validate-detail">
|
|
<?= $block->getBlockHtml('formkey') ?>
|
|
<div class="field newsletter">
|
|
<div class="control">
|
|
<label for="newsletter">
|
|
<span class="label">
|
|
<?= $escaper->escapeHtml(__('Sign Up for Our Newsletter:')) ?>
|
|
</span>
|
|
<input name="email" type="email" id="newsletter"
|
|
placeholder="<?= $escaper->escapeHtml(__('Enter your email address')) ?>"
|
|
data-mage-init='{"mage/trim-input":{}}'
|
|
data-validate="{required:true, 'validate-email':true}" />
|
|
</label>
|
|
</div>
|
|
</div>
|
|
<div class="actions">
|
|
<button class="action subscribe primary"
|
|
title="<?= $escaper->escapeHtmlAttr(__('Subscribe')) ?>"
|
|
type="submit"
|
|
aria-label="Subscribe"
|
|
<?php if ($block->getButtonLockManager()->isDisabled('newsletter_form_submit')): ?>
|
|
disabled="disabled"
|
|
<?php endif; ?>>
|
|
<span><?= $escaper->escapeHtml(__('Subscribe')) ?></span>
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div class="es-footer-newsletter-image">
|
|
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('footer_subscribe_image')->toHtml(); ?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script type="text/x-magento-init">
|
|
{
|
|
"*": {
|
|
"Magento_Customer/js/block-submit-on-send": {
|
|
"formId": "newsletter-validate-detail"
|
|
}
|
|
}
|
|
}
|
|
</script>
|