Copy files from theme to module

This commit is contained in:
Abhishek Kumar
2023-09-01 14:17:13 +05:30
parent 22468f6c85
commit 1db2dc7672
3 changed files with 252 additions and 54 deletions

View File

@@ -1,56 +1,147 @@
/* Block newsletter */
#newsletter_block_left {
padding:7px;
border:1px solid #ccc;
background:#eee;
}
#newsletter_block_left .title_block, #newsletter_block_left h4 {
padding:0 0 12px 28px;
color:#666;
text-shadow:0 1px 0 #fff;
background:url(img/icon/newsletter.png) no-repeat 0 0 transparent;
}
#newsletter_block_left p {padding:0;}
#newsletter_block_left p.success_inline {
color: #418B19;
text-align: center;
font-weight: bold;
}
#newsletter_block_left p.warning_inline {
color: #DA0F00;
text-align: center;
font-weight: bold;
}
#newsletter_block_left input.inputNew {
#columns #newsletter_block_left .form-group {
margin-bottom: 0; }
#columns #newsletter_block_left .form-group .form-control {
max-width: 222px;
display: inline-block;
margin-right: 6px; }
@media (min-width: 768px) and (max-width: 1199px) {
#columns #newsletter_block_left .form-group .form-control {
margin-bottom: 10px;
margin-right: 0; } }
#columns #newsletter_block_left .success_inline, #columns #newsletter_block_left .warning_inline {
text-align: left;
padding: 1px 0 0 0;
margin-bottom: -19px; }
#columns #newsletter_block_left .success_inline {
color: #418B19; }
#columns #newsletter_block_left .warning_inline {
color: #f13340; }
/* Block newsletter footer */
#footer #newsletter_block_left {
overflow: hidden;
/*width: 50%;*//*by webkul*/
float: left;
padding: 13px 15px 7px 15px;
height: 70px;/*by webkul*/
margin-bottom: 0; }
@media (max-width: 992px) {
#footer #newsletter_block_left {
height: 100px; }
#newsletter_block_left .block_content
{
width: 350px;
margin: 10px auto 0px;
}}
@media (max-width: 400px) {
#newsletter_block_left .block_content
{
width: 273px;
}}
@media (max-width: 767px) {
#footer #newsletter_block_left {
/*width: 100%;*/
height: auto; } }
#footer #newsletter_block_left h4 {
background: none;
float: left;
padding: 7px 16px 5px 0;
text-transform: none;
font-size: 21px;
line-height: 25px;
border: none; }
#footer #newsletter_block_left h4:after {
display: none; }
#footer #newsletter_block_left .block_content {
overflow: hidden; }
#footer #newsletter_block_left .form-group {
margin-bottom: 0; }
#footer #newsletter_block_left .form-group .form-control {
height: 45px;
max-width: 267px;
background: #3c3c3c;
border-color: #515151;
color: #fff;
padding: 10px 43px 10px 12px;
display: inline-block;
float: left; }
@media (max-width: 400px) {
#footer #newsletter_block_left .form-group .form-control{
padding: 7px 43px 7px 6px;
height: 37px;
}
}
#footer #newsletter_block_left .form-group .form-control:focus {
-moz-box-shadow: black 0px 0px 0px;
-webkit-box-shadow: black 0px 0px 0px;
box-shadow: black 0px 0px 0px; }
#footer #newsletter_block_left .form-group .button-small {
margin-left: -43px;
border: none;
background: none;
text-align: center;
color: #908f8f;
padding: 8px; }
#footer #newsletter_block_left .form-group .button-small:before {
content: "\f138";
font-family: "FontAwesome";
font-size: 28px;
line-height: 28px; }
#footer #newsletter_block_left .form-group .button-small:hover {
color: #fff !important; }
#footer #newsletter_block_left .form-group .button-small span {
display: none; }
#footer #newsletter_block_left .warning_inline {
display: block;
color: #f13340;
font-size: 13px;
line-height: 26px;
clear: both; }
@media (min-width: 1200px) {
#footer #newsletter_block_left .warning_inline {
display: inline-block;
position: relative;
top: -35px;
margin-bottom: -35px;
left: 15px;
clear: none; } }
#footer #newsletter_block_left .newsletter-input {
max-width: 230px !important; }/*by webkul original 300px*/
@media (max-width: 400px) {
#footer #newsletter_block_left .newsletter-input {
max-width: 190px !important;
}
}
#newsletter-input::-webkit-input-placeholder {
color: #bfbfbf;
}
#newsletter-input:-moz-placeholder { /* Firefox 18- */
color: #bfbfbf;
}
#newsletter-input::-moz-placeholder { /* Firefox 19+ */
color: #bfbfbf;
}
#newsletter-input:-ms-input-placeholder {
color: #bfbfbf;
}
/*# sourceMappingURL=blocknewsletter.css.map */
.button.button-medium.newsletter-btn {
position: relative;
top: -1px;
padding:0 5px;
height:20px;
width:148px;
border:1px solid #ccc;
border-right:none;
-moz-border-radius-topleft: 3px;
-moz-border-radius-bottomleft: 3px;
-webkit-border-radius-topleft: 3px;
-webkit-border-radius-bottomleft: 3px;
border-top-left-radius: 3px;
border-bottom-left-radius: 3px;
font-size:10px;
color:#999;
}
*:first-child+html #newsletter_block_left input.inputNew {position:static;}/* hack ie 7 */
#newsletter_block_left input.button_mini {
position:relative;
left:-2px;
height:23px;
width:24px;
border:0;
text-indent:-5000px;
background:url(img/bg_bt_newsletter_ok.png) no-repeat 0 0;
cursor:pointer
}
*:first-child+html #newsletter_block_left input.button_mini {padding-left:24px !important;}/* hack ie 7 */
padding: 0px 20px;
}
#newsletter-input
{
background-color: #3a3a3a;
border: 1px solid #868686;
color: #bfbfbf;
font-size: 13px;
height: 42px;
margin-bottom: 10px;
}

