<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/tunnel/step1.html.twig */
class __TwigTemplate_3f10f96abcfd7373c054d86c764db62e extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'stylesheets' => [$this, 'block_stylesheets'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/tunnel/step1.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/tunnel/step1.html.twig"));
// line 1
yield "<!doctype html>
<html lang=\"fr\">
<head>
";
// line 5
if ((array_key_exists("site_mode", $context) && ((isset($context["site_mode"]) || array_key_exists("site_mode", $context) ? $context["site_mode"] : (function () { throw new RuntimeError('Variable "site_mode" does not exist.', 5, $this->source); })()) == "prod"))) {
// line 6
yield " <!-- Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P6WW2D7');</script>
<!-- End Google Tag Manager -->
<!-- End Google Tag Manager -->
";
}
// line 18
yield " <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<meta http-equiv=\"Content-Language\" content=\"fr\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<title>Étape 1</title>
<!--Favicon-->
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/tunnel/favicon.png\" />
<!--Script pour l'accordéon-->
<script type=\"text/javascript\" src=\"//unpkg.com/alpinejs\" defer></script>
<!-- TrustBox script -->
<script type=\"text/javascript\" src=\"//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js\" async></script>
";
// line 33
yield from $this->unwrap()->yieldBlock('stylesheets', $context, $blocks);
// line 36
yield " <script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '334520913601498');
</script>
<noscript><img height=\"1\" width=\"1\" style=\"display:none\"
src=\"https://www.facebook.com/tr?id=334520913601498&ev=PageView&noscript=1\"
/></noscript>
</head>
<body class=\"font-poppins\">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-P6WW2D7\"
height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- En Tête -->
<header class=\"flex px-4 py-4 justify-center lg:justify-between flex-wrap items-center\">
<div class=\"flex\">
<a href=\"https://lesbonsprofs.com\" target=\"_blank\" aria-label=\"Les Bons Profs\"><img src=\"/static/img/tunnel/les-bons-profs-logo.svg\" alt=\"Les bons profs - Paiement\" /></a>
</div>
<div class=\"flex items-center mt-2 sm:mt-0\">
<div class=\"text-bleu font-bold sm:mr-2 xl:mr-5 text-xs sm:text-[15px] xl:text[20px] text-center sm:text-left\">Besoin d'aide ? Sabrina vous répond au 01 86 95 72 01 du lundi au jeudi de 9h à 17h.</div>
</div>
</header>
<!-- Titre -->
<section class=\"py-4 text-center bg-bleu\">
<h1 class=\"font-muller font-bold text-[45px] sm:text-[90px] text-white\">
Offre ";
// line 72
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 72, $this->source); })()), "title", [], "any", false, false, false, 72), "html", null, true);
yield "
</h1>
<h2 class=\"font-muller text-jaunefonce text-[25px] sm:text-[40px]\">
Sélectionnez votre durée
</h2>
</section>
<!-- Timeline -->
<section class=\"flex justify-center sm:pt-16\">
<ol
class=\"border-s border-bleu border-opacity-30 md:flex md:justify-evenly md:gap-6 md:border-s-0 md:border-t w-9/12\">
<!--First item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[20px] w-[20px] rounded-full bg-white border-bleu border-8 md:-mt-[10px] -ms-[10px] me-3\"></div>
<p class=\"sm:mt-2 text-sm xl:text-base text-bleu font-bold\">
1. Choisissez votre offre
</p>
</div>
</li>
<!--Second item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3\"></div>
<p class=\"sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50\">
2. Accédez à votre compte
</p>
</div>
</li>
<!--Third item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3\"></div>
<p class=\"sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50\">
3. Procédez au paiement
</p>
</div>
</li>
</ol>
</section>
";
// line 118
if ((($tmp = (isset($context["mode_free"]) || array_key_exists("mode_free", $context) ? $context["mode_free"] : (function () { throw new RuntimeError('Variable "mode_free" does not exist.', 118, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 119
yield " <section class=\"flex justify-center py-8 sm:py-16\">
<div class=\"text-center w-11/12 lg:w-9/12 bg-jaunefonce text-bleu py-2 px-4 rounded-full sm:text-xl\">
Vous ne serez pas débité avant la fin de votre essai de 7 jours
</div>
</section>
";
}
// line 125
yield "
<!--Offres-->
<section class=\"flex justify-center";
// line 127
if ((($tmp = (isset($context["mode_tunnel"]) || array_key_exists("mode_tunnel", $context) ? $context["mode_tunnel"] : (function () { throw new RuntimeError('Variable "mode_tunnel" does not exist.', 127, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield " pt-8 sm:pt-16";
}
yield "\">
<div class=\"flex flex-col lg:flex-row justify-between w-11/12 xl:w-9/12\">
<!--Colonne gauche-->
<div class=\"flex flex-col lg:w-6/12\">
";
// line 132
if ((($tmp = !(isset($context["mode_tunnel"]) || array_key_exists("mode_tunnel", $context) ? $context["mode_tunnel"] : (function () { throw new RuntimeError('Variable "mode_tunnel" does not exist.', 132, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 133
yield " <div>
<label for=\"enfants\" class=\"font-bold tracking-tight sm:tracking-normal\">
Combien d’enfants souhaitez-vous inscrire ?
</label>
<div class=\"flex items-center mt-2\">
<div>
<select id=\"nbr-child\" name=\"enfants\" class=\"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 sm:max-w-xs sm:text-sm/6\">
<option value=\"1\">1 enfant</option>
<option value=\"2\">2 enfants</option>
<option value=\"3\">3 enfants</option>
<option value=\"4\">4 enfants</option>
<option value=\"5\">5 enfants</option>
</select>
</div>
<div class=\"italic text-xs text-gray-500 ml-5\">
<p>-20% pour le 2<sup>ème</sup> enfant</p>
<p>-30% pour le 3<sup>ème</sup> enfant</p>
</div>
</div>
</div>
";
} else {
// line 154
yield " <input type=\"hidden\" name=\"enfants\" value=\"1\" id=\"nbr-child\">
";
}
// line 156
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["listOffer"]) || array_key_exists("listOffer", $context) ? $context["listOffer"] : (function () { throw new RuntimeError('Variable "listOffer" does not exist.', 156, $this->source); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 157
yield " <!--Carte 24 mois-->
<div class=\"";
// line 158
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 158)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "sm:flex";
} else {
yield "flex";
}
yield " justify-between border-gray-400 border-solid border-4 rounded-md mt-6\">
";
// line 159
if (((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 159)) || ( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 159)) && ($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 159), "U") < $this->extensions['Twig\Extension\CoreExtension']->formatDate("now", "U"))))) {
// line 160
yield " <div>";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 160) > 1)) {
// line 161
yield " <span class=\"text-xs bg-red-600 text-white absolute rounded px-1 py-0.5\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 161) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 161)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 161, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 161, $this->source); })())) * 100), 0, ",", ".")), "html", null, true);
yield "% de réduction</span>
";
}
// line 163
yield " <div class=\"flex flex-col pt-5 pb-5 pl-5\">
<div class=\"flex items-center gap-x-3\">
<input id=\"p-";
// line 165
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 165), "html", null, true);
yield "\" name=\"price\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "slug", [], "any", false, false, false, 165), "html", null, true);
yield "\" type=\"radio\" class=\"h-4 w-4 border-gray-300\" data-id=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "id", [], "any", false, false, false, 165), "html", null, true);
yield "\" data-title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "title", [], "any", false, false, false, 165), "html", null, true);
yield "\" data-price=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 165), "html", null, true);
yield "\" data-month=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 165), "html", null, true);
yield "\" data-period=\"";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 165) > 1)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 165), "html", null, true);
}
yield " mois\">
<label for=\"p-";
// line 166
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 166), "html", null, true);
yield "\" class=\"block font-medium text-gray-900\">
<span class=\"font-bold text-xl mr-5\">";
// line 167
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 167), "html", null, true);
yield " mois</span><br class=\"sm:hidden\"/>
<span class=\"font-bold\">";
// line 168
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 168) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 168)), 2, "floor"), 2, ",", "."), "html", null, true);
yield " € / mois</span>
</label>
</div>
<div class=\"mt-5 text-xs text-gray-500\">
";
// line 172
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 172) > 1)) {
yield "En un paiement de ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 172), 2, ",", "."), "html", null, true);
yield " €.";
}
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 172) < 13)) {
yield "Renoulevé tous les ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 172) > 1)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 172), "html", null, true);
}
yield " mois.";
}
yield " Annulable à tout moment
</div>
</div>
</div>
";
} else {
// line 177
yield " <div>
<span class=\"text-xs bg-red-600 text-white absolute rounded px-1 py-0.5\">";
// line 178
if ((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 178))) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 178) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 178)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 178, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 178, $this->source); })())) * 100), 0, ",", ".")), "html", null, true);
} else {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 178), "html", null, true);
}
yield "% de réduction</span>
<div class=\"flex flex-col pt-10 pb-5 pl-5\">
<div class=\"flex items-center gap-x-3\">
<input id=\"p-";
// line 181
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 181), "html", null, true);
yield "\" name=\"price\" value=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "slug", [], "any", false, false, false, 181), "html", null, true);
yield "\" type=\"radio\" class=\"h-4 w-4 border-gray-300 js-auto-discount\" data-title=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "title", [], "any", false, false, false, 181), "html", null, true);
yield "\" data-discount=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 181), "codePromo", [], "any", false, false, false, 181), "html", null, true);
yield "\" data-price=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 181), "html", null, true);
yield "\" data-month=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 181), "html", null, true);
yield "\" data-period=\"";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 181) > 1)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 181), "html", null, true);
}
yield " mois\">
<label for=\"p-";
// line 182
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 182), "html", null, true);
yield "\" class=\"block font-medium text-gray-900\">
<span class=\"font-bold text-xl mr-5\">";
// line 183
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 183), "html", null, true);
yield " mois</span><br class=\"sm:hidden\"/>
<span class=\"font-bold\">";
// line 184
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 184) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 184)), 2, "floor"), 2, ",", "."), "html", null, true);
yield " € / mois <span class=\"line-through text-gray-500\">( au lieu de ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 184, $this->source); })()), 2, ",", "."), "html", null, true);
yield "€)</span></span>
</label>
</div>
<div class=\"mt-5 text-xs text-gray-500\">
";
// line 188
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 188) > 1)) {
yield "En un paiement de ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 188), 2, ",", "."), "html", null, true);
yield " € (<span class=\"text-decoration-line-through\" style=\"text-decoration: line-through\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "oldPrice", [], "any", false, false, false, 188), "html", null, true);
yield " €</span>) avec le code ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 188), "codePromo", [], "any", false, false, false, 188)), "html", null, true);
yield ".";
}
yield " ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 188) < 13)) {
yield "Renoulevé tous les ";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 188) > 1)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 188), "html", null, true);
}
yield " mois.";
}
yield " Annulable à tout moment
</div>
</div>
</div>
";
}
// line 193
yield " ";
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 193)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 194
yield " <div class=\"flex flex-col justify-center bg-jaunefonce sm:w-5/12 sm:p-5 p-3\">
<div class=\"flex flex-wrap font-bold items-center justify-center sm:justify-start\">Coup de<img src=\"/static/img/tunnel/coeur-rouge.png\" alt=\"Coup de coeur des parents\" class=\"px-1 sm:px-2 w-5 h-4 sm:w-auto\" />des parents</div>
<div class=\"mt-5 text-xs text-center sm:text-justify\">Inclus les annales du Bac et du Brevet corrigées en vidéo</div>
</div>
";
}
// line 199
yield " </div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['row'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 201
yield " ";
$context["titre_faq"] = "Comment fonctionne l’essai gratuit de 7 jours :";
// line 202
yield " ";
$context["faq"] = [["titre" => "Pendant la période d’essai", "texte" => "Je teste tous les contenus compris dans mon abonnement, les stages de révision pendant les vacances et les boost matière."], ["titre" => "Comment arrêter l’essai gratuit", "texte" => "Avant la fin des 7 jours d’essai, rendez-vous dans la rubrique “gestion du compte” de votre espace parents et cliquez sur “mettre fin à la période d’essai”."]];
// line 210
yield " ";
if ((($tmp = (isset($context["mode_free"]) || array_key_exists("mode_free", $context) ? $context["mode_free"] : (function () { throw new RuntimeError('Variable "mode_free" does not exist.', 210, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 211
yield " <!--L'essai gratuit pour PC-->
<div class=\"mt-12 text-gray-500 hidden lg:block text-justify\">
<p class=\"font-bold\">
";
// line 214
yield (isset($context["titre_faq"]) || array_key_exists("titre_faq", $context) ? $context["titre_faq"] : (function () { throw new RuntimeError('Variable "titre_faq" does not exist.', 214, $this->source); })());
yield "
</p>
";
// line 216
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["faq"]) || array_key_exists("faq", $context) ? $context["faq"] : (function () { throw new RuntimeError('Variable "faq" does not exist.', 216, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 217
yield " <p class=\"mt-5\">
<span class=\"font-bold\">";
// line 218
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "titre", [], "any", false, false, false, 218), "html", null, true);
yield "</span>
<br />
";
// line 220
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "texte", [], "any", false, false, false, 220), "html", null, true);
yield "
</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['row'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 223
yield " </div>
<!--Accordéon pour mobile-->
<div class=\"mt-12 py-2 px-3 border-gray-400 border-solid border rounded-md lg:hidden\" x-data=\"{selected: null}\">
<div>
<div>
<div class=\"w-full flex justify-between items-center cursor-pointer\"
@click=\"selected !== 1 ? selected = 1 : selected = null\"
>
<h4 class=\"font-bold text-gray-500\">";
// line 233
yield (isset($context["titre_faq"]) || array_key_exists("titre_faq", $context) ? $context["titre_faq"] : (function () { throw new RuntimeError('Variable "titre_faq" does not exist.', 233, $this->source); })());
yield "</h4>
<div class=\"pl-2\">
<img class=\"transition-all ease-in-out duration-700 min-w-4\" :class=\"selected === 1 ? 'rotate-180' : ''\" alt=\"chevron\" src=\"/static/img/tunnel/chevron.svg\" />
</div>
</div>
<div class=\"relative overflow-hidden max-h-0 transition-all ease-in-out duration-700\" x-ref=\"container1\" :style=\"selected === 1 ? 'max-height: ' + \$refs.container1.scrollHeight + 'px' : ''\">
<div class=\"pt-4 flex flex-col space-y-3\">
<div class=\"text-gray-500 text-justify\">
";
// line 241
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable((isset($context["faq"]) || array_key_exists("faq", $context) ? $context["faq"] : (function () { throw new RuntimeError('Variable "faq" does not exist.', 241, $this->source); })()));
foreach ($context['_seq'] as $context["_key"] => $context["row"]) {
// line 242
yield " <p class=\"mt-5\">
<span class=\"font-bold\">";
// line 243
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "titre", [], "any", false, false, false, 243), "html", null, true);
yield "</span>
<br />
";
// line 245
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "texte", [], "any", false, false, false, 245), "html", null, true);
yield "
</p>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['row'], $context['_parent']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 248
yield " </div>
</div>
</div>
</div>
</div>
</div>
";
}
// line 255
yield "
</div>
<!--Colonne droite-->
<div class=\"flex flex-col lg:w-5/12 my-16 lg:mt-0\">
<!--Encadré bleu-->
<div class=\"flex flex-col bg-bleu rounded-2xl\">
<div class=\"text-white font-bold text-center text-2xl py-5\">Ce que comprend l'offre ";
// line 264
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 264, $this->source); })()), "title", [], "any", false, false, false, 264), "html", null, true);
yield "</div>
<div class=\"flex flex-col bg-white m-2 rounded-2xl p-5\">
<div>
";
// line 267
if ((($tmp = !(null === (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 267, $this->source); })()))) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 268
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 268, $this->source); })()), "textPaid", [], "any", false, false, false, 268);
yield "
";
}
// line 270
yield " </div>
<label for=\"promo\" class=\"mt-8 sm:mt-16\">Vous disposez d'un code promotionel ? Indiquez-le ici :</label>
<div class=\"flex mt-5\">
<input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 border-0 py-1.5 pl-5 placeholder:text-gray-400 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-md shadow-sm ring-1 ring-inset ring-gray-300 w-[2vw]\" placeholder=\"Entrez le code promo\">
<button type=\"submit\" class=\"bg-jaunefonce px-3 py-2 text-xl font-bold text-white shadow-sm hover:bg-rouge rounded-r-3xl\" id=\"button-code-promo\">Valider</button>
</div>
<div class=\"\" id=\"tr-code\">
<div style=\"padding: 2%;\" class=\"mt-2\">
<div class=\"remise-appliquee font-bold\"></div>
<div id=\"text-percent\"></div>
</div>
</div>
<div class=\"grid grid-cols-[repeat(2,minmax(auto,auto))] gap-4 border-jaunefonce border-solid border-8 rounded-3xl mt-8 sm:mt-16 p-6 items-center\">
";
// line 283
if ((($tmp = (isset($context["mode_free"]) || array_key_exists("mode_free", $context) ? $context["mode_free"] : (function () { throw new RuntimeError('Variable "mode_free" does not exist.', 283, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 284
yield " <span>Montant dû aujourd'hui</span>
<span>0 €</span>
<span>Montant dû ";
// line 286
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, $this->extensions['Twig\Extension\CoreExtension']->modifyDate("now", "+8 day"), "medium", "medium", "dd MMMM YYYY", null, "gregorian", "fr"), "html", null, true);
yield "</span>
<span id=\"som-toto\"></span>
";
} else {
// line 289
yield " <span>Montant dû aujourd'hui</span>
<span id=\"som-toto\"></span>
";
}
// line 292
yield "
</div>
</div>
</div>
<!--Bouton-->
<div class=\"flex justify-center mt-10 cursor-pointer\">
<button type=\"submit\" class=\"bg-jaunefonce btn-form text-bleu rounded-3xl text-3xl font-muller py-3 px-20\">OK j'essaie</button>
<img src=\"/static/img/tunnel/clic-hand.png\" alt=\"Essayer l'offre\" class=\"absolute pl-60 pt-5 btn-form\" />
</div>
<!-- TrustBox widget - List pour PC-->
<div class=\"trustpilot-widget mt-20 hidden lg:block\" data-locale=\"fr-FR\" data-template-id=\"539ad60defb9600b94d7df2c\" data-businessunit-id=\"5c9c8063164d370001824ce4\" data-style-height=\"500px\" data-style-width=\"100%\" data-stars=\"4,5\" data-review-languages=\"fr\">
<a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\" rel=\"noopener\">Trustpilot</a>
</div>
<!-- TrustBox widget - Mini pour mobiles-->
<div class=\"trustpilot-widget lg:hidden mt-16\" data-locale=\"fr-FR\" data-template-id=\"53aa8807dec7e10d38f59f32\" data-businessunit-id=\"5c9c8063164d370001824ce4\" data-style-height=\"150px\" data-style-width=\"100%\">
<a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\" rel=\"noopener\">Trustpilot</a>
</div>
</div>
</div>
</section>
<form class=\"form-next-step-2\" action=\"";
// line 318
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("choix-formule-step");
yield "?offre=";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["getOffer"]) || array_key_exists("getOffer", $context) ? $context["getOffer"] : (function () { throw new RuntimeError('Variable "getOffer" does not exist.', 318, $this->source); })()), "html", null, true);
yield "\" method=\"post\" id=\"parents_registration_first_step_";
if (((isset($context["getOffer"]) || array_key_exists("getOffer", $context) ? $context["getOffer"] : (function () { throw new RuntimeError('Variable "getOffer" does not exist.', 318, $this->source); })()) == "essentielle")) {
yield "essentielle";
} else {
yield "assistancevisio";
}
yield "\">
</form>
<div class=\"u-spinner h-100 vh-100\">
<svg class=\"svg-icon svg-loader\" version=\"1.1\" id=\"L4\" xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 100\" enable-background=\"new 0 0 0 0\"
xml:space=\"preserve\">
<circle cx=\"0\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.1\"></animate>
</circle>
<circle cx=\"20\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.2\"></animate>
</circle>
<circle cx=\"41\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.3\"></animate>
</circle>
</svg>
</div>
";
// line 336
yield from $this->unwrap()->yieldBlock('javascripts', $context, $blocks);
// line 339
yield "<script type=\"text/javascript\">
\$(document).ready(function(){
function calculPrice(){
var nbrChild = parseInt(\$('#nbr-child').val());
var som = 0;
if(\$('input[name=\"price\"]:checked').length==1){
var period = \$('input[name=\"price\"]:checked').attr('data-period');
var month = \$('input[name=\"price\"]:checked').attr('data-month');
var price = \$('input[name=\"price\"]:checked').attr('data-price');
var realPrice = parseFloat(price);
for(var i = 0;i<nbrChild;i++){
if(i==0){
if(\$('#button-code-promo').is(\"[data-percent]\")){
var percent = \$('#button-code-promo').attr('data-percent');
if(\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*(parseFloat(percent)/100));
}else{
som= som + realPrice
}
}else{
som= som + realPrice
}
}
if(i==1){
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.2);
}else{
som = som + (realPrice - realPrice*0.35);
}
}
if(2<=i){
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.3);
}else{
som = som + (realPrice - realPrice*0.45);
}
}
}
\$('#som-toto').text('').text((som.toFixed(2)).replaceAll('.',',')+' €');
\$('#som-toto').attr('data-som',som.toFixed(2))
\$('.total-price').text(' / '+period);
}
}
\$('#nbr-child').change(function(){
var val = \$(this).val();
calculPrice();
if(\$('.form-next-step-2').find('input[name=\"child\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"child\" value=\"'+val+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"child\"]').val(val);
}
})
var percent = 0;
var coupon
\$('#button-code-promo').click(function(){
if (\$('input[name=\"price\"]:checked').length==1){
var priceId = \$('input[name=\"price\"]:checked').attr('data-id');
var self = \$(this);
\$(this).prev().removeClass('is-invalid');
coupon = \$(this).prev().val();
self.parent().parent().find('.invalid-feedback').text('')
\$.ajax({
url:\"";
// line 415
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
yield "\",
data:\"coupon=\"+coupon,
success:function(elem){
var verif= true;
self.parent().find('input').val('');
if(elem.success){
if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
verif = false;
}
if(verif){
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"discount\" value=\"'+elem.data.code+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"discount\"]').val(elem.data.code);
}
percent = elem.data.percent;
self.attr('data-percent',percent);
//\$('#text-percent').text('').text('reduction de '+percent+'%')
\$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
self.addClass('js-calculate-auto')
calculPrice();
}
}
if(!elem.success || !verif){
self.parents('.input-group').parent().find('.invalid-feedback').text('').text('Ce code promo est invalide !');
if(!self.parents('.input-group').find('input').hasClass('is-invalid')){
self.parents('.input-group').find('input').addClass('is-invalid');
}
}
}
})
}else{
alert('Veuillez choisir une durée de votre offre')
}
})
\$('input[name=\"price\"]').change(function(){
if(\$(this).is(':checked')){
var price = parseFloat(\$(this).attr('data-price'));
var period = \$(this).attr('data-period');
var offer = \$(this).val();
var month = \$(this).attr('data-month');
if(\$(this).hasClass('js-auto-discount')){
var coupon = \$(this).attr('data-discount');
\$('.u-spinner').addClass('open')
\$.ajax({
url:\"";
// line 473
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
yield "\",
data:\"coupon=\"+coupon,
success:function(elem){
if(elem.success){
//\$('#tr-code').removeClass('d-none')
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"discount\" value=\"'+elem.data.code+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"discount\"]').val(elem.data.code);
}
percent = elem.data.percent;
\$('#button-code-promo').attr('data-percent',percent);
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
\$('#button-code-promo').addClass('js-calculate-auto')
}
// self.attr('data-percent',percent);
//\$('#text-percent').text('').text('reduction de '+percent+'%')
\$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
calculPrice();
\$('.u-spinner').removeClass('open')
}
}
})
}else{
\$('#button-code-promo').attr('data-percent',0);
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==1){
\$('.form-next-step-2').find('input[name=\"discount\"]').remove()
}
//\$('#text-percent').text('')
\$('.remise-appliquee').text('');
calculPrice()
}
if(\$('.form-next-step-2').find('input[name=\"offer\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"offer\" value=\"'+offer+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"offer\"]').val(offer);
}
// \$('#text-toto-offer-period').removeClass('d-none').addClass('d-block')
// \$('#toto-offer-period').text(period.toLowerCase())
}
})
\$('input[name=\"price\"]').change()
\$('.btn-form').click(function(){
if(\$('.form-next-step-2').find('input[name=\"offer\"]').length==0){
}else{
fbq('track', 'AddToCart', {
content_name: \$('input[name=\"price\"]:checked').data('title'),
content_category: '";
// line 527
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::upper($this->env->getCharset(), CoreExtension::getAttribute($this->env, $this->source, (isset($context["typeOffer"]) || array_key_exists("typeOffer", $context) ? $context["typeOffer"] : (function () { throw new RuntimeError('Variable "typeOffer" does not exist.', 527, $this->source); })()), "title", [], "any", false, false, false, 527)), "html", null, true);
yield "',
content_ids: [\$('input[name=\"price\"]:checked').val()],
content_type: 'product',
value: \$('#som-toto').data('som'),
currency: 'EUR'
});
\$('.form-next-step-2').submit();
}
})
";
// line 536
if ((($tmp = !(isset($context["getPrice"]) || array_key_exists("getPrice", $context) ? $context["getPrice"] : (function () { throw new RuntimeError('Variable "getPrice" does not exist.', 536, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 537
yield " \$('.show-mentor #p-1').click();
";
}
// line 539
yield "
})
</script>
</body>
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
// line 33
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_stylesheets(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "stylesheets"));
// line 34
yield " ";
yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackLinkTags("tunnel");
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 336
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 337
yield " ";
yield $this->extensions['Symfony\WebpackEncoreBundle\Twig\EntryFilesTwigExtension']->renderWebpackScriptTags("tunnel");
yield "
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/tunnel/step1.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 903 => 337, 890 => 336, 876 => 34, 863 => 33, 848 => 539, 844 => 537, 842 => 536, 830 => 527, 773 => 473, 712 => 415, 634 => 339, 632 => 336, 603 => 318, 575 => 292, 570 => 289, 564 => 286, 560 => 284, 558 => 283, 543 => 270, 537 => 268, 535 => 267, 529 => 264, 518 => 255, 509 => 248, 500 => 245, 495 => 243, 492 => 242, 488 => 241, 477 => 233, 465 => 223, 456 => 220, 451 => 218, 448 => 217, 444 => 216, 439 => 214, 434 => 211, 431 => 210, 428 => 202, 425 => 201, 410 => 199, 403 => 194, 400 => 193, 376 => 188, 367 => 184, 363 => 183, 359 => 182, 341 => 181, 331 => 178, 328 => 177, 308 => 172, 301 => 168, 297 => 167, 293 => 166, 275 => 165, 271 => 163, 265 => 161, 262 => 160, 260 => 159, 252 => 158, 249 => 157, 231 => 156, 227 => 154, 204 => 133, 202 => 132, 192 => 127, 188 => 125, 180 => 119, 178 => 118, 129 => 72, 91 => 36, 89 => 33, 72 => 18, 58 => 6, 56 => 5, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("<!doctype html>
<html lang=\"fr\">
<head>
{% if site_mode is defined and site_mode == 'prod' %}
<!-- Google Tag Manager -->
<!-- Google tag (gtag.js) -->
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-P6WW2D7');</script>
<!-- End Google Tag Manager -->
<!-- End Google Tag Manager -->
{% endif %}
<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<meta http-equiv=\"Content-Language\" content=\"fr\" />
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">
<title>Étape 1</title>
<!--Favicon-->
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/tunnel/favicon.png\" />
<!--Script pour l'accordéon-->
<script type=\"text/javascript\" src=\"//unpkg.com/alpinejs\" defer></script>
<!-- TrustBox script -->
<script type=\"text/javascript\" src=\"//widget.trustpilot.com/bootstrap/v5/tp.widget.bootstrap.min.js\" async></script>
{% block stylesheets %}
{{ encore_entry_link_tags('tunnel') }}
{% endblock %}
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window, document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '334520913601498');
</script>
<noscript><img height=\"1\" width=\"1\" style=\"display:none\"
src=\"https://www.facebook.com/tr?id=334520913601498&ev=PageView&noscript=1\"
/></noscript>
</head>
<body class=\"font-poppins\">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src=\"https://www.googletagmanager.com/ns.html?id=GTM-P6WW2D7\"
height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- En Tête -->
<header class=\"flex px-4 py-4 justify-center lg:justify-between flex-wrap items-center\">
<div class=\"flex\">
<a href=\"https://lesbonsprofs.com\" target=\"_blank\" aria-label=\"Les Bons Profs\"><img src=\"/static/img/tunnel/les-bons-profs-logo.svg\" alt=\"Les bons profs - Paiement\" /></a>
</div>
<div class=\"flex items-center mt-2 sm:mt-0\">
<div class=\"text-bleu font-bold sm:mr-2 xl:mr-5 text-xs sm:text-[15px] xl:text[20px] text-center sm:text-left\">Besoin d'aide ? Sabrina vous répond au 01 86 95 72 01 du lundi au jeudi de 9h à 17h.</div>
</div>
</header>
<!-- Titre -->
<section class=\"py-4 text-center bg-bleu\">
<h1 class=\"font-muller font-bold text-[45px] sm:text-[90px] text-white\">
Offre {{ typeOffer.title }}
</h1>
<h2 class=\"font-muller text-jaunefonce text-[25px] sm:text-[40px]\">
Sélectionnez votre durée
</h2>
</section>
<!-- Timeline -->
<section class=\"flex justify-center sm:pt-16\">
<ol
class=\"border-s border-bleu border-opacity-30 md:flex md:justify-evenly md:gap-6 md:border-s-0 md:border-t w-9/12\">
<!--First item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[20px] w-[20px] rounded-full bg-white border-bleu border-8 md:-mt-[10px] -ms-[10px] me-3\"></div>
<p class=\"sm:mt-2 text-sm xl:text-base text-bleu font-bold\">
1. Choisissez votre offre
</p>
</div>
</li>
<!--Second item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3\"></div>
<p class=\"sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50\">
2. Accédez à votre compte
</p>
</div>
</li>
<!--Third item-->
<li>
<div class=\"flex items-center pt-3 md:block md:pt-0\">
<div
class=\"md:mx-auto h-[9px] w-[9px] rounded-full bg-bleu opacity-50 md:-mt-[5px] -ms-[5px] me-3\"></div>
<p class=\"sm:mt-2 ml-1.5 sm:ml-0 text-sm xl:text-base text-bleu opacity-50\">
3. Procédez au paiement
</p>
</div>
</li>
</ol>
</section>
{% if mode_free %}
<section class=\"flex justify-center py-8 sm:py-16\">
<div class=\"text-center w-11/12 lg:w-9/12 bg-jaunefonce text-bleu py-2 px-4 rounded-full sm:text-xl\">
Vous ne serez pas débité avant la fin de votre essai de 7 jours
</div>
</section>
{% endif %}
<!--Offres-->
<section class=\"flex justify-center{% if mode_tunnel %} pt-8 sm:pt-16{% endif %}\">
<div class=\"flex flex-col lg:flex-row justify-between w-11/12 xl:w-9/12\">
<!--Colonne gauche-->
<div class=\"flex flex-col lg:w-6/12\">
{% if not mode_tunnel %}
<div>
<label for=\"enfants\" class=\"font-bold tracking-tight sm:tracking-normal\">
Combien d’enfants souhaitez-vous inscrire ?
</label>
<div class=\"flex items-center mt-2\">
<div>
<select id=\"nbr-child\" name=\"enfants\" class=\"block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 sm:max-w-xs sm:text-sm/6\">
<option value=\"1\">1 enfant</option>
<option value=\"2\">2 enfants</option>
<option value=\"3\">3 enfants</option>
<option value=\"4\">4 enfants</option>
<option value=\"5\">5 enfants</option>
</select>
</div>
<div class=\"italic text-xs text-gray-500 ml-5\">
<p>-20% pour le 2<sup>ème</sup> enfant</p>
<p>-30% pour le 3<sup>ème</sup> enfant</p>
</div>
</div>
</div>
{% else %}
<input type=\"hidden\" name=\"enfants\" value=\"1\" id=\"nbr-child\">
{% endif %}
{% for row in listOffer %}
<!--Carte 24 mois-->
<div class=\"{% if loop.first %}sm:flex{% else %}flex{% endif%} justify-between border-gray-400 border-solid border-4 rounded-md mt-6\">
{% if row.discount is null or (row.discountDate is not null and row.discountDate|date('U') < \"now\"|date('U') ) %}
<div>{% if row.monthValid>1 %}
<span class=\"text-xs bg-red-600 text-white absolute rounded px-1 py-0.5\">{{ (((((row.price/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, ',', '.')|abs) }}% de réduction</span>
{% endif %}
<div class=\"flex flex-col pt-5 pb-5 pl-5\">
<div class=\"flex items-center gap-x-3\">
<input id=\"p-{{ loop.index }}\" name=\"price\" value=\"{{ row.slug }}\" type=\"radio\" class=\"h-4 w-4 border-gray-300\" data-id=\"{{ row.id }}\" data-title=\"{{ row.title }}\" data-price=\"{{ row.price }}\" data-month=\"{{ row.monthValid }}\" data-period=\"{% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois\">
<label for=\"p-{{ loop.index }}\" class=\"block font-medium text-gray-900\">
<span class=\"font-bold text-xl mr-5\">{{ row.monthValid }} mois</span><br class=\"sm:hidden\"/>
<span class=\"font-bold\">{{ (row.price/row.monthValid)|round(2, 'floor')|number_format(2, ',', '.') }} € / mois</span>
</label>
</div>
<div class=\"mt-5 text-xs text-gray-500\">
{% if row.monthValid>1 %}En un paiement de {{ row.price|number_format(2, ',', '.') }} €.{% endif%} {% if row.monthValid<13 %}Renoulevé tous les {% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois.{% endif %} Annulable à tout moment
</div>
</div>
</div>
{% else %}
<div>
<span class=\"text-xs bg-red-600 text-white absolute rounded px-1 py-0.5\">{% if row.percentDiscount is null %}{{ (((((row.getAmount()/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, ',', '.')|abs) }}{% else %}{{ row.percentDiscount }}{% endif %}% de réduction</span>
<div class=\"flex flex-col pt-10 pb-5 pl-5\">
<div class=\"flex items-center gap-x-3\">
<input id=\"p-{{ loop.index }}\" name=\"price\" value=\"{{ row.slug }}\" type=\"radio\" class=\"h-4 w-4 border-gray-300 js-auto-discount\" data-title=\"{{ row.title }}\" data-discount=\"{{ row.discount.codePromo }}\" data-price=\"{{ row.price }}\" data-month=\"{{ row.monthValid }}\" data-period=\"{% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois\">
<label for=\"p-{{ loop.index }}\" class=\"block font-medium text-gray-900\">
<span class=\"font-bold text-xl mr-5\">{{ row.monthValid }} mois</span><br class=\"sm:hidden\"/>
<span class=\"font-bold\">{{ (row.getAmount()/row.monthValid)|round(2, 'floor')|number_format(2, ',', '.') }} € / mois <span class=\"line-through text-gray-500\">( au lieu de {{ priceMark|number_format(2, ',', '.') }}€)</span></span>
</label>
</div>
<div class=\"mt-5 text-xs text-gray-500\">
{% if row.monthValid>1 %}En un paiement de {{ row.getAmount()|number_format(2, ',', '.') }} € (<span class=\"text-decoration-line-through\" style=\"text-decoration: line-through\">{{ row.oldPrice }} €</span>) avec le code {{ row.discount.codePromo|upper }}.{% endif%} {% if row.monthValid<13 %}Renoulevé tous les {% if row.monthValid>1 %}{{ row.monthValid }}{% endif %} mois.{% endif %} Annulable à tout moment
</div>
</div>
</div>
{% endif %}
{% if loop.first %}
<div class=\"flex flex-col justify-center bg-jaunefonce sm:w-5/12 sm:p-5 p-3\">
<div class=\"flex flex-wrap font-bold items-center justify-center sm:justify-start\">Coup de<img src=\"/static/img/tunnel/coeur-rouge.png\" alt=\"Coup de coeur des parents\" class=\"px-1 sm:px-2 w-5 h-4 sm:w-auto\" />des parents</div>
<div class=\"mt-5 text-xs text-center sm:text-justify\">Inclus les annales du Bac et du Brevet corrigées en vidéo</div>
</div>
{% endif %}
</div>
{% endfor %}
{% set titre_faq = \"Comment fonctionne l’essai gratuit de 7 jours :\" %}
{% set faq = [
{
\"titre\":\"Pendant la période d’essai\",
\"texte\":\"Je teste tous les contenus compris dans mon abonnement, les stages de révision pendant les vacances et les boost matière.\"
},{
\"titre\":\"Comment arrêter l’essai gratuit\",
\"texte\": \"Avant la fin des 7 jours d’essai, rendez-vous dans la rubrique “gestion du compte” de votre espace parents et cliquez sur “mettre fin à la période d’essai”.\"
}] %}
{% if mode_free %}
<!--L'essai gratuit pour PC-->
<div class=\"mt-12 text-gray-500 hidden lg:block text-justify\">
<p class=\"font-bold\">
{{ titre_faq|raw }}
</p>
{% for row in faq %}
<p class=\"mt-5\">
<span class=\"font-bold\">{{ row.titre }}</span>
<br />
{{ row.texte }}
</p>
{% endfor %}
</div>
<!--Accordéon pour mobile-->
<div class=\"mt-12 py-2 px-3 border-gray-400 border-solid border rounded-md lg:hidden\" x-data=\"{selected: null}\">
<div>
<div>
<div class=\"w-full flex justify-between items-center cursor-pointer\"
@click=\"selected !== 1 ? selected = 1 : selected = null\"
>
<h4 class=\"font-bold text-gray-500\">{{ titre_faq|raw }}</h4>
<div class=\"pl-2\">
<img class=\"transition-all ease-in-out duration-700 min-w-4\" :class=\"selected === 1 ? 'rotate-180' : ''\" alt=\"chevron\" src=\"/static/img/tunnel/chevron.svg\" />
</div>
</div>
<div class=\"relative overflow-hidden max-h-0 transition-all ease-in-out duration-700\" x-ref=\"container1\" :style=\"selected === 1 ? 'max-height: ' + \$refs.container1.scrollHeight + 'px' : ''\">
<div class=\"pt-4 flex flex-col space-y-3\">
<div class=\"text-gray-500 text-justify\">
{% for row in faq %}
<p class=\"mt-5\">
<span class=\"font-bold\">{{ row.titre }}</span>
<br />
{{ row.texte }}
</p>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<!--Colonne droite-->
<div class=\"flex flex-col lg:w-5/12 my-16 lg:mt-0\">
<!--Encadré bleu-->
<div class=\"flex flex-col bg-bleu rounded-2xl\">
<div class=\"text-white font-bold text-center text-2xl py-5\">Ce que comprend l'offre {{ typeOffer.title }}</div>
<div class=\"flex flex-col bg-white m-2 rounded-2xl p-5\">
<div>
{% if typeOffer is not null %}
{{ typeOffer.textPaid|raw }}
{% endif %}
</div>
<label for=\"promo\" class=\"mt-8 sm:mt-16\">Vous disposez d'un code promotionel ? Indiquez-le ici :</label>
<div class=\"flex mt-5\">
<input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 border-0 py-1.5 pl-5 placeholder:text-gray-400 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-md shadow-sm ring-1 ring-inset ring-gray-300 w-[2vw]\" placeholder=\"Entrez le code promo\">
<button type=\"submit\" class=\"bg-jaunefonce px-3 py-2 text-xl font-bold text-white shadow-sm hover:bg-rouge rounded-r-3xl\" id=\"button-code-promo\">Valider</button>
</div>
<div class=\"\" id=\"tr-code\">
<div style=\"padding: 2%;\" class=\"mt-2\">
<div class=\"remise-appliquee font-bold\"></div>
<div id=\"text-percent\"></div>
</div>
</div>
<div class=\"grid grid-cols-[repeat(2,minmax(auto,auto))] gap-4 border-jaunefonce border-solid border-8 rounded-3xl mt-8 sm:mt-16 p-6 items-center\">
{% if mode_free %}
<span>Montant dû aujourd'hui</span>
<span>0 €</span>
<span>Montant dû {{ \"now\"|date_modify(\"+8 day\")|format_datetime(locale='fr',pattern=\"dd MMMM YYYY\") }}</span>
<span id=\"som-toto\"></span>
{% else %}
<span>Montant dû aujourd'hui</span>
<span id=\"som-toto\"></span>
{% endif %}
</div>
</div>
</div>
<!--Bouton-->
<div class=\"flex justify-center mt-10 cursor-pointer\">
<button type=\"submit\" class=\"bg-jaunefonce btn-form text-bleu rounded-3xl text-3xl font-muller py-3 px-20\">OK j'essaie</button>
<img src=\"/static/img/tunnel/clic-hand.png\" alt=\"Essayer l'offre\" class=\"absolute pl-60 pt-5 btn-form\" />
</div>
<!-- TrustBox widget - List pour PC-->
<div class=\"trustpilot-widget mt-20 hidden lg:block\" data-locale=\"fr-FR\" data-template-id=\"539ad60defb9600b94d7df2c\" data-businessunit-id=\"5c9c8063164d370001824ce4\" data-style-height=\"500px\" data-style-width=\"100%\" data-stars=\"4,5\" data-review-languages=\"fr\">
<a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\" rel=\"noopener\">Trustpilot</a>
</div>
<!-- TrustBox widget - Mini pour mobiles-->
<div class=\"trustpilot-widget lg:hidden mt-16\" data-locale=\"fr-FR\" data-template-id=\"53aa8807dec7e10d38f59f32\" data-businessunit-id=\"5c9c8063164d370001824ce4\" data-style-height=\"150px\" data-style-width=\"100%\">
<a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\" rel=\"noopener\">Trustpilot</a>
</div>
</div>
</div>
</section>
<form class=\"form-next-step-2\" action=\"{{ path('choix-formule-step') }}?offre={{ getOffer }}\" method=\"post\" id=\"parents_registration_first_step_{% if getOffer == \"essentielle\" %}essentielle{% else %}assistancevisio{% endif %}\">
</form>
<div class=\"u-spinner h-100 vh-100\">
<svg class=\"svg-icon svg-loader\" version=\"1.1\" id=\"L4\" xmlns=\"http://www.w3.org/2000/svg\"
xmlns:xlink=\"http://www.w3.org/1999/xlink\" x=\"0px\" y=\"0px\" viewBox=\"0 0 50 100\" enable-background=\"new 0 0 0 0\"
xml:space=\"preserve\">
<circle cx=\"0\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.1\"></animate>
</circle>
<circle cx=\"20\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.2\"></animate>
</circle>
<circle cx=\"41\" cy=\"50\" r=\"6\">
<animate attributeName=\"opacity\" dur=\"1s\" values=\"0;1;0\" repeatCount=\"indefinite\" begin=\"0.3\"></animate>
</circle>
</svg>
</div>
{% block javascripts %}
{{ encore_entry_script_tags('tunnel') }}
{% endblock %}
<script type=\"text/javascript\">
\$(document).ready(function(){
function calculPrice(){
var nbrChild = parseInt(\$('#nbr-child').val());
var som = 0;
if(\$('input[name=\"price\"]:checked').length==1){
var period = \$('input[name=\"price\"]:checked').attr('data-period');
var month = \$('input[name=\"price\"]:checked').attr('data-month');
var price = \$('input[name=\"price\"]:checked').attr('data-price');
var realPrice = parseFloat(price);
for(var i = 0;i<nbrChild;i++){
if(i==0){
if(\$('#button-code-promo').is(\"[data-percent]\")){
var percent = \$('#button-code-promo').attr('data-percent');
if(\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*(parseFloat(percent)/100));
}else{
som= som + realPrice
}
}else{
som= som + realPrice
}
}
if(i==1){
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.2);
}else{
som = som + (realPrice - realPrice*0.35);
}
}
if(2<=i){
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
som = som + (realPrice - realPrice*0.3);
}else{
som = som + (realPrice - realPrice*0.45);
}
}
}
\$('#som-toto').text('').text((som.toFixed(2)).replaceAll('.',',')+' €');
\$('#som-toto').attr('data-som',som.toFixed(2))
\$('.total-price').text(' / '+period);
}
}
\$('#nbr-child').change(function(){
var val = \$(this).val();
calculPrice();
if(\$('.form-next-step-2').find('input[name=\"child\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"child\" value=\"'+val+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"child\"]').val(val);
}
})
var percent = 0;
var coupon
\$('#button-code-promo').click(function(){
if (\$('input[name=\"price\"]:checked').length==1){
var priceId = \$('input[name=\"price\"]:checked').attr('data-id');
var self = \$(this);
\$(this).prev().removeClass('is-invalid');
coupon = \$(this).prev().val();
self.parent().parent().find('.invalid-feedback').text('')
\$.ajax({
url:\"{{ path('valid_coupon') }}\",
data:\"coupon=\"+coupon,
success:function(elem){
var verif= true;
self.parent().find('input').val('');
if(elem.success){
if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
verif = false;
}
if(verif){
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"discount\" value=\"'+elem.data.code+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"discount\"]').val(elem.data.code);
}
percent = elem.data.percent;
self.attr('data-percent',percent);
//\$('#text-percent').text('').text('reduction de '+percent+'%')
\$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
self.addClass('js-calculate-auto')
calculPrice();
}
}
if(!elem.success || !verif){
self.parents('.input-group').parent().find('.invalid-feedback').text('').text('Ce code promo est invalide !');
if(!self.parents('.input-group').find('input').hasClass('is-invalid')){
self.parents('.input-group').find('input').addClass('is-invalid');
}
}
}
})
}else{
alert('Veuillez choisir une durée de votre offre')
}
})
\$('input[name=\"price\"]').change(function(){
if(\$(this).is(':checked')){
var price = parseFloat(\$(this).attr('data-price'));
var period = \$(this).attr('data-period');
var offer = \$(this).val();
var month = \$(this).attr('data-month');
if(\$(this).hasClass('js-auto-discount')){
var coupon = \$(this).attr('data-discount');
\$('.u-spinner').addClass('open')
\$.ajax({
url:\"{{ path('valid_coupon') }}\",
data:\"coupon=\"+coupon,
success:function(elem){
if(elem.success){
//\$('#tr-code').removeClass('d-none')
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"discount\" value=\"'+elem.data.code+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"discount\"]').val(elem.data.code);
}
percent = elem.data.percent;
\$('#button-code-promo').attr('data-percent',percent);
if(!\$('#button-code-promo').hasClass('js-calculate-auto')){
\$('#button-code-promo').addClass('js-calculate-auto')
}
// self.attr('data-percent',percent);
//\$('#text-percent').text('').text('reduction de '+percent+'%')
\$('.remise-appliquee').text('').text('Promotion appliquée : '+elem.data.description);
calculPrice();
\$('.u-spinner').removeClass('open')
}
}
})
}else{
\$('#button-code-promo').attr('data-percent',0);
if(\$('.form-next-step-2').find('input[name=\"discount\"]').length==1){
\$('.form-next-step-2').find('input[name=\"discount\"]').remove()
}
//\$('#text-percent').text('')
\$('.remise-appliquee').text('');
calculPrice()
}
if(\$('.form-next-step-2').find('input[name=\"offer\"]').length==0){
\$('.form-next-step-2').append('<input type=\"hidden\" name=\"offer\" value=\"'+offer+'\"/>')
}else{
\$('.form-next-step-2').find('input[name=\"offer\"]').val(offer);
}
// \$('#text-toto-offer-period').removeClass('d-none').addClass('d-block')
// \$('#toto-offer-period').text(period.toLowerCase())
}
})
\$('input[name=\"price\"]').change()
\$('.btn-form').click(function(){
if(\$('.form-next-step-2').find('input[name=\"offer\"]').length==0){
}else{
fbq('track', 'AddToCart', {
content_name: \$('input[name=\"price\"]:checked').data('title'),
content_category: '{{ typeOffer.title|upper }}',
content_ids: [\$('input[name=\"price\"]:checked').val()],
content_type: 'product',
value: \$('#som-toto').data('som'),
currency: 'EUR'
});
\$('.form-next-step-2').submit();
}
})
{% if not getPrice %}
\$('.show-mentor #p-1').click();
{% endif %}
})
</script>
</body>
", "front/tunnel/step1.html.twig", "/var/www/dashboard/templates/front/tunnel/step1.html.twig");
}
}