Files
ltsecurityinc/app/design/frontend/Olegnax/athlete2/Magento_Newsletter/templates/subscribe.phtml
T

72 lines
2.5 KiB
PHTML
Executable File

<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
// @codingStandardsIgnoreFile
/** @var Subscribe $block */
use Magento\Newsletter\Block\Subscribe;
$at_settings = $this->helper('Olegnax\Athlete2\Helper\Helper')->getConfig('athlete2_settings/footer');
$newsletterStyle = $at_settings['newsletter_style'];
$newsletterInputStyle = $at_settings['newsletter_input_underlined'];
$newsletterTitle = __('Sign Up For Email');
$newsletterLabel = $at_settings['newsletter_label']; //__('Get the latest deals and more')
$newsletterLabelAria = $newsletterLabel ? $newsletterLabel : $newsletterTitle;
if ($newsletterInputStyle) {
$newsletterInputStyle = 'inputs-style--underlined';
} else {
$newsletterInputStyle = '';
}
?>
<div class="block newsletter newsletter-style--<?= $newsletterStyle ?> <?= $newsletterInputStyle ?>">
<div class="block_newsletter_info">
<?php if ($newsletterTitle) {
?>
<div class="title">
<svg aria-hidden="true" width="30" height="22" viewBox="0 0 30 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="1" y="1" width="28" height="20" rx="1" stroke="currentColor" stroke-width="2"/>
<path d="M2 3L15 13L28 3" stroke="currentColor" stroke-width="2" stroke-linejoin="round"/>
</svg>
<span><?= $block->escapeHtml($newsletterTitle) ?></span>
</div> <?php
} ?>
<?php if ($newsletterLabel) {
?><label class="label">
<span><?= $block->escapeHtml($newsletterLabel) ?></span></label> <?php
} ?>
</div>
<div class="content">
<form class="form subscribe"
novalidate
action="<?= $block->escapeUrl($block->getFormActionUrl()) ?>"
method="post"
data-mage-init='{"validation": {"errorClass": "mage-error"}}'
id="newsletter-validate-detail">
<div class="field newsletter">
<div class="control">
<label for="newsletter">
<span class="label">
<?= $block->escapeHtml($newsletterLabelAria) ?>
</span>
</label>
<input name="email" type="email" id="newsletter"
placeholder="<?= $block->escapeHtml(__('Enter your email address')) ?>"
data-validate="{required:true, 'validate-email':true}"
/>
</div>
</div>
<div class="actions">
<button class="action subscribe primary"
title="<?= $block->escapeHtmlAttr(__('Subscribe')) ?>"
type="submit"
aria-label="Subscribe">
<span><?= $block->escapeHtml(__('Subscribe')) ?></span>
</button>
</div>
</form>
</div>
</div>