View File

@@ -0,0 +1,49 @@
/*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
$(document).on('click', '#blocknewsletter .newsletter-btn', function (e) {
e.preventDefault();
$.ajax({
url: url_newsletter_subscription,
type: 'POST',
dataType: 'JSON',
cache: false,
data: $(this).closest('form').serialize(),
beforeSend: function () {
let messageBlock = $('#blocknewsletter .message-block');
$(messageBlock).fadeOut('fast');
},
success: function (response) {
let messageBlock = $('#blocknewsletter .message-block');
$(messageBlock).html(response.message_html).stop(true, true).fadeIn('fast');
},
error: function (jqXHR) {
if (jqXHR.readyState == 0) {
showErrorMessage(no_internet_txt);
}
}
});
});

View File

@@ -0,0 +1,58 @@
{*
* 2007-2017 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2017 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<!-- Block Newsletter module-->
<div class="row">
<section class="col-xs-12 col-sm-12" id="blocknewsletter">
<div class="row margin-lr-0 footer-section-heading">
<p>{l s='GET NOTIFICATIONS' mod='blocknewsletter'}</p>
<hr/>
</div>
<div class="row margin-lr-0">
<form action="{$link->getModuleLink('newsletter', 'subscription')|escape:'html':'UTF-8'}" method="post">
<div class="form-group">
<input type="hidden" name="ajax" value="1" />
<input type="hidden" name="action" value="SubscribeNewsletter" />
<input type="hidden" name="token" value="{$csrf_token}" />
<input type="hidden" name="newsletter_action" value="0" />
<input type="text" class="inputNew form-control newsletter-input" id="newsletter-input" name="email" placeholder="{l s='Your email address' mod='blocknewsletter'}" />
<div class="message-block" style="display: none;"></div>
{* Hook added for GDPR *}
{if isset($id_module)}
{hook h='displayGDPRConsent' id_module=$id_module}
{/if}
<button type="submit" name="submitNewsletter" class="btn button button-medium newsletter-btn">
<span>{l s='Subscribe' mod='blocknewsletter'}</span>
</button>
</div>
</form>
</div>
{hook h="displayBlockNewsletterBottom" from='blocknewsletter'}
</section>
</div>
{addJsDefL name=no_internet_txt}{l s='No internet. Please try later.' mod='blocknewsletter' js=1}{/addJsDefL}
<!-- /Block Newsletter module-->