<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\MacroNamespace;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Sandbox\SecurityNotAllowedTestError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/tunnel/step1a.html.twig */
class __TwigTemplate_e3becf286465203dda5576c9cbf3e45d extends Template
{
private Source $source;
/**
* @var array<string, MacroNamespace>
*/
private array $macros = [];
private \Twig\Runtime\EscaperRuntime $escaper;
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->escaper = $env->getRuntime('Twig\Runtime\EscaperRuntime');
$this->blocks = [
'head' => [$this, 'block_head'],
'body' => [$this, 'block_body'],
'javascripts' => [$this, 'block_javascripts'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return $this->parent ??= $this->load("front/tunnel/layout.html.twig", 1);
}
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/step1a.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/step1a.html.twig"));
$this->parent = $this->load("front/tunnel/layout.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 2
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_head(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", "head"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "head"));
// line 3
yield " <title>Étape 1</title>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body(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", "body"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "body"));
// line 6
yield "
<!-- Timeline -->
<section class=\"w-full py-10 sm:py-20\">
<ol class=\"flex flex-row w-full\">
<!--first item-->
<li class=\"relative flex-1\">
<div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-bleuindigo border-4 border-bleuindigo\"></div>
<p class=\"mt-4 sm:mt-2 text-sm sm:text-lg font-bold text-bleuindigo text-center px-2\">
1. Je sélectionne la durée
</p>
</div>
</li>
<!--Second item-->
<li class=\"relative flex-1\">
<div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-lavande\"></div>
<p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
2. J\x27accède à mon compte
</p>
</div>
</li>
<!--Third item-->
<li class=\"relative flex-1\">
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-lavande\"></div>
<p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
3. Je procède au paiement
</p>
</div>
</li>
</ol>
</section>
";
// line 47
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.', 47, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 48
yield " <section class=\"flex justify-center mb-8 sm:mb-16\">
<div class=\"text-center bg-jaune text-bleuindigo font-bold py-2 px-4 rounded-full text-sm sm:text-lg\">
Vous ne serez pas débité avant la fin de votre essai de 7 jours, résiliable à tout moment.
</div>
</section>
";
}
// line 54
yield "
<!--Offres-->
<section class=\"flex justify-center\">
<div class=\"flex flex-col lg:flex-row justify-between\">
<!--Colonne gauche-->
<div class=\"flex flex-col lg:w-6/12 xl:w-7/12\">
";
// line 61
if ( !(($tmp = (isset($context["fromDashboardParent"]) || array_key_exists("fromDashboardParent", $context) ? $context["fromDashboardParent"] : (function () { throw new RuntimeError('Variable "fromDashboardParent" does not exist.', 61, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 62
yield " <div>
<label for=\"enfants\" class=\"text-bleuindigo 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=\"nbr-child\" class=\"block rounded-3xl border-lavande py-1.5 text-gris text-sm\">
<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=\"text-xs text-framboise font-bold ml-5\">
<p>-50% pour chaque enfant supplémentaire</p>
</div>
</div>
</div>
";
} else {
// line 82
yield " <input type=\"hidden\" name=\"nbr-child\" value=\"1\" id=\"nbr-child\">
";
}
// line 84
yield " <div>
<p class=\"text-bleuindigo mt-14\">Sélectionnez la durée</p>
</div>
";
// line 87
$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.', 87, $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 88
yield " ";
$context["noDiscountAuto"] = ((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 88)) || ( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 88)) && ($this->extensions['Twig\Extension\CoreExtension']->formatDate(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discountDate", [], "any", false, false, false, 88), "U") < $this->extensions['Twig\Extension\CoreExtension']->formatDate("now", "U"))));
// line 89
yield " ";
if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 89, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 90
yield " ";
$context["priceReducePercent"] = abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 90) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 90)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 90, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 90, $this->source); })())) * 100), 0, ",", "."));
// line 91
yield " ";
} else {
// line 92
yield " ";
$context["priceReducePercent"] = (((null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 92))) ? (abs($this->extensions['Twig\Extension\CoreExtension']->formatNumber(((((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 92) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 92)) - (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 92, $this->source); })())) / (isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 92, $this->source); })())) * 100), 0, ",", "."))) : (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 92)));
// line 93
yield " ";
}
// line 94
yield " ";
$context["amount"] = (((($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 94, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 94)) : (CoreExtension::getAttribute($this->env, $this->source, $context["row"], "getAmount", [], "method", false, false, false, 94)));
// line 95
yield " <!--Carte 24 mois-->
<div class=\"flex flex-col sm:flex-row lg:flex-col xl:flex-row items-start relative justify-between border-lavande border rounded-lg p-5 mt-2\">
";
// line 97
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 97)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 98
yield " <div class=\"flex items-center absolute text-bleuindigo text-[10px] font-bold bg-jaune rounded-xl px-2 -top-[8px] right-[20px]\"><span class=\"text-lg -my-1 pr-1\">♥</span> LE CHOIX DES PARENTS</div>
";
}
// line 100
yield " <div class=\"flex items-center gap-x-3\">
<input id=\"p-";
// line 101
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 101), "html", null, true);
yield "\" name=\"price\" type=\"radio\" value=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "slug", [], "any", false, false, false, 101), "html", null, true);
yield "\" class=\"input-price h-4 w-4 border-lavande";
if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 101, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield " js-auto-discount";
}
yield "\" ";
if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 101, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
yield "data-discount=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "codePromo", [], "any", false, false, false, 101), "html", null, true);
yield "\" data-multi-discount=\"";
if ( !(null === CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "moreChildReduce", [], "any", false, false, false, 101))) {
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["row"], "discount", [], "any", false, false, false, 101), "moreChildReduce", [], "any", false, false, false, 101), "percent", [], "any", false, false, false, 101), "html", null, true);
}
yield "\"";
}
yield " data-id=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "id", [], "any", false, false, false, 101), "html", null, true);
yield "\" data-title=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "title", [], "any", false, false, false, 101), "html", null, true);
yield "\" data-price=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "price", [], "any", false, false, false, 101), "html", null, true);
yield "\" data-month=\"";
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101), "html", null, true);
yield "\" data-period=\"";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101) > 1)) {
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 101), "html", null, true);
}
yield " mois\">
<label for=\"p-";
// line 102
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 102), "html", null, true);
yield "\" class=\"flex flex-row items-center text-nowrap\">
<span class=\"text-bleuindigo font-bold text-xl mr-5\">";
// line 103
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 103), "html", null, true);
yield " mois</span>
";
// line 104
if (((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 104) > 1) || (($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 104)) && $tmp instanceof Markup ? (string) $tmp : $tmp))) {
// line 105
yield " <span class=\"text-white bg-pervenche text-[10px] rounded-4xl py-1 px-2\">";
if (( !(null === CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105)) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105)))) {
yield (string) $this->escaper->escape(CoreExtension::getAttribute($this->env, $this->source, $context["row"], "percentDiscount", [], "any", false, false, false, 105), "html", null, true);
} else {
yield (string) $this->escaper->escape((isset($context["priceReducePercent"]) || array_key_exists("priceReducePercent", $context) ? $context["priceReducePercent"] : (function () { throw new RuntimeError('Variable "priceReducePercent" does not exist.', 105, $this->source); })()), "html", null, true);
}
yield "% DE RÉDUCTION</span>
";
}
// line 107
yield " </label>
</div>
<div class=\"flex flex-col sm:items-end sm:w-full sm:size-auto lg:w-full xl:size-auto sm:text-right mt-4 sm:mt-0\">
<span class=\"text-xl\">
<span class=\"text-pervenche sm:text-bleuindigo font-bold\">";
// line 111
yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round(((isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 111, $this->source); })()) / CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 111)), 2, "floor"), 2, ",", "."), "html", null, true);
yield "€/mois</span>
</span>
";
// line 113
if ( !(($tmp = (isset($context["noDiscountAuto"]) || array_key_exists("noDiscountAuto", $context) ? $context["noDiscountAuto"] : (function () { throw new RuntimeError('Variable "noDiscountAuto" does not exist.', 113, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 114
yield " <span class=\"text-base line-through\">";
yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(Twig\Extension\CoreExtension::round((isset($context["priceMark"]) || array_key_exists("priceMark", $context) ? $context["priceMark"] : (function () { throw new RuntimeError('Variable "priceMark" does not exist.', 114, $this->source); })()), 2, "floor"), 2, ",", "."), "html", null, true);
yield "€/mois</span>
";
}
// line 116
yield " <span class=\"text-xs\">";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 116) > 1)) {
yield "Paiement unique de ";
yield (string) $this->escaper->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber((isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 116, $this->source); })()), 2, ",", "."), "html", null, true);
yield " €";
if ((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 116) < 13)) {
yield ", reconduction tacite, annulable à tout moment";
} else {
yield ".";
}
} else {
yield "Sans engagement, reconduction tacite";
}
yield "</span>
";
// line 117
if (((CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 117) > 1) && (($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["row"], "displayEcoText", [], "any", false, false, false, 117)) && $tmp instanceof Markup ? (string) $tmp : $tmp))) {
yield " <span class=\"text-xs text-pervenche\">soit ";
yield (string) $this->escaper->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.', 117, $this->source); })()) * CoreExtension::getAttribute($this->env, $this->source, $context["row"], "monthValid", [], "any", false, false, false, 117)) - (isset($context["amount"]) || array_key_exists("amount", $context) ? $context["amount"] : (function () { throw new RuntimeError('Variable "amount" does not exist.', 117, $this->source); })())), 2, ",", "."), "html", null, true);
yield "€ économisés</span>";
}
// line 118
yield " </div>
</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);
$context += $_parent;
// line 121
yield " </div>
<!--Colonne droite-->
<div class=\"flex flex-col lg:w-5/12 xl:w-4/12 my-16 lg:mt-0\">
<!--Encadré lavande-->
<div class=\"flex flex-col bg-lavandeclair rounded-2xl text-sm sm:text-base gap-y-2 p-5 sm:p-10\">
<div class=\"text-bleuindigo font-bold text-xl\">
Vous avez choisi l’offre
</div>
<div class=\"text-pervenche font-bold text-2xl sm:text-3xl\">
";
// line 134
yield (string) $this->escaper->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.', 134, $this->source); })()), "title", [], "any", false, false, false, 134)), "html", null, true);
yield "
</div>
<div class=\"text-lavande text-xs font-bold\">
<a href=\"https://www.lesbonsprofs.com/nos-offres/\" class=\"flex items-center hover:underline\"><img src=\"/static/img/tunnel/stylo.webp\" alt=\"Changer d\x27offre\" class=\"w-3 mr-1\">Changer d\x27offre</a>
</div>
<div class=\"font-bold mt-2\">
";
// line 140
yield (string) 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.', 140, $this->source); })()), "textPaid", [], "any", false, false, false, 140);
yield "
</div>
<div class=\"flex justify-between items-center mt-4\">
<span class=\"flex text-bleuindigo font-bold\">
<span class=\"flex items-center bg-jaune rounded-xl px-2 mr-1\"><span class=\"text-lg -my-1 pr-1\">★</span> 4,6</span>+ 300 avis Trustpilot
</span>
<span class=\"text-pervenche text-xs hover:underline\"><a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\">Voir les avis</a></span>
</div>
";
// line 148
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.', 148, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 149
yield " <div class=\"flex justify-between text-franboise font-bold mt-4\">
<span>Montant dû aujourd\x27hui</span>
<span>0€</span>
</div>
<hr class=\"border-lavande border my-2\" />
<div class=\"flex justify-between text-bleuindigo\">
<span>Montant dû au ";
// line 155
yield (string) $this->escaper->escape($this->extensions['Twig\Extra\Intl\IntlExtension']->formatDateTime($this->env, $this->extensions['Twig\Extension\CoreExtension']->modifyDate("now", "+8 day"), null, null, "dd MMMM YYYY", null, null, "fr"), "html", null, true);
yield "</span>
<span class=\"font-bold\" id=\"som-toto\"></span>
</div>
";
} else {
// line 159
yield " <div class=\"flex justify-between text-franboise font-bold mt-4\">
<span>Montant dû aujourd\x27hui</span>
<span id=\"som-toto\"></span>
</div>
";
}
// line 164
yield " <button type=\"submit\" class=\"bg-framboise hover:bg-bleuindigo hover:cursor-pointer text-white rounded-3xl font-bold py-3 mt-4 btn-form\">Démarrer l\x27essai gratuit</button>
<div class=\"flex items-center text-pervenche font-bold mt-4\">
<img src=\"/static/img/tunnel/coupon.webp\" alt=\"Code promo\" class=\"w-5 mr-2\">Vous avez un code promo ?
</div>
<div class=\"flex mt-1\">
<input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 py-1.5 pl-5 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-3xl border-lavande border\" placeholder=\"Entrez votre code promo\">
<button type=\"submit\" class=\"bg-pervenche px-3 py-2 text-3xl font-bold text-white shadow-xs hover:bg-framboise hover:cursor-pointer rounded-r-3xl\" id=\"button-code-promo\">→</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>
</div>
</div>
</section>
<form class=\"form-next-step-2\" action=\"";
// line 184
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("choix-formule-step");
yield "?offre=";
yield (string) $this->escaper->escape((isset($context["getOffer"]) || array_key_exists("getOffer", $context) ? $context["getOffer"] : (function () { throw new RuntimeError('Variable "getOffer" does not exist.', 184, $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.', 184, $this->source); })()) == "essentielle")) {
yield "essentielle";
} else {
yield "assistancevisio";
}
yield "\">
</form>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
// line 188
/**
* @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 189
yield "
<!--footer-->
<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js\"></script>
<script type=\"text/javascript\">
\$(document).ready(function(){
function calculPrice(){
var nbrChild = parseInt(\$(\x27#nbr-child\x27).val());
var som = 0;
if(\$(\x27input[name=\"price\"]:checked\x27).length==1){
var period = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-period\x27);
var month = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-month\x27);
var price = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-price\x27);
var realPrice = parseFloat(price);
var multiPercent = 50;
var percent = \x27null\x27;
var moreChildrenActive = ";
// line 208
yield (string) (((($tmp = (isset($context["moreChildrenActive"]) || array_key_exists("moreChildrenActive", $context) ? $context["moreChildrenActive"] : (function () { throw new RuntimeError('Variable "moreChildrenActive" does not exist.', 208, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (1) : (0));
yield ";
if(\$(\x27#button-code-promo\x27).is(\"[data-percent]\")){
percent = \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27);
multiPercent = \$(\x27#button-code-promo\x27).attr(\x27data-multi-percent\x27)
}
if(\$(\x27input[name=\"price\"]:checked\x27).is(\x27[data-multi-discount]\x27)){
multiPercent = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-multi-discount\x27);
}
var priceMoreChild = (realPrice - realPrice*(parseFloat(multiPercent)/100));
for(var i = 0;i<nbrChild;i++){
if(percent != \x27null\x27 && percent != 0){
if( moreChildrenActive || i>0){
som = som + priceMoreChild;
}else{
som = som + (realPrice - realPrice*(parseFloat(percent)/100));
}
}else{
if(moreChildrenActive || i>0){
som = som + priceMoreChild;
}else{
som = som + realPrice;
}
}
}
\$(\x27#som-toto\x27).text(\x27\x27).text((som.toFixed(2)).replaceAll(\x27.\x27,\x27,\x27)+\x27 €\x27);
\$(\x27#som-toto\x27).attr(\x27data-som\x27,som.toFixed(2))
\$(\x27.total-price\x27).text(\x27 / \x27+period);
}
}
\$(\x27#nbr-child\x27).change(function(){
var val = \$(this).val();
calculPrice();
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"child\" value=\"\x27+val+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).val(val);
}
})
var percent = 0;
var coupon
\$(\x27#button-code-promo\x27).click(function(){
if (\$(\x27input[name=\"price\"]:checked\x27).length==1){
var priceId = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-id\x27);
var self = \$(this);
\$(this).prev().removeClass(\x27is-invalid\x27);
coupon = \$(this).prev().val();
self.parent().parent().find(\x27.invalid-feedback\x27).text(\x27\x27)
\$.ajax({
url:\"";
// line 267
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
yield "\",
data:\"coupon=\"+coupon,
success:function(elem){
var verif= true;
self.parent().find(\x27input\x27).val(\x27\x27);
if(elem.success){
if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
verif = false;
}
if(verif){
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
}
percent = elem.data.percent;
self.attr(\x27data-percent\x27,percent);
self.attr(\x27data-multi-percent\x27,elem.data.percentMulti);
//\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27).html(\x27<span class=\"font-bold me-2\">Promotion appliquée :</span>\x27+elem.data.description);
self.addClass(\x27js-calculate-auto\x27);
calculPrice();
}
}
if(!elem.success || !verif){
self.parents(\x27.input-group\x27).parent().find(\x27.invalid-feedback\x27).text(\x27\x27).text(\x27Ce code promo est invalide !\x27);
if(!self.parents(\x27.input-group\x27).find(\x27input\x27).hasClass(\x27is-invalid\x27)){
self.parents(\x27.input-group\x27).find(\x27input\x27).addClass(\x27is-invalid\x27);
}
}
}
})
}else{
alert(\x27Veuillez choisir une durée de votre offre\x27)
}
})
\$(\x27input[name=\"price\"]\x27).change(function(){
if(\$(this).is(\x27:checked\x27)){
var price = parseFloat(\$(this).attr(\x27data-price\x27));
var period = \$(this).attr(\x27data-period\x27);
var offer = \$(this).val();
var month = \$(this).attr(\x27data-month\x27);
if(\$(this).hasClass(\x27js-auto-discount\x27)){
var coupon = \$(this).attr(\x27data-discount\x27);
\$(\x27.u-spinner\x27).addClass(\x27open\x27)
\$.ajax({
url:\"";
// line 328
yield (string) $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("valid_coupon");
yield "\",
data:\"coupon=\"+coupon,
success:function(elem){
if(elem.success){
//\$(\x27#tr-code\x27).removeClass(\x27d-none\x27)
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
}
percent = elem.data.percent;
\$(\x27#button-code-promo\x27).attr(\x27data-percent\x27,percent);
if(!\$(\x27#button-code-promo\x27).hasClass(\x27js-calculate-auto\x27)){
\$(\x27#button-code-promo\x27).addClass(\x27js-calculate-auto\x27)
}
// self.attr(\x27data-percent\x27,percent);
//\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27).text(\x27Promotion appliquée : \x27+elem.data.description);
calculPrice();
}
\$(\x27.u-spinner\x27).removeClass(\x27open\x27)
}
})
}else{
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==1){
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).remove()
}
//\$(\x27#text-percent\x27).text(\x27\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27);
calculPrice()
}
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"offer\" value=\"\x27+offer+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).val(offer);
}
// \$(\x27#text-toto-offer-period\x27).removeClass(\x27d-none\x27).addClass(\x27d-block\x27)
// \$(\x27#toto-offer-period\x27).text(period.toLowerCase())
}
})
\$(\x27input[name=\"price\"]\x27).change()
\$(\x27.btn-form\x27).click(function(){
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
}else{
\$(\x27.form-next-step-2\x27).submit();
}
})
";
// line 388
if ( !(($tmp = (isset($context["getPrice"]) || array_key_exists("getPrice", $context) ? $context["getPrice"] : (function () { throw new RuntimeError('Variable "getPrice" does not exist.', 388, $this->source); })())) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 389
yield " \$(\x27#p-1\x27).click();
";
} else {
// line 391
yield " \$(\x27.input-price[data-id=\"";
yield (string) $this->escaper->escape((isset($context["getPrice"]) || array_key_exists("getPrice", $context) ? $context["getPrice"] : (function () { throw new RuntimeError('Variable "getPrice" does not exist.', 391, $this->source); })()), "html", null, true);
yield "\"]\x27).click();
";
}
// line 393
yield "
})
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
return; yield;
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/tunnel/step1a.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDefaultEscapeStrategy(): string|false
{
return "html";
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 703 => 393, 697 => 391, 693 => 389, 691 => 388, 628 => 328, 564 => 267, 502 => 208, 481 => 189, 468 => 188, 445 => 184, 423 => 164, 416 => 159, 409 => 155, 401 => 149, 399 => 148, 388 => 140, 379 => 134, 364 => 121, 347 => 118, 341 => 117, 325 => 116, 319 => 114, 317 => 113, 312 => 111, 306 => 107, 296 => 105, 294 => 104, 290 => 103, 286 => 102, 254 => 101, 251 => 100, 247 => 98, 245 => 97, 241 => 95, 238 => 94, 235 => 93, 232 => 92, 229 => 91, 226 => 90, 223 => 89, 220 => 88, 203 => 87, 198 => 84, 194 => 82, 172 => 62, 170 => 61, 161 => 54, 153 => 48, 151 => 47, 108 => 6, 95 => 5, 83 => 3, 70 => 2, 47 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% extends \x27front/tunnel/layout.html.twig\x27 %}
{% block head %}
<title>Étape 1</title>
{% endblock %}
{% block body %}
<!-- Timeline -->
<section class=\"w-full py-10 sm:py-20\">
<ol class=\"flex flex-row w-full\">
<!--first item-->
<li class=\"relative flex-1\">
<div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-bleuindigo border-4 border-bleuindigo\"></div>
<p class=\"mt-4 sm:mt-2 text-sm sm:text-lg font-bold text-bleuindigo text-center px-2\">
1. Je sélectionne la durée
</p>
</div>
</li>
<!--Second item-->
<li class=\"relative flex-1\">
<div class=\"absolute top-2 left-1/2 w-full h-1.25 bg-lavande\"></div>
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-lavande\"></div>
<p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
2. J\x27accède à mon compte
</p>
</div>
</li>
<!--Third item-->
<li class=\"relative flex-1\">
<div class=\"relative z-10 flex flex-col items-center\">
<div class=\"size-5 rounded-full bg-lavande\"></div>
<p class=\"mt-4 text-sm font-bold text-lavande text-center px-2\">
3. Je procède au paiement
</p>
</div>
</li>
</ol>
</section>
{% if mode_free %}
<section class=\"flex justify-center mb-8 sm:mb-16\">
<div class=\"text-center bg-jaune text-bleuindigo font-bold py-2 px-4 rounded-full text-sm sm:text-lg\">
Vous ne serez pas débité avant la fin de votre essai de 7 jours, résiliable à tout moment.
</div>
</section>
{% endif %}
<!--Offres-->
<section class=\"flex justify-center\">
<div class=\"flex flex-col lg:flex-row justify-between\">
<!--Colonne gauche-->
<div class=\"flex flex-col lg:w-6/12 xl:w-7/12\">
{% if not fromDashboardParent %}
<div>
<label for=\"enfants\" class=\"text-bleuindigo 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=\"nbr-child\" class=\"block rounded-3xl border-lavande py-1.5 text-gris text-sm\">
<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=\"text-xs text-framboise font-bold ml-5\">
<p>-50% pour chaque enfant supplémentaire</p>
</div>
</div>
</div>
{% else %}
<input type=\"hidden\" name=\"nbr-child\" value=\"1\" id=\"nbr-child\">
{% endif %}
<div>
<p class=\"text-bleuindigo mt-14\">Sélectionnez la durée</p>
</div>
{% for row in listOffer %}
{% set noDiscountAuto = row.discount is null or (row.discountDate is not null and row.discountDate|date(\x27U\x27) < \"now\"|date(\x27U\x27) ) %}
{% if not noDiscountAuto %}
{% set priceReducePercent = (((((row.price/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, \x27,\x27, \x27.\x27)|abs) %}
{% else %}
{% set priceReducePercent = row.percentDiscount is null?(((((row.getAmount()/row.monthValid) - priceMark)/priceMark) * 100)|number_format(0, \x27,\x27, \x27.\x27)|abs) : row.percentDiscount %}
{% endif %}
{% set amount = noDiscountAuto ? row.price : row.getAmount() %}
<!--Carte 24 mois-->
<div class=\"flex flex-col sm:flex-row lg:flex-col xl:flex-row items-start relative justify-between border-lavande border rounded-lg p-5 mt-2\">
{% if loop.first %}
<div class=\"flex items-center absolute text-bleuindigo text-[10px] font-bold bg-jaune rounded-xl px-2 -top-[8px] right-[20px]\"><span class=\"text-lg -my-1 pr-1\">♥</span> LE CHOIX DES PARENTS</div>
{% endif %}
<div class=\"flex items-center gap-x-3\">
<input id=\"p-{{ loop.index }}\" name=\"price\" type=\"radio\" value=\"{{ row.slug }}\" class=\"input-price h-4 w-4 border-lavande{% if not noDiscountAuto %} js-auto-discount{% endif %}\" {% if not noDiscountAuto%}data-discount=\"{{ row.discount.codePromo }}\" data-multi-discount=\"{% if row.discount.moreChildReduce is not null %}{{ row.discount.moreChildReduce.percent }}{% endif %}\"{% endif%} 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=\"flex flex-row items-center text-nowrap\">
<span class=\"text-bleuindigo font-bold text-xl mr-5\">{{ row.monthValid }} mois</span>
{% if row.monthValid>1 or row.percentDiscount %}
<span class=\"text-white bg-pervenche text-[10px] rounded-4xl py-1 px-2\">{% if row.percentDiscount is not null and row.percentDiscount is not empty %}{{ row.percentDiscount }}{% else %}{{ priceReducePercent }}{% endif %}% DE RÉDUCTION</span>
{% endif%}
</label>
</div>
<div class=\"flex flex-col sm:items-end sm:w-full sm:size-auto lg:w-full xl:size-auto sm:text-right mt-4 sm:mt-0\">
<span class=\"text-xl\">
<span class=\"text-pervenche sm:text-bleuindigo font-bold\">{{ (amount/row.monthValid)|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}€/mois</span>
</span>
{% if not noDiscountAuto %}
<span class=\"text-base line-through\">{{ priceMark|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}{#{{ (row.price/row.monthValid)|round(2, \x27floor\x27)|number_format(2, \x27,\x27, \x27.\x27) }}#}€/mois</span>
{% endif %}
<span class=\"text-xs\">{% if row.monthValid>1 %}Paiement unique de {{ amount|number_format(2, \x27,\x27, \x27.\x27) }} €{% if row.monthValid<13 %}, reconduction tacite, annulable à tout moment{% else %}.{% endif %}{% else %}Sans engagement, reconduction tacite{% endif%}</span>
{% if row.monthValid > 1 and row.displayEcoText %} <span class=\"text-xs text-pervenche\">soit {{ (priceMark * row.monthValid - amount)|number_format(2, \x27,\x27, \x27.\x27) }}€ économisés</span>{% endif%}
</div>
</div>
{% endfor %}
</div>
<!--Colonne droite-->
<div class=\"flex flex-col lg:w-5/12 xl:w-4/12 my-16 lg:mt-0\">
<!--Encadré lavande-->
<div class=\"flex flex-col bg-lavandeclair rounded-2xl text-sm sm:text-base gap-y-2 p-5 sm:p-10\">
<div class=\"text-bleuindigo font-bold text-xl\">
Vous avez choisi l’offre
</div>
<div class=\"text-pervenche font-bold text-2xl sm:text-3xl\">
{{ typeOffer.title|upper }}
</div>
<div class=\"text-lavande text-xs font-bold\">
<a href=\"https://www.lesbonsprofs.com/nos-offres/\" class=\"flex items-center hover:underline\"><img src=\"/static/img/tunnel/stylo.webp\" alt=\"Changer d\x27offre\" class=\"w-3 mr-1\">Changer d\x27offre</a>
</div>
<div class=\"font-bold mt-2\">
{{ typeOffer.textPaid|raw }}
</div>
<div class=\"flex justify-between items-center mt-4\">
<span class=\"flex text-bleuindigo font-bold\">
<span class=\"flex items-center bg-jaune rounded-xl px-2 mr-1\"><span class=\"text-lg -my-1 pr-1\">★</span> 4,6</span>+ 300 avis Trustpilot
</span>
<span class=\"text-pervenche text-xs hover:underline\"><a href=\"https://fr.trustpilot.com/review/lesbonsprofs.com\" target=\"_blank\">Voir les avis</a></span>
</div>
{% if mode_free %}
<div class=\"flex justify-between text-franboise font-bold mt-4\">
<span>Montant dû aujourd\x27hui</span>
<span>0€</span>
</div>
<hr class=\"border-lavande border my-2\" />
<div class=\"flex justify-between text-bleuindigo\">
<span>Montant dû au {{ \"now\"|date_modify(\"+8 day\")|format_datetime(locale=\x27fr\x27,pattern=\"dd MMMM YYYY\") }}</span>
<span class=\"font-bold\" id=\"som-toto\"></span>
</div>
{% else %}
<div class=\"flex justify-between text-franboise font-bold mt-4\">
<span>Montant dû aujourd\x27hui</span>
<span id=\"som-toto\"></span>
</div>
{% endif %}
<button type=\"submit\" class=\"bg-framboise hover:bg-bleuindigo hover:cursor-pointer text-white rounded-3xl font-bold py-3 mt-4 btn-form\">Démarrer l\x27essai gratuit</button>
<div class=\"flex items-center text-pervenche font-bold mt-4\">
<img src=\"/static/img/tunnel/coupon.webp\" alt=\"Code promo\" class=\"w-5 mr-2\">Vous avez un code promo ?
</div>
<div class=\"flex mt-1\">
<input type=\"text\" name=\"promo\" id=\"promo\" autocomplete=\"username\" class=\"flex-1 py-1.5 pl-5 placeholder:text-[3.5vw] sm:placeholder:text-[16px] rounded-l-3xl border-lavande border\" placeholder=\"Entrez votre code promo\">
<button type=\"submit\" class=\"bg-pervenche px-3 py-2 text-3xl font-bold text-white shadow-xs hover:bg-framboise hover:cursor-pointer rounded-r-3xl\" id=\"button-code-promo\">→</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>
</div>
</div>
</section>
<form class=\"form-next-step-2\" action=\"{{ path(\x27choix-formule-step\x27) }}?offre={{ getOffer }}\" method=\"post\" id=\"parents_registration_first_step_{% if getOffer == \"essentielle\" %}essentielle{% else %}assistancevisio{% endif %}\">
</form>
{% endblock %}
{% block javascripts %}
<!--footer-->
<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js\"></script>
<script type=\"text/javascript\">
\$(document).ready(function(){
function calculPrice(){
var nbrChild = parseInt(\$(\x27#nbr-child\x27).val());
var som = 0;
if(\$(\x27input[name=\"price\"]:checked\x27).length==1){
var period = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-period\x27);
var month = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-month\x27);
var price = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-price\x27);
var realPrice = parseFloat(price);
var multiPercent = 50;
var percent = \x27null\x27;
var moreChildrenActive = {{ moreChildrenActive?1:0 }};
if(\$(\x27#button-code-promo\x27).is(\"[data-percent]\")){
percent = \$(\x27#button-code-promo\x27).attr(\x27data-percent\x27);
multiPercent = \$(\x27#button-code-promo\x27).attr(\x27data-multi-percent\x27)
}
if(\$(\x27input[name=\"price\"]:checked\x27).is(\x27[data-multi-discount]\x27)){
multiPercent = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-multi-discount\x27);
}
var priceMoreChild = (realPrice - realPrice*(parseFloat(multiPercent)/100));
for(var i = 0;i<nbrChild;i++){
if(percent != \x27null\x27 && percent != 0){
if( moreChildrenActive || i>0){
som = som + priceMoreChild;
}else{
som = som + (realPrice - realPrice*(parseFloat(percent)/100));
}
}else{
if(moreChildrenActive || i>0){
som = som + priceMoreChild;
}else{
som = som + realPrice;
}
}
}
\$(\x27#som-toto\x27).text(\x27\x27).text((som.toFixed(2)).replaceAll(\x27.\x27,\x27,\x27)+\x27 €\x27);
\$(\x27#som-toto\x27).attr(\x27data-som\x27,som.toFixed(2))
\$(\x27.total-price\x27).text(\x27 / \x27+period);
}
}
\$(\x27#nbr-child\x27).change(function(){
var val = \$(this).val();
calculPrice();
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"child\" value=\"\x27+val+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"child\"]\x27).val(val);
}
})
var percent = 0;
var coupon
\$(\x27#button-code-promo\x27).click(function(){
if (\$(\x27input[name=\"price\"]:checked\x27).length==1){
var priceId = \$(\x27input[name=\"price\"]:checked\x27).attr(\x27data-id\x27);
var self = \$(this);
\$(this).prev().removeClass(\x27is-invalid\x27);
coupon = \$(this).prev().val();
self.parent().parent().find(\x27.invalid-feedback\x27).text(\x27\x27)
\$.ajax({
url:\"{{ path(\x27valid_coupon\x27) }}\",
data:\"coupon=\"+coupon,
success:function(elem){
var verif= true;
self.parent().find(\x27input\x27).val(\x27\x27);
if(elem.success){
if(elem.data.allowOffer.length>0 && !elem.data.allowOffer.includes(parseInt(priceId))){
verif = false;
}
if(verif){
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
}
percent = elem.data.percent;
self.attr(\x27data-percent\x27,percent);
self.attr(\x27data-multi-percent\x27,elem.data.percentMulti);
//\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27).html(\x27<span class=\"font-bold me-2\">Promotion appliquée :</span>\x27+elem.data.description);
self.addClass(\x27js-calculate-auto\x27);
calculPrice();
}
}
if(!elem.success || !verif){
self.parents(\x27.input-group\x27).parent().find(\x27.invalid-feedback\x27).text(\x27\x27).text(\x27Ce code promo est invalide !\x27);
if(!self.parents(\x27.input-group\x27).find(\x27input\x27).hasClass(\x27is-invalid\x27)){
self.parents(\x27.input-group\x27).find(\x27input\x27).addClass(\x27is-invalid\x27);
}
}
}
})
}else{
alert(\x27Veuillez choisir une durée de votre offre\x27)
}
})
\$(\x27input[name=\"price\"]\x27).change(function(){
if(\$(this).is(\x27:checked\x27)){
var price = parseFloat(\$(this).attr(\x27data-price\x27));
var period = \$(this).attr(\x27data-period\x27);
var offer = \$(this).val();
var month = \$(this).attr(\x27data-month\x27);
if(\$(this).hasClass(\x27js-auto-discount\x27)){
var coupon = \$(this).attr(\x27data-discount\x27);
\$(\x27.u-spinner\x27).addClass(\x27open\x27)
\$.ajax({
url:\"{{ path(\x27valid_coupon\x27) }}\",
data:\"coupon=\"+coupon,
success:function(elem){
if(elem.success){
//\$(\x27#tr-code\x27).removeClass(\x27d-none\x27)
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"discount\" value=\"\x27+elem.data.code+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).val(elem.data.code);
}
percent = elem.data.percent;
\$(\x27#button-code-promo\x27).attr(\x27data-percent\x27,percent);
if(!\$(\x27#button-code-promo\x27).hasClass(\x27js-calculate-auto\x27)){
\$(\x27#button-code-promo\x27).addClass(\x27js-calculate-auto\x27)
}
// self.attr(\x27data-percent\x27,percent);
//\$(\x27#text-percent\x27).text(\x27\x27).text(\x27reduction de \x27+percent+\x27%\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27).text(\x27Promotion appliquée : \x27+elem.data.description);
calculPrice();
}
\$(\x27.u-spinner\x27).removeClass(\x27open\x27)
}
})
}else{
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).length==1){
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"discount\"]\x27).remove()
}
//\$(\x27#text-percent\x27).text(\x27\x27)
\$(\x27.remise-appliquee\x27).text(\x27\x27);
calculPrice()
}
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
\$(\x27.form-next-step-2\x27).append(\x27<input type=\"hidden\" name=\"offer\" value=\"\x27+offer+\x27\"/>\x27)
}else{
\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).val(offer);
}
// \$(\x27#text-toto-offer-period\x27).removeClass(\x27d-none\x27).addClass(\x27d-block\x27)
// \$(\x27#toto-offer-period\x27).text(period.toLowerCase())
}
})
\$(\x27input[name=\"price\"]\x27).change()
\$(\x27.btn-form\x27).click(function(){
if(\$(\x27.form-next-step-2\x27).find(\x27input[name=\"offer\"]\x27).length==0){
}else{
\$(\x27.form-next-step-2\x27).submit();
}
})
{% if not getPrice %}
\$(\x27#p-1\x27).click();
{% else %}
\$(\x27.input-price[data-id=\"{{ getPrice }}\"]\x27).click();
{% endif %}
})
</script>
{% endblock %}
", "front/tunnel/step1a.html.twig", "/var/www/dashboard/templates/front/tunnel/step1a.html.twig");
}
}