2016-10-10 15:24:25 +02:00

106 lines
4.5 KiB
Smarty
Executable File

{*
* 2007-2013 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-2013 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
var error_msg = "{l s='Vous devez renseigner votre adresse mail.' mod='blocknewsletter'}";
var error_msg2 = "{l s='Vous devez renseigner une adresse mail valide.' mod='blocknewsletter'}";
<!--
{literal}
$(document).ready(function(e) {
function isValidEmailAddress(emailAddress) {
var pattern = new RegExp(/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i);
return pattern.test(emailAddress);
};
$('.thickbox2').on('click', function(e) {
e.preventDefault();
$.fancybox({
width : '600',
height : '440',
padding: 0,
autoDimensions: false,
autoScale: false,
showCloseButton: false,
'href': '#blockpopupnewsletter_bis'
});
return false;
});
$('.blockpopupnewsletter-close').on('click', function(e) {
e.preventDefault();
$.fancybox.close();
// $('#header .sf-right + .clear div').remove();
return false;
});
$('#blocknewsletter-submit').on('click', function(e) {
e.preventDefault();
if( $('.blocknewsletter-block #email').val() ){
if ( isValidEmailAddress( $('.blocknewsletter-block #email').val() ) ) {
$('#blocknewsletter-form').submit();
} else {
alert(error_msg2);
}
} else {
alert(error_msg);
}
});
});
{/literal}
-->
</script>
<div class="hidden">
<div id="blockpopupnewsletter_bis" class="blockpopupnewsletter">
<div class="blockpopupnewsletter-close"></div>
<div class="blockpopupnewsletter-text">
<h2>{l s='Recevez toute la magie Garancia' mod='blocknewsletter'}</h2>
<p>{l s='Inscrivez-vous à la newsletter Garancia pour recevoir' mod='blocknewsletter'}</p>
<ul class="clearfix">
<li>{l s='Nos' mod='blocknewsletter'} <b>{l s='offres exclusives' mod='blocknewsletter'}</b></li>
<li>{l s='Toutes nos' mod='blocknewsletter'} <b>{l s='nouvelles recettes magiques' mod='blocknewsletter'}</b></li>
<li>{l s='Une' mod='blocknewsletter'} <b>{l s='offre spéciale sur votre 1ère commande !' mod='blocknewsletter'}</b></li>
</ul>
</div>
<form id="blocknewsletter-form" method="post">
<div class="blocknewsletter-block clearfix">
<input type="email" placeholder="{l s='votre @ email' mod='blocknewsletter'}" id="email" name="email" data-role="none">
</div>
<div class="blocknewsletter-block clearfix">
<button id="blocknewsletter-submit" name="blocknewsletter-submit" value="blocknewsletter" data-role="none">
<span>{l s='Je m\'inscris !' mod='blocknewsletter'}</span>
<img src="{$img_dir}listingFleche.png" alt="" />
</button>
</div>
</form>
<p class="blocknewsletter-footer">
{l s='Vous pourrez vous désinscrire à tout moment. Vos informations ne seront pas communiquées à des tiers.' mod='blocknewsletter'}
</p>
</div>
</div>