var/cache/dev/twig/3f/3f6d2db783003e830184e6893fe5d862.php line 40

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig */
  14. class __TwigTemplate_22a47c3516db0aceefda15e24d52da78 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'stylesheets' => [$this'block_stylesheets'],
  24.             'body' => [$this'block_body'],
  25.             'javascripts' => [$this'block_javascripts'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig"));
  40.         $this->parent $this->loadTemplate("@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig""@Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 4
  48.     public function block_stylesheets($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""stylesheets"));
  55.         // line 5
  56.         $this->displayParentBlock("stylesheets"$context$blocks);
  57.         echo "
  58.  <link rel=\"stylesheet\" href=\"";
  59.         // line 8
  60.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("themes/coworking/css/reservation.css"), "html"nulltrue);
  61.         echo "\" />
  62.  
  63. <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.css\" />
  64. <style>
  65.  
  66.   
  67.   .modal-backdrop.fade.show {
  68.         display: none;
  69. }
  70.  
  71.  
  72. /* css checkbox*/
  73. /* hide checkbox */
  74. input[type=\"checkbox\"] {
  75.   display: none;
  76. }
  77. /* if checkbox is checked, then do these things */
  78. /*input[type=\"checkbox\"]:checked + label {
  79.   color: white;
  80.   background:#FFD86E;
  81.   border-radius: 5px;
  82.   padding: 0px 10px 0px 10px;
  83. }
  84. /* styles when hovering over options */
  85. label:hover {
  86.   cursor: pointer;
  87.   
  88.   /* transitions and animations */
  89.   -webkit-transition: color .5s ease;
  90.   -moz-transition: color .5s ease;
  91.   -ms-transition: color .5s ease;
  92.   -o-transition: color .5s ease;
  93.   transition: color .5s ease;
  94. }
  95. .boutton-step{
  96.   padding:10px; 
  97.   text-decoration:none; 
  98.   width:230px; 
  99.    font-size: 12px;
  100.     font-family: 'PT Sans', sans-serif;
  101.     letter-spacing:2px;
  102. }
  103.   
  104. input.button {
  105.   
  106. \twidth:130px;
  107. \theight:50px;
  108. \tmargin: 20px 0 30px 0;
  109. \tpadding: 0px 20px 0px 20px;
  110. \tbackground: #e6e6e6;
  111. \tborder-radius:5px;
  112. \tborder: 1px solid #ccc;
  113. \tfont-family: OpenSans, sans-serif;
  114. \tfont-size:16pt;
  115. \tcolor:#444;
  116. }
  117. .Addons label{
  118.     font-size:12px !important;
  119.     font-family: 'roboto';
  120.     font-weight: 500;
  121.     border: 1px solid #80808024;
  122.     margin: 2px;
  123.     padding: 0px 5px 0px 5px;
  124.     border-radius: 5px;
  125. }
  126. .multistep-container .active-button li:not(:first-child) .round-btn:before {
  127.     position: absolute;
  128.     content: '';
  129.     width: 141px;
  130.     height: 3px;
  131.     background-color: #E9F2FA;
  132.     left: -120px;
  133. }
  134. .multistep-container .active-button li {
  135.     display: inline-block;
  136.     width: 140px;
  137. }
  138. .form-check {
  139.     line-height: 22px;
  140. }   
  141. .col-md-12.col-lg-12.col-sm-12.d-flex.justify-content-end.align-items-end.mb-3{
  142.         flex: 0 0 86%;
  143. }
  144.  @media (max-width:767px) {
  145.                 html, body {
  146.                   overflow-x: hidden  !important;
  147.                 }
  148.                 body {
  149.                   position: relative !important;
  150.                 }
  151.                 .col-sm-8.reservation-steeps {
  152.                     padding:0%;
  153.                 }
  154.                 .multistep-container .mutistep-form-area .form-box{
  155.                     position: relative;
  156.                     top: 33px;
  157.                     left: 0px;
  158.                 }
  159.                 .multistep-container .active-button li{
  160.                     display: inline-block;
  161.                     width: 100px;
  162.                 }
  163.                 .panel-sticky{
  164.                     font-size:12px;
  165.                 }
  166.               h6.display-6.header-steeps {
  167.                 margin-left: 3%;
  168.             }
  169.             h6.datetime{
  170.                  margin-left: 3%;
  171.             }
  172.             a#seeDetails {
  173.                 margin-bottom: -11%;
  174.             }
  175.             a#seePrice {
  176.                 float: right;
  177.                 margin-right: 52%;
  178.             }
  179.  }
  180.    .titre-page{
  181. margin-top:10px;
  182. font-size: 20px;
  183. line-height:45.29px;
  184. color: #000000;
  185.   li.etape1:before {
  186.     background: #7ED670 !important; /* Change the background color */
  187.     color: white !important;
  188.  .message {
  189.         
  190.                color: white;
  191.             background: rgb(199, 200, 204);
  192.             
  193.             font-size: 15px;
  194.             padding: 20px;
  195.             border-radius: 10px;
  196.             text-align: center;
  197.             font-weight: bold;
  198.             box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  199.             height: 100px; /* Adjust the height as necessary */
  200.             display: flex;
  201.             align-items: center;
  202.             justify-content: center;
  203.         }
  204. </style>
  205.   
  206. ";
  207.         
  208.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  209.         
  210.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  211.     }
  212.     // line 171
  213.     public function block_body($context, array $blocks = [])
  214.     {
  215.         $macros $this->macros;
  216.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  217.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  218.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  219.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""body"));
  220.         // line 172
  221.         echo 
  222.  
  223.  
  224.  
  225.   <img src=\"";
  226.         // line 178
  227.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("themes/coworking/front/images/freewor.jpg"), "html"nulltrue);
  228.         echo "\" style=\"width: 100%;height: 520px;\" class=\"img-fluid\" />
  229.   <div class=\"container\">
  230.     <div class=\"row justify-content-between\">
  231.       <div class=\"col-sm-8 reservation-steeps\">
  232.        
  233.        <div class=\"row\">
  234.           <div class=\"col-sm-6\">
  235.             <h6 class=\"titre-page\">Réservation ";
  236.         // line 185
  237.         echo twig_escape_filter($this->env, (isset($context["name"]) || array_key_exists("name"$context) ? $context["name"] : (function () { throw new RuntimeError('Variable "name" does not exist.'185$this->source); })()), "html"nulltrue);
  238.         echo "
  239.                 
  240.             </h6>
  241.           </div>
  242.           <div class=\"col-sm-6\" style=\"margin-top:10px;\">
  243.             <a href=\"/themes/coworking/front/images/FREEWORK.pdf\" class=\"btn-res text-center text-light text-uppercase bg-dark\" style=\"float: right;padding: 8px;border-radius: 6px;font-size:13px;\" target=\"_blank\"> NOS TARIFS</a>
  244.           </div>
  245.         </div>
  246.        
  247.        
  248.         <div class=\"container\">
  249.          
  250.               
  251.           
  252.        <div class=\"container d-flex justify-content-center align-items-center\">
  253.          
  254.          
  255.           <ul id=\"progressbar\">
  256. \t\t\t\t\t<li class=\"etape1\" > 
  257.              <span>   Type </span>
  258.              </li>
  259. \t\t\t\t\t<li class=\"active\" >  <span> Formule </span></li>
  260. \t\t\t\t\t<li> Dates</li>
  261. \t\t\t\t\t\t<li> Confirmation </li>
  262.            
  263.           
  264. \t\t\t\t</ul>
  265.         </div>
  266.         
  267.             
  268.             <div class=\"col-xl-12\" style=\"top: 20px;\">
  269.               
  270.               <div class=\"multistep-container\">
  271.                 <div class=\"mutistep-form-area\">
  272.                     
  273.                  
  274.                   <div class=\"form-box\">
  275.                 
  276.                      
  277.                  
  278.                        
  279.                             <div class=\"container\" >
  280.                   
  281.               
  282.             
  283.                  <div id=\"form-attribue\" style=\"line-height: 30px;\" class=\"mt-4\"> </div>
  284.                <h5>Veuillez choisir une formule </h5>
  285.                     
  286.                   ";
  287.         // line 237
  288.         $context['_parent'] = $context;
  289.         $context['_seq'] = twig_ensure_traversable((isset($context["attributValues"]) || array_key_exists("attributValues"$context) ? $context["attributValues"] : (function () { throw new RuntimeError('Variable "attributValues" does not exist.'237$this->source); })()));
  290.         foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
  291.             // line 238
  292.             echo "
  293.                   ";
  294.             // line 239
  295.             if ((twig_get_attribute($this->env$this->source$context["attr"], "code", [], "any"falsefalsefalse239) == "simple")) {
  296.                 // line 240
  297.                 echo "
  298.                   
  299.                 <div class=\"form-check\"  >
  300.                 <input class=\"form-check-input option\"  data-days=\"10\" data-id=\"";
  301.                 // line 243
  302.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse243), "id", [], "any"falsefalsefalse243), "html"nulltrue);
  303.                 echo "\" data-name=\"";
  304.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse243), "name", [], "any"falsefalsefalse243), "html"nulltrue);
  305.                 echo "\"  data-price=\"";
  306.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse243), "html"nulltrue);
  307.                 echo "\" type=\"radio\" name=\"radioGroup\" class=\"option\" id=\"radio1\" value=\"";
  308.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse243), "name", [], "any"falsefalsefalse243), "html"nulltrue);
  309.                 echo "\" />
  310.                 <label class=\"form-check-label\"  data-days=\"10\" data-id=\"";
  311.                 // line 244
  312.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse244), "id", [], "any"falsefalsefalse244), "html"nulltrue);
  313.                 echo "\" data-name=\"";
  314.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse244), "name", [], "any"falsefalsefalse244), "html"nulltrue);
  315.                 echo "\"  data-price=\"";
  316.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse244), "html"nulltrue);
  317.                 echo "\" for=\"radio1\">";
  318.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse244), "name", [], "any"falsefalsefalse244), "html"nulltrue);
  319.                 echo "</label><br>
  320.                 <small>
  321.                   
  322.                   ";
  323.                 // line 247
  324.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse247), "description", [], "any"falsefalsefalse247), "html"nulltrue);
  325.                 echo "
  326.                   </small>
  327.                 </div>
  328.                 
  329.                   ";
  330.             }
  331.             // line 253
  332.             echo "                  ";
  333.         }
  334.         $_parent $context['_parent'];
  335.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attr'], $context['_parent'], $context['loop']);
  336.         $context array_intersect_key($context$_parent) + $_parent;
  337.         // line 254
  338.         echo "
  339.                   
  340.                        ";
  341.         // line 257
  342.         if ((twig_length_filter($this->env, (isset($context["attributValues"]) || array_key_exists("attributValues"$context) ? $context["attributValues"] : (function () { throw new RuntimeError('Variable "attributValues" does not exist.'257$this->source); })())) > 0)) {
  343.             // line 258
  344.             echo "                
  345.                  <div class=\"form-check\">
  346.                         <input class=\"form-check-input\" type=\"radio\" name=\"radioGroup\" id=\"radio2\" />
  347.                         <label class=\"form-check-label\" for=\"radio2\">Location “Pass jours”</label><br>
  348.                         <small>Cette formule est déclinée comme suit :</small>
  349.                         <select style=\"padding: 4px;\" class=\"col-6  option \" id=\"serviceFormule\" >
  350.                              <option value=\"\" data-price=\"\"  >Sélectionner un choix</option>
  351.                     
  352.                          ";
  353.             // line 266
  354.             $context['_parent'] = $context;
  355.             $context['_seq'] = twig_ensure_traversable((isset($context["attributValues"]) || array_key_exists("attributValues"$context) ? $context["attributValues"] : (function () { throw new RuntimeError('Variable "attributValues" does not exist.'266$this->source); })()));
  356.             foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
  357.                 // line 267
  358.                 echo "                         ";
  359.                 if ((twig_get_attribute($this->env$this->source$context["attr"], "code", [], "any"falsefalsefalse267) == "multiple")) {
  360.                     // line 268
  361.                     echo "                        <option  value=\"";
  362.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse268), "name", [], "any"falsefalsefalse268), "html"nulltrue);
  363.                     echo "\"  data-days=\"";
  364.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse268), "description", [], "any"falsefalsefalse268), "html"nulltrue);
  365.                     echo "\"   data-id=\"";
  366.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse268), "id", [], "any"falsefalsefalse268), "html"nulltrue);
  367.                     echo "\" data-name=\"";
  368.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse268), "name", [], "any"falsefalsefalse268), "html"nulltrue);
  369.                     echo "\"  data-price=\"";
  370.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse268), "html"nulltrue);
  371.                     echo "\"  >";
  372.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse268), "name", [], "any"falsefalsefalse268), "html"nulltrue);
  373.                     echo "</option>
  374.                         ";
  375.                 }
  376.                 // line 270
  377.                 echo "                        ";
  378.             }
  379.             $_parent $context['_parent'];
  380.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attr'], $context['_parent'], $context['loop']);
  381.             $context array_intersect_key($context$_parent) + $_parent;
  382.             // line 271
  383.             echo "                        </select>
  384.                  </div>
  385.                ";
  386.         }
  387.         // line 274
  388.         echo "
  389.              ";
  390.         // line 275
  391.         $context['_parent'] = $context;
  392.         $context['_seq'] = twig_ensure_traversable((isset($context["attributValues"]) || array_key_exists("attributValues"$context) ? $context["attributValues"] : (function () { throw new RuntimeError('Variable "attributValues" does not exist.'275$this->source); })()));
  393.         foreach ($context['_seq'] as $context["_key"] => $context["attr"]) {
  394.             // line 276
  395.             echo "                   ";
  396.             if ((twig_get_attribute($this->env$this->source$context["attr"], "code", [], "any"falsefalsefalse276) == "personalized")) {
  397.                 echo "     
  398.                      
  399.                      <div class=\"form-check\">
  400.                       <input class=\"form-check-input option\" data-days=\"30\"  data-id=\"";
  401.                 // line 279
  402.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse279), "id", [], "any"falsefalsefalse279), "html"nulltrue);
  403.                 echo "\" data-name=\"";
  404.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse279), "name", [], "any"falsefalsefalse279), "html"nulltrue);
  405.                 echo "\" ";
  406.                 if ((null === twig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse279))) {
  407.                     echo " data-price=\"0\"  ";
  408.                 } else {
  409.                     echo "  data-price=\"";
  410.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse279), "html"nulltrue);
  411.                     echo "\"  ";
  412.                 }
  413.                 echo "    type=\"radio\" name=\"radioGroup\"  ";
  414.                 if ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse279), "name", [], "any"falsefalsefalse279) == "Période personnalisée")) {
  415.                     echo "   value=\"Mois\"   ";
  416.                 } else {
  417.                     echo "  value=\"";
  418.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse279), "name", [], "any"falsefalsefalse279), "html"nulltrue);
  419.                     echo "\" ";
  420.                 }
  421.                 echo "  id=\"radioMois\"    />
  422.                       <label class=\"form-check-label \" data-days=\"30\" data-id=\"";
  423.                 // line 280
  424.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse280), "id", [], "any"falsefalsefalse280), "html"nulltrue);
  425.                 echo "\" data-name=\"";
  426.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "product", [], "any"falsefalsefalse280), "name", [], "any"falsefalsefalse280), "html"nulltrue);
  427.                 echo "\"   data-price=\"";
  428.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["attr"], "price", [], "any"falsefalsefalse280), "html"nulltrue);
  429.                 echo "\"    for=\"radio";
  430.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse280), "id", [], "any"falsefalsefalse280), "html"nulltrue);
  431.                 echo "\"  >  ";
  432.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse280), "name", [], "any"falsefalsefalse280), "html"nulltrue);
  433.                 echo "   </label><br>
  434.                       
  435.                        <small> ";
  436.                 // line 282
  437.                 echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["attr"], "attribut", [], "any"falsefalsefalse282), "description", [], "any"falsefalsefalse282), "html"nulltrue);
  438.                 echo "</small>
  439.                     </div>
  440.                      
  441.                      ";
  442.             }
  443.             // line 286
  444.             echo "                   ";
  445.         }
  446.         $_parent $context['_parent'];
  447.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['attr'], $context['_parent'], $context['loop']);
  448.         $context array_intersect_key($context$_parent) + $_parent;
  449.         // line 287
  450.         echo "
  451.                  
  452.                     <h5 style=\"font-weight:bold; margin-top: 30px;\">Services supplémentaires:</h5>
  453.                     <h6 style=\"font-weight:bold; margin-top: 30px;\">Voulez-vous ajouter des services supplémentaires?</h6>
  454.                     <small style=\"color:grey\">Disponible en location au mois ou à la journée</small>
  455.                     <div class=\"row\">
  456.                          <div class=\"col-sm-12 Addons\">
  457.                             ";
  458.         // line 294
  459.         $context['_parent'] = $context;
  460.         $context['_seq'] = twig_ensure_traversable((isset($context["services"]) || array_key_exists("services"$context) ? $context["services"] : (function () { throw new RuntimeError('Variable "services" does not exist.'294$this->source); })()));
  461.         foreach ($context['_seq'] as $context["_key"] => $context["service"]) {
  462.             // line 295
  463.             echo "
  464.                                     <input id=\"";
  465.             // line 296
  466.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "name", [], "any"falsefalsefalse296), "html"nulltrue);
  467.             echo "\" data-id=\"";
  468.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "id", [], "any"falsefalsefalse296), "html"nulltrue);
  469.             echo "\" data-name=\"";
  470.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "name", [], "any"falsefalsefalse296), "html"nulltrue);
  471.             echo "\"  data-price=\"";
  472.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "price", [], "any"falsefalsefalse296), "html"nulltrue);
  473.             echo "\" type=\"checkbox\" class=\"CK\" name=\"services\" value=\"";
  474.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "id", [], "any"falsefalsefalse296), "html"nulltrue);
  475.             echo "\"><label for=\"service\"> ";
  476.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["service"], "name", [], "any"falsefalsefalse296), "html"nulltrue);
  477.             echo "  </label> 
  478.                             ";
  479.         }
  480.         $_parent $context['_parent'];
  481.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['service'], $context['_parent'], $context['loop']);
  482.         $context array_intersect_key($context$_parent) + $_parent;
  483.         // line 297
  484.         echo "<br>
  485.                               ";
  486.         // line 299
  487.         $context['_parent'] = $context;
  488.         $context['_seq'] = twig_ensure_traversable((isset($context["servicesCommuns"]) || array_key_exists("servicesCommuns"$context) ? $context["servicesCommuns"] : (function () { throw new RuntimeError('Variable "servicesCommuns" does not exist.'299$this->source); })()));
  489.         foreach ($context['_seq'] as $context["_key"] => $context["servicesCommun"]) {
  490.             // line 300
  491.             echo "                                    <input id=\"";
  492.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "name", [], "any"falsefalsefalse300), "html"nulltrue);
  493.             echo " \" data-id=\"";
  494.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "id", [], "any"falsefalsefalse300), "html"nulltrue);
  495.             echo "\" data-name=\"";
  496.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "name", [], "any"falsefalsefalse300), "html"nulltrue);
  497.             echo "\"  data-price=\"";
  498.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "price", [], "any"falsefalsefalse300), "html"nulltrue);
  499.             echo "\" type=\"checkbox\" class=\"CK\" name=\"serviceCommun\" value=\"";
  500.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "id", [], "any"falsefalsefalse300), "html"nulltrue);
  501.             echo "\"><label for=\"service\"> ";
  502.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["servicesCommun"], "name", [], "any"falsefalsefalse300), "html"nulltrue);
  503.             echo "   </label>
  504.                                       
  505.                               ";
  506.         }
  507.         $_parent $context['_parent'];
  508.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['servicesCommun'], $context['_parent'], $context['loop']);
  509.         $context array_intersect_key($context$_parent) + $_parent;
  510.         // line 302
  511.         echo "     
  512.  
  513.                              </div>
  514.                      <!-- <h5 style=\"font-weight:bold;margin-top: 10px; \">Informations additionnelles </h5>
  515.                      <h6 style=\"font-weight:bold; margin-top: 10px;\">Avez vous des demandes spécifiques ?</h6>
  516.                       <textarea class=\"form-control\" id=\"textAreaExample1\" rows=\"1\" placeholder=\"Saisissez votre texte Ici\" style=\"font-size: 12px;\"></textarea>
  517.                    -->
  518.                     
  519.                     </div>
  520.                <div class=\"message\" style=\" display: none;\">Les Services supplémentaires sont indisponibles pour cette sélection.</div>
  521.                  </div>
  522.                             
  523.                             
  524.                      <div class=\"button-row\">
  525.                          
  526.             <a href=\"";
  527.         // line 319
  528.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("reservationfreework");
  529.         echo "\" style=\"border:1px solid #FFCB00 !important; color:black !important; background: #ffff !important;\"  class=\"btn-res text-center text-light text-uppercase bg-dark ReserveNext__ boutton-step\" >Étape précédente</a>
  530.             &nbsp;&nbsp;
  531.              <a href=\"";
  532.         // line 321
  533.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("reservationstep2", ["id" => (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'321$this->source); })()), "paramFormule" => "days"]), "html"nulltrue);
  534.         echo "\" style=\"background: #FFCB00 !important;\"  id=\"reservationLink\" class=\"btn-res text-center text-light text-uppercase bg-dark ReserveNext__ boutton-step\">Étape suivante</a>
  535.             
  536.                       </div>      
  537.                      
  538.            
  539.                     
  540.                    
  541.                   </div>
  542.                    
  543.                 
  544.                 </div>
  545.               </div>
  546.             </div>
  547.           </div>
  548.          
  549.          
  550.       </div>
  551.           <div class=\"col-sm-4 reservation-steeps-panier\" style=\"overflow-y: auto;\">
  552.       
  553.         ";
  554.         // line 344
  555.         echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart"));
  556.         echo "
  557.     </div>
  558.     </div>
  559.   </div>
  560.   
  561.   
  562. ";
  563.         
  564.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  565.         
  566.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  567.     }
  568.     // line 357
  569.     public function block_javascripts($context, array $blocks = [])
  570.     {
  571.         $macros $this->macros;
  572.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  573.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  574.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  575.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""javascripts"));
  576.         // line 358
  577.         echo "  <!-- MAIN CONTENT -->
  578.  
  579. <script src=\"https://code.jquery.com/jquery-3.4.1.min.js\" integrity=\"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=\" crossorigin=\"anonymous\"></script>
  580. <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\" integrity=\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\" crossorigin=\"anonymous\"></script>
  581.  
  582.  
  583. <script>
  584.     //recuperer la valeur des jours dans le formulaire .
  585.     document.getElementById('reservationLink').addEventListener('click', function() {
  586.          
  587.         var days=0;
  588.         var selectedOption = document.getElementById('serviceFormule');
  589.          var selected = selectedOption.value;
  590.           if(selected != \"\"){
  591.            days = selectedOption.options[selectedOption.selectedIndex].getAttribute('data-days');
  592.           }else{
  593.          var radioButtons = document.getElementsByName('radioGroup');
  594.           for (var i = 0; i < radioButtons.length; i++) {
  595.             if (radioButtons[i].checked) {
  596.              days = parseInt(radioButtons[i].getAttribute('data-days'));
  597.             break;
  598.             }
  599.         }  }
  600.             
  601.  if (days === 0) {
  602.         event.preventDefault(); // Empêche le lien de se déclencher
  603.         alert(\"Vous n'avez rien sélectionné. Veuillez sélectionner une option.\");
  604.     }  
  605.         var link = document.getElementById('reservationLink');
  606.         link.href = \"";
  607.         // line 391
  608.         echo twig_escape_filter($this->env$this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("reservationstep2", ["id" => (isset($context["product"]) || array_key_exists("product"$context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.'391$this->source); })()), "paramFormule" => "days"]), "html"nulltrue);
  609.         echo "\".replace('days', days);
  610.     
  611.            });
  612.   
  613.     \$(document).ready(function(){
  614.  \$('input[type=radio][name=radioGroup]').click(function() {
  615.     //\$('input[type=checkbox]').prop('checked', false);
  616. });
  617.  
  618.   \$('#serviceFormule').change(function(){ 
  619.        var radio = document.getElementById('radio2');
  620.             radio.checked = true;
  621.              \$('.Addons').show();
  622.              \$('.message').hide();
  623.              // \$('input[type=checkbox]').prop('checked', false); 
  624.     
  625.       });
  626.       
  627.       var radioButtons = document.getElementsByName('radioGroup');
  628.  var selectElement = document.getElementById('serviceFormule');
  629. radioButtons.forEach(function(radio) {
  630.     radio.addEventListener('click', function() {
  631.      
  632.         if (radio.id === 'radio2') {
  633.               \$('.Addons').show();
  634.              \$('.message').hide()
  635.             selectElement.disabled = false;
  636.          var idProduct = \$('option:nth-child(2)').attr(\"data-id\");
  637.           var price = \$('option:nth-child(2)').attr(\"data-price\");
  638.            var name = \$('option:nth-child(2)').attr(\"data-name\");
  639.           var actionType = \"add\";
  640.     
  641.     \$.ajax({
  642.       url:\"";
  643.         // line 434
  644.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  645.         echo "\",
  646.       data:{
  647.         idProduct:idProduct,
  648.         price:price,
  649.         name:name,
  650.         actionType:actionType
  651.       },
  652.       success:function(result){
  653.         console.log(result);
  654.           \$(\".reservation-steeps-panier\").html(result);
  655.       }
  656.     });
  657.             
  658.               selectElement.val(\$('option:nth-child(2)').prop('selected', true));
  659.         } else if(radio.id === 'radio1'){
  660.                
  661.                     \$('.Addons').hide();
  662.                     \$('.message').show();
  663.         } 
  664.         
  665.         else {
  666.             selectElement.selectedIndex = 0; // Sélection du premier élément
  667.             selectElement.disabled = true;
  668.              \$('.Addons').show();
  669.                     \$('.message').hide();
  670.         }
  671.     });
  672. });
  673.       
  674.          \$('body').on(\"click\",\".option\",function() {
  675.         
  676.            /*var selectedServiceIds = [];
  677.            var formule =\"\";
  678.             formule = \$(\".radio1\").val();*/
  679.               if (\$(this).is(':checked')) {  
  680.         var formule = \$(this).val(); 
  681.        
  682.     }
  683.             
  684.              \$('.CK:checked').each(function() {
  685.         // Ajouter l'ID du service sélectionné à la liste
  686.        // selectedServiceIds.push(\$(this).data('id'));
  687.   
  688.            var currentCheckbox = \$(this);
  689.           \$.ajax({
  690.                 url: '/reservation/ajax-service-price',
  691.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  692.                 data: { 
  693.                   serviceId : \$(this).data('id'),
  694.                   formule : formule
  695.                  },
  696.                 success: function(response) {
  697.                     currentCheckbox.attr('data-price', response);
  698.                     var idProduct = currentCheckbox.attr(\"data-id\");
  699.                     var price = currentCheckbox.attr(\"data-price\");
  700.                     var name = currentCheckbox.attr(\"data-name\");
  701.                    
  702.                     if(price != 0){
  703.                     var actionType = \"add\";
  704.                      currentCheckbox.next('label').css({'color': 'white', 'background': 'rgb(255, 216, 110)'});
  705.                     }else{
  706.                       var actionType = \"remove\";
  707.                       currentCheckbox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  708.                     }
  709.                     
  710.              \$.ajax({
  711.                 url:\"";
  712.         // line 507
  713.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  714.         echo "\",
  715.                 data:{
  716.                   idProduct:idProduct,
  717.                   price:price,
  718.                   name:name,
  719.                   actionType:actionType
  720.                 },
  721.                 success:function(result){
  722.                   console.log(result);
  723.                     \$(\".reservation-steeps-panier\").html(result);
  724.                 }
  725.               });
  726.                             
  727.                        
  728.         },
  729.                 error: function(xhr, status, error) {
  730.                     // Gérez les erreurs ici
  731.                     console.error(error);
  732.                 }
  733.             });
  734.          
  735.   
  736.           
  737.     
  738.         
  739.     });
  740.         
  741.           
  742.     var idProduct = \$(this).attr(\"data-id\");
  743.     var price = \$(this).attr(\"data-price\");
  744.     var name = \$(this).attr(\"data-name\");
  745.     var actionType = \"add\";
  746.     \$.ajax({
  747.       url:\"";
  748.         // line 545
  749.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  750.         echo "\",
  751.       data:{
  752.         idProduct:idProduct,
  753.         price:price,
  754.         name:name,
  755.         actionType:actionType
  756.       },
  757.       success:function(result){
  758.         console.log(result);
  759.           \$(\".reservation-steeps-panier\").html(result);
  760.       }
  761.     });
  762.     });
  763.     
  764.              \$('body').on(\"change\",\"select.option\",function() {
  765.  var selectedServiceIds = [];
  766.                  if(\$(\"#serviceFormule\").val() != \"\" || \$(\"#radio3\").val() != \"\"){
  767.          if(\$(\"#serviceFormule\").val() != \"\" ){
  768.                  formule =\$(\"#serviceFormule\").val();
  769.                 }else{
  770.                  formule = \$(\".radio1\").val();
  771.                 }
  772.           }
  773.             // Parcourir toutes les cases cochées avec la classe CK
  774.     \$('.CK:checked').each(function() {
  775.         // Ajouter l'ID du service sélectionné à la liste
  776.        // selectedServiceIds.push(\$(this).data('id'));
  777.   
  778.            var currentCheckbox = \$(this);
  779.           \$.ajax({
  780.                 url: '/reservation/ajax-service-price',
  781.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  782.                 data: { 
  783.                   serviceId : \$(this).data('id'),
  784.                   formule : formule
  785.                  },
  786.                 success: function(response) {
  787.                     currentCheckbox.attr('data-price', response);
  788.                     var idProduct = currentCheckbox.attr(\"data-id\");
  789.                     var price = currentCheckbox.attr(\"data-price\");
  790.                     var name = currentCheckbox.attr(\"data-name\");
  791.                     if(price != 0){
  792.                     var actionType = \"add\";
  793.                      currentCheckbox.next('label').css({'color': 'white', 'background': 'rgb(255, 216, 110)'});
  794.                     }else{
  795.                       var actionType = \"remove\";
  796.                       currentCheckbox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  797.                     }
  798.                
  799.              \$.ajax({
  800.                 url:\"";
  801.         // line 601
  802.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  803.         echo "\",
  804.                 data:{
  805.                   idProduct:idProduct,
  806.                   price:price,
  807.                   name:name,
  808.                   actionType:actionType
  809.                 },
  810.                 success:function(result){
  811.                   console.log(result);
  812.                     \$(\".reservation-steeps-panier\").html(result);
  813.                 }
  814.               });
  815.                             
  816.                        
  817.         },
  818.                 error: function(xhr, status, error) {
  819.                     // Gérez les erreurs ici
  820.                     console.error(error);
  821.                 }
  822.             });
  823.          
  824.   
  825.           
  826.     
  827.         
  828.     });
  829.     
  830.       
  831.               
  832.           
  833.     var idProduct = \$(this).find(\"option:selected\").attr(\"data-id\");
  834.     var price = \$(this).find(\"option:selected\").attr(\"data-price\");
  835.     var name = \$(this).find(\"option:selected\").attr(\"data-name\");
  836.     var actionType = \"add\";
  837.   
  838.    
  839.     \$.ajax({
  840.       url:\"";
  841.         // line 645
  842.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  843.         echo "\",
  844.       data:{
  845.         idProduct:idProduct,
  846.         price:price,
  847.         name:name,
  848.         actionType:actionType
  849.       },
  850.       success:function(result){
  851.         console.log(result);
  852.           \$(\".reservation-steeps-panier\").html(result);
  853.       }
  854.     });
  855.     });
  856.           \$('body').on(\"click\",\".delete-cart-item\",function() {
  857.           
  858.     var idProduct = \$(this).attr(\"data-id\");
  859.     var price = \$(this).attr(\"data-price\");
  860.     var name = \$(this).attr(\"data-name\");
  861.     var actionType = \"remove\";
  862.     \$.ajax({
  863.       url:\"";
  864.         // line 669
  865.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  866.         echo "\",
  867.       data:{
  868.         idProduct:idProduct,
  869.         price:price,
  870.         name:name,
  871.         actionType:actionType
  872.       },
  873.       success:function(result){
  874.         console.log(result);
  875.           \$(\".reservation-steeps-panier\").html(result);
  876.       }
  877.     });
  878.         
  879.         
  880.     
  881.     });
  882.       \$('body').on(\"click\",\".delete-cart-item\",function() {
  883.                 
  884.           var idProduct = \$(this).attr(\"data-id\");
  885.           var price = \$(this).attr(\"data-price\");
  886.           var name = \$(this).attr(\"data-name\");
  887.           var actionType = \"remove\";
  888.           \$.ajax({
  889.             url:\"";
  890.         // line 697
  891.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  892.         echo "\",
  893.             data:{
  894.               idProduct:idProduct,
  895.               price:price,
  896.               name:name,
  897.               actionType:actionType
  898.             },
  899.             success:function(result){
  900.               console.log(result);
  901.                 \$(\".reservation-steeps-panier\").html(result);
  902.             }
  903.           });
  904.           });
  905.         // Ajouter la délégation d'événements pour le clic sur le label 'service'
  906.    \$('label[for=\"service\"]').click(function(){ 
  907.  
  908.     var checkBox = \$(this).prev();
  909.     var value = checkBox.val();
  910.     if (checkBox.is(\":checked\")) {
  911.         checkBox.prop('checked', false);
  912.         console.log(\"Case à cocher décochée : \" + value);
  913.          checkBox.next('label').css({ 'color': '#626262' ,'background': 'none'});
  914.   var idProduct = checkBox.attr(\"data-id\");
  915.     var price = checkBox.attr(\"data-price\");
  916.     var name = checkBox.attr(\"data-name\");
  917.     var actionType = \"remove\";
  918.       \$.ajax({
  919.       url:\"";
  920.         // line 725
  921.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  922.         echo "\",
  923.       data:{
  924.         idProduct:idProduct,
  925.         price:price,
  926.         name:name,
  927.         actionType:actionType
  928.       },
  929.       success:function(result){
  930.         console.log(result);
  931.           \$(\".reservation-steeps-panier\").html(result);
  932.       }
  933.     });
  934.     } else {
  935.         checkBox.prop('checked', true);
  936.         console.log(\"Case à cocher cochée : \" + value);
  937.         var formule = \"\";
  938.  
  939.        
  940.               if(\$(\"#serviceFormule\").val() != \"\" || \$(\"#radio3\").val() != \"\"){
  941.                 if(\$(\"#serviceFormule\").val() != \"\" ){
  942.                  formule =\$(\"#serviceFormule\").val();
  943.                 }
  944.                   else if (\$('#radio1').is(':checked')) {
  945.                   formule = \$(\".radio1\").val();
  946.                  }
  947.                  else if (\$('#radio1').is(':checked')) {
  948.                   formule = \$(\"#radio1\").val();
  949.                  }
  950.                   else if (\$('#radioMois').is(':checked')) {
  951.                   formule = \$(\"#radioMois\").val();
  952.                  }
  953.               
  954.                  
  955.               var serviceId = \$(this).prev().data('id');
  956.               var dataElement = \$(this).prev();
  957.       
  958.              \$.ajax({
  959.                 url: '/reservation/ajax-service-price',
  960.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  961.                 data: { 
  962.                   serviceId : value,
  963.                   formule : formule
  964.                  },
  965.                 success: function(response) {
  966.                     
  967.                      dataElement.attr(\"data-price\", response);
  968.                      var idProduct = dataElement.attr(\"data-id\");
  969.                     var price = dataElement.attr(\"data-price\");
  970.                     var name = dataElement.attr(\"data-name\");
  971.                     var actionType = \"add\";
  972.             if(price != 0 ){
  973.                 \$.ajax({
  974.                 url:\"";
  975.         // line 778
  976.         echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("ajax_cart");
  977.         echo "\",
  978.                 data:{
  979.                   idProduct:idProduct,
  980.                   price:price,
  981.                   name:name,
  982.                   actionType:actionType
  983.                 },
  984.                 success:function(result){
  985.                   console.log(result);
  986.                     \$(\".reservation-steeps-panier\").html(result);
  987.                 }
  988.               });
  989.                checkBox.next('label').css({ 'color': 'white' ,'background': '#FFD86E'});
  990.                  
  991.                    }else {
  992.                 // Si le prix est égal à zéro, changer le fond du checkbox en gris
  993.                 checkBox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  994.             }    
  995.                  
  996.    
  997.                 },
  998.                 error: function(xhr, status, error) {
  999.                     // Gérez les erreurs ici
  1000.                     console.error(error);
  1001.                 }
  1002.             });
  1003.             }
  1004.     }
  1005. });
  1006.  
  1007.  var radioButtons = document.getElementsByName('radioGroup');
  1008. for (var i = 0; i < radioButtons.length; i++) {
  1009.     if (radioButtons[i].checked) {
  1010.         var selectedValue = radioButtons[i].value;
  1011.         break;
  1012.     }
  1013. }
  1014. console.log(selectedValue); // Vous pouvez utiliser la valeur comme vous le souhaitez ici
  1015.     });
  1016.    
  1017.  
  1018.  
  1019. </script>
  1020.  
  1021. ";
  1022.         
  1023.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  1024.         
  1025.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  1026.     }
  1027.     public function getTemplateName()
  1028.     {
  1029.         return "@Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig";
  1030.     }
  1031.     public function isTraitable()
  1032.     {
  1033.         return false;
  1034.     }
  1035.     public function getDebugInfo()
  1036.     {
  1037.         return array (  1084 => 778,  1028 => 725,  997 => 697,  966 => 669,  939 => 645,  892 => 601,  833 => 545,  792 => 507,  716 => 434,  670 => 391,  635 => 358,  625 => 357,  608 => 344,  582 => 321,  577 => 319,  558 => 302,  538 => 300,  534 => 299,  530 => 297,  512 => 296,  509 => 295,  505 => 294,  496 => 287,  490 => 286,  483 => 282,  470 => 280,  448 => 279,  441 => 276,  437 => 275,  434 => 274,  429 => 271,  423 => 270,  407 => 268,  404 => 267,  400 => 266,  390 => 258,  388 => 257,  383 => 254,  377 => 253,  368 => 247,  356 => 244,  346 => 243,  341 => 240,  339 => 239,  336 => 238,  332 => 237,  277 => 185,  267 => 178,  259 => 172,  249 => 171,  76 => 8,  70 => 5,  60 => 4,  37 => 1,);
  1038.     }
  1039.     public function getSourceContext()
  1040.     {
  1041.         return new Source("{% extends '@Flexy/FrontBundle/Themes/CoWorking/templates/layout.html.twig' %}
  1042. {% block stylesheets %}
  1043. {{ parent() }}
  1044.  <link rel=\"stylesheet\" href=\"{{ asset('themes/coworking/css/reservation.css') }}\" />
  1045.  
  1046. <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/chosen/1.4.2/chosen.css\" />
  1047. <style>
  1048.  
  1049.   
  1050.   .modal-backdrop.fade.show {
  1051.         display: none;
  1052. }
  1053.  
  1054.  
  1055. /* css checkbox*/
  1056. /* hide checkbox */
  1057. input[type=\"checkbox\"] {
  1058.   display: none;
  1059. }
  1060. /* if checkbox is checked, then do these things */
  1061. /*input[type=\"checkbox\"]:checked + label {
  1062.   color: white;
  1063.   background:#FFD86E;
  1064.   border-radius: 5px;
  1065.   padding: 0px 10px 0px 10px;
  1066. }
  1067. /* styles when hovering over options */
  1068. label:hover {
  1069.   cursor: pointer;
  1070.   
  1071.   /* transitions and animations */
  1072.   -webkit-transition: color .5s ease;
  1073.   -moz-transition: color .5s ease;
  1074.   -ms-transition: color .5s ease;
  1075.   -o-transition: color .5s ease;
  1076.   transition: color .5s ease;
  1077. }
  1078. .boutton-step{
  1079.   padding:10px; 
  1080.   text-decoration:none; 
  1081.   width:230px; 
  1082.    font-size: 12px;
  1083.     font-family: 'PT Sans', sans-serif;
  1084.     letter-spacing:2px;
  1085. }
  1086.   
  1087. input.button {
  1088.   
  1089. \twidth:130px;
  1090. \theight:50px;
  1091. \tmargin: 20px 0 30px 0;
  1092. \tpadding: 0px 20px 0px 20px;
  1093. \tbackground: #e6e6e6;
  1094. \tborder-radius:5px;
  1095. \tborder: 1px solid #ccc;
  1096. \tfont-family: OpenSans, sans-serif;
  1097. \tfont-size:16pt;
  1098. \tcolor:#444;
  1099. }
  1100. .Addons label{
  1101.     font-size:12px !important;
  1102.     font-family: 'roboto';
  1103.     font-weight: 500;
  1104.     border: 1px solid #80808024;
  1105.     margin: 2px;
  1106.     padding: 0px 5px 0px 5px;
  1107.     border-radius: 5px;
  1108. }
  1109. .multistep-container .active-button li:not(:first-child) .round-btn:before {
  1110.     position: absolute;
  1111.     content: '';
  1112.     width: 141px;
  1113.     height: 3px;
  1114.     background-color: #E9F2FA;
  1115.     left: -120px;
  1116. }
  1117. .multistep-container .active-button li {
  1118.     display: inline-block;
  1119.     width: 140px;
  1120. }
  1121. .form-check {
  1122.     line-height: 22px;
  1123. }   
  1124. .col-md-12.col-lg-12.col-sm-12.d-flex.justify-content-end.align-items-end.mb-3{
  1125.         flex: 0 0 86%;
  1126. }
  1127.  @media (max-width:767px) {
  1128.                 html, body {
  1129.                   overflow-x: hidden  !important;
  1130.                 }
  1131.                 body {
  1132.                   position: relative !important;
  1133.                 }
  1134.                 .col-sm-8.reservation-steeps {
  1135.                     padding:0%;
  1136.                 }
  1137.                 .multistep-container .mutistep-form-area .form-box{
  1138.                     position: relative;
  1139.                     top: 33px;
  1140.                     left: 0px;
  1141.                 }
  1142.                 .multistep-container .active-button li{
  1143.                     display: inline-block;
  1144.                     width: 100px;
  1145.                 }
  1146.                 .panel-sticky{
  1147.                     font-size:12px;
  1148.                 }
  1149.               h6.display-6.header-steeps {
  1150.                 margin-left: 3%;
  1151.             }
  1152.             h6.datetime{
  1153.                  margin-left: 3%;
  1154.             }
  1155.             a#seeDetails {
  1156.                 margin-bottom: -11%;
  1157.             }
  1158.             a#seePrice {
  1159.                 float: right;
  1160.                 margin-right: 52%;
  1161.             }
  1162.  }
  1163.    .titre-page{
  1164. margin-top:10px;
  1165. font-size: 20px;
  1166. line-height:45.29px;
  1167. color: #000000;
  1168.   li.etape1:before {
  1169.     background: #7ED670 !important; /* Change the background color */
  1170.     color: white !important;
  1171.  .message {
  1172.         
  1173.                color: white;
  1174.             background: rgb(199, 200, 204);
  1175.             
  1176.             font-size: 15px;
  1177.             padding: 20px;
  1178.             border-radius: 10px;
  1179.             text-align: center;
  1180.             font-weight: bold;
  1181.             box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  1182.             height: 100px; /* Adjust the height as necessary */
  1183.             display: flex;
  1184.             align-items: center;
  1185.             justify-content: center;
  1186.         }
  1187. </style>
  1188.   
  1189. {% endblock  %}
  1190. {% block body %}
  1191.  
  1192.  
  1193.  
  1194.  
  1195.   <img src=\"{{asset('themes/coworking/front/images/freewor.jpg')}}\" style=\"width: 100%;height: 520px;\" class=\"img-fluid\" />
  1196.   <div class=\"container\">
  1197.     <div class=\"row justify-content-between\">
  1198.       <div class=\"col-sm-8 reservation-steeps\">
  1199.        
  1200.        <div class=\"row\">
  1201.           <div class=\"col-sm-6\">
  1202.             <h6 class=\"titre-page\">Réservation {{name}}
  1203.                 
  1204.             </h6>
  1205.           </div>
  1206.           <div class=\"col-sm-6\" style=\"margin-top:10px;\">
  1207.             <a href=\"/themes/coworking/front/images/FREEWORK.pdf\" class=\"btn-res text-center text-light text-uppercase bg-dark\" style=\"float: right;padding: 8px;border-radius: 6px;font-size:13px;\" target=\"_blank\"> NOS TARIFS</a>
  1208.           </div>
  1209.         </div>
  1210.        
  1211.        
  1212.         <div class=\"container\">
  1213.          
  1214.               
  1215.           
  1216.        <div class=\"container d-flex justify-content-center align-items-center\">
  1217.          
  1218.          
  1219.           <ul id=\"progressbar\">
  1220. \t\t\t\t\t<li class=\"etape1\" > 
  1221.              <span>   Type </span>
  1222.              </li>
  1223. \t\t\t\t\t<li class=\"active\" >  <span> Formule </span></li>
  1224. \t\t\t\t\t<li> Dates</li>
  1225. \t\t\t\t\t\t<li> Confirmation </li>
  1226.            
  1227.           
  1228. \t\t\t\t</ul>
  1229.         </div>
  1230.         
  1231.             
  1232.             <div class=\"col-xl-12\" style=\"top: 20px;\">
  1233.               
  1234.               <div class=\"multistep-container\">
  1235.                 <div class=\"mutistep-form-area\">
  1236.                     
  1237.                  
  1238.                   <div class=\"form-box\">
  1239.                 
  1240.                      
  1241.                  
  1242.                        
  1243.                             <div class=\"container\" >
  1244.                   
  1245.               
  1246.             
  1247.                  <div id=\"form-attribue\" style=\"line-height: 30px;\" class=\"mt-4\"> </div>
  1248.                <h5>Veuillez choisir une formule </h5>
  1249.                     
  1250.                   {% for attr in  attributValues %}
  1251.                   {% if attr.code == \"simple\" %}
  1252.                   
  1253.                 <div class=\"form-check\"  >
  1254.                 <input class=\"form-check-input option\"  data-days=\"10\" data-id=\"{{attr.product.id}}\" data-name=\"{{attr.product.name}}\"  data-price=\"{{attr.price}}\" type=\"radio\" name=\"radioGroup\" class=\"option\" id=\"radio1\" value=\"{{attr.attribut.name}}\" />
  1255.                 <label class=\"form-check-label\"  data-days=\"10\" data-id=\"{{attr.product.id}}\" data-name=\"{{attr.product.name}}\"  data-price=\"{{attr.price}}\" for=\"radio1\">{{attr.attribut.name}}</label><br>
  1256.                 <small>
  1257.                   
  1258.                   {{attr.attribut.description}}
  1259.                   </small>
  1260.                 </div>
  1261.                 
  1262.                   {% endif %}
  1263.                   {% endfor %}
  1264.                   
  1265.                        {% if attributValues|length > 0 %}
  1266.                 
  1267.                  <div class=\"form-check\">
  1268.                         <input class=\"form-check-input\" type=\"radio\" name=\"radioGroup\" id=\"radio2\" />
  1269.                         <label class=\"form-check-label\" for=\"radio2\">Location “Pass jours”</label><br>
  1270.                         <small>Cette formule est déclinée comme suit :</small>
  1271.                         <select style=\"padding: 4px;\" class=\"col-6  option \" id=\"serviceFormule\" >
  1272.                              <option value=\"\" data-price=\"\"  >Sélectionner un choix</option>
  1273.                     
  1274.                          {% for attr in attributValues %}
  1275.                          {% if attr.code == \"multiple\" %}
  1276.                         <option  value=\"{{attr.attribut.name}}\"  data-days=\"{{attr.attribut.description}}\"   data-id=\"{{attr.product.id}}\" data-name=\"{{attr.product.name}}\"  data-price=\"{{attr.price}}\"  >{{attr.attribut.name}}</option>
  1277.                         {% endif %}
  1278.                         {% endfor %}
  1279.                         </select>
  1280.                  </div>
  1281.                {% endif %}
  1282.              {% for attr in  attributValues %}
  1283.                    {% if attr.code == \"personalized\" %}     
  1284.                      
  1285.                      <div class=\"form-check\">
  1286.                       <input class=\"form-check-input option\" data-days=\"30\"  data-id=\"{{attr.product.id}}\" data-name=\"{{attr.product.name}}\" {% if(attr.price is null) %} data-price=\"0\"  {% else %}  data-price=\"{{attr.price}}\"  {% endif %}    type=\"radio\" name=\"radioGroup\"  {% if(attr.attribut.name==\"Période personnalisée\") %}   value=\"Mois\"   {% else %}  value=\"{{attr.attribut.name}}\" {% endif %}  id=\"radioMois\"    />
  1287.                       <label class=\"form-check-label \" data-days=\"30\" data-id=\"{{attr.product.id}}\" data-name=\"{{attr.product.name}}\"   data-price=\"{{attr.price}}\"    for=\"radio{{ attr.attribut.id}}\"  >  {{ attr.attribut.name}}   </label><br>
  1288.                       
  1289.                        <small> {{ attr.attribut.description}}</small>
  1290.                     </div>
  1291.                      
  1292.                      {% endif %}
  1293.                    {% endfor %}
  1294.                  
  1295.                     <h5 style=\"font-weight:bold; margin-top: 30px;\">Services supplémentaires:</h5>
  1296.                     <h6 style=\"font-weight:bold; margin-top: 30px;\">Voulez-vous ajouter des services supplémentaires?</h6>
  1297.                     <small style=\"color:grey\">Disponible en location au mois ou à la journée</small>
  1298.                     <div class=\"row\">
  1299.                          <div class=\"col-sm-12 Addons\">
  1300.                             {% for service in  services %}
  1301.                                     <input id=\"{{ service.name}}\" data-id=\"{{service.id}}\" data-name=\"{{service.name}}\"  data-price=\"{{service.price}}\" type=\"checkbox\" class=\"CK\" name=\"services\" value=\"{{ service.id}}\"><label for=\"service\"> {{ service.name}}  </label> 
  1302.                             {% endfor %}<br>
  1303.                               {% for servicesCommun in  servicesCommuns %}
  1304.                                     <input id=\"{{ servicesCommun.name}} \" data-id=\"{{servicesCommun.id}}\" data-name=\"{{servicesCommun.name}}\"  data-price=\"{{servicesCommun.price}}\" type=\"checkbox\" class=\"CK\" name=\"serviceCommun\" value=\"{{ servicesCommun.id}}\"><label for=\"service\"> {{ servicesCommun.name}}   </label>
  1305.                                       
  1306.                               {% endfor %}     
  1307.  
  1308.                              </div>
  1309.                      <!-- <h5 style=\"font-weight:bold;margin-top: 10px; \">Informations additionnelles </h5>
  1310.                      <h6 style=\"font-weight:bold; margin-top: 10px;\">Avez vous des demandes spécifiques ?</h6>
  1311.                       <textarea class=\"form-control\" id=\"textAreaExample1\" rows=\"1\" placeholder=\"Saisissez votre texte Ici\" style=\"font-size: 12px;\"></textarea>
  1312.                    -->
  1313.                     
  1314.                     </div>
  1315.                <div class=\"message\" style=\" display: none;\">Les Services supplémentaires sont indisponibles pour cette sélection.</div>
  1316.                  </div>
  1317.                             
  1318.                             
  1319.                      <div class=\"button-row\">
  1320.                          
  1321.             <a href=\"{{path(\"reservationfreework\")}}\" style=\"border:1px solid #FFCB00 !important; color:black !important; background: #ffff !important;\"  class=\"btn-res text-center text-light text-uppercase bg-dark ReserveNext__ boutton-step\" >Étape précédente</a>
  1322.             &nbsp;&nbsp;
  1323.              <a href=\"{{path(\"reservationstep2\",{id:product, 'paramFormule': 'days'})}}\" style=\"background: #FFCB00 !important;\"  id=\"reservationLink\" class=\"btn-res text-center text-light text-uppercase bg-dark ReserveNext__ boutton-step\">Étape suivante</a>
  1324.             
  1325.                       </div>      
  1326.                      
  1327.            
  1328.                     
  1329.                    
  1330.                   </div>
  1331.                    
  1332.                 
  1333.                 </div>
  1334.               </div>
  1335.             </div>
  1336.           </div>
  1337.          
  1338.          
  1339.       </div>
  1340.           <div class=\"col-sm-4 reservation-steeps-panier\" style=\"overflow-y: auto;\">
  1341.       
  1342.         {{render(path(\"ajax_cart\"))}}
  1343.     </div>
  1344.     </div>
  1345.   </div>
  1346.   
  1347.   
  1348. {% endblock %}
  1349. {% block javascripts %}
  1350.   <!-- MAIN CONTENT -->
  1351.  
  1352. <script src=\"https://code.jquery.com/jquery-3.4.1.min.js\" integrity=\"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=\" crossorigin=\"anonymous\"></script>
  1353. <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js\" integrity=\"sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM\" crossorigin=\"anonymous\"></script>
  1354.  
  1355.  
  1356. <script>
  1357.     //recuperer la valeur des jours dans le formulaire .
  1358.     document.getElementById('reservationLink').addEventListener('click', function() {
  1359.          
  1360.         var days=0;
  1361.         var selectedOption = document.getElementById('serviceFormule');
  1362.          var selected = selectedOption.value;
  1363.           if(selected != \"\"){
  1364.            days = selectedOption.options[selectedOption.selectedIndex].getAttribute('data-days');
  1365.           }else{
  1366.          var radioButtons = document.getElementsByName('radioGroup');
  1367.           for (var i = 0; i < radioButtons.length; i++) {
  1368.             if (radioButtons[i].checked) {
  1369.              days = parseInt(radioButtons[i].getAttribute('data-days'));
  1370.             break;
  1371.             }
  1372.         }  }
  1373.             
  1374.  if (days === 0) {
  1375.         event.preventDefault(); // Empêche le lien de se déclencher
  1376.         alert(\"Vous n'avez rien sélectionné. Veuillez sélectionner une option.\");
  1377.     }  
  1378.         var link = document.getElementById('reservationLink');
  1379.         link.href = \"{{ path('reservationstep2', {id: product, 'paramFormule': 'days'}) }}\".replace('days', days);
  1380.     
  1381.            });
  1382.   
  1383.     \$(document).ready(function(){
  1384.  \$('input[type=radio][name=radioGroup]').click(function() {
  1385.     //\$('input[type=checkbox]').prop('checked', false);
  1386. });
  1387.  
  1388.   \$('#serviceFormule').change(function(){ 
  1389.        var radio = document.getElementById('radio2');
  1390.             radio.checked = true;
  1391.              \$('.Addons').show();
  1392.              \$('.message').hide();
  1393.              // \$('input[type=checkbox]').prop('checked', false); 
  1394.     
  1395.       });
  1396.       
  1397.       var radioButtons = document.getElementsByName('radioGroup');
  1398.  var selectElement = document.getElementById('serviceFormule');
  1399. radioButtons.forEach(function(radio) {
  1400.     radio.addEventListener('click', function() {
  1401.      
  1402.         if (radio.id === 'radio2') {
  1403.               \$('.Addons').show();
  1404.              \$('.message').hide()
  1405.             selectElement.disabled = false;
  1406.          var idProduct = \$('option:nth-child(2)').attr(\"data-id\");
  1407.           var price = \$('option:nth-child(2)').attr(\"data-price\");
  1408.            var name = \$('option:nth-child(2)').attr(\"data-name\");
  1409.           var actionType = \"add\";
  1410.     
  1411.     \$.ajax({
  1412.       url:\"{{path('ajax_cart')}}\",
  1413.       data:{
  1414.         idProduct:idProduct,
  1415.         price:price,
  1416.         name:name,
  1417.         actionType:actionType
  1418.       },
  1419.       success:function(result){
  1420.         console.log(result);
  1421.           \$(\".reservation-steeps-panier\").html(result);
  1422.       }
  1423.     });
  1424.             
  1425.               selectElement.val(\$('option:nth-child(2)').prop('selected', true));
  1426.         } else if(radio.id === 'radio1'){
  1427.                
  1428.                     \$('.Addons').hide();
  1429.                     \$('.message').show();
  1430.         } 
  1431.         
  1432.         else {
  1433.             selectElement.selectedIndex = 0; // Sélection du premier élément
  1434.             selectElement.disabled = true;
  1435.              \$('.Addons').show();
  1436.                     \$('.message').hide();
  1437.         }
  1438.     });
  1439. });
  1440.       
  1441.          \$('body').on(\"click\",\".option\",function() {
  1442.         
  1443.            /*var selectedServiceIds = [];
  1444.            var formule =\"\";
  1445.             formule = \$(\".radio1\").val();*/
  1446.               if (\$(this).is(':checked')) {  
  1447.         var formule = \$(this).val(); 
  1448.        
  1449.     }
  1450.             
  1451.              \$('.CK:checked').each(function() {
  1452.         // Ajouter l'ID du service sélectionné à la liste
  1453.        // selectedServiceIds.push(\$(this).data('id'));
  1454.   
  1455.            var currentCheckbox = \$(this);
  1456.           \$.ajax({
  1457.                 url: '/reservation/ajax-service-price',
  1458.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  1459.                 data: { 
  1460.                   serviceId : \$(this).data('id'),
  1461.                   formule : formule
  1462.                  },
  1463.                 success: function(response) {
  1464.                     currentCheckbox.attr('data-price', response);
  1465.                     var idProduct = currentCheckbox.attr(\"data-id\");
  1466.                     var price = currentCheckbox.attr(\"data-price\");
  1467.                     var name = currentCheckbox.attr(\"data-name\");
  1468.                    
  1469.                     if(price != 0){
  1470.                     var actionType = \"add\";
  1471.                      currentCheckbox.next('label').css({'color': 'white', 'background': 'rgb(255, 216, 110)'});
  1472.                     }else{
  1473.                       var actionType = \"remove\";
  1474.                       currentCheckbox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  1475.                     }
  1476.                     
  1477.              \$.ajax({
  1478.                 url:\"{{path('ajax_cart')}}\",
  1479.                 data:{
  1480.                   idProduct:idProduct,
  1481.                   price:price,
  1482.                   name:name,
  1483.                   actionType:actionType
  1484.                 },
  1485.                 success:function(result){
  1486.                   console.log(result);
  1487.                     \$(\".reservation-steeps-panier\").html(result);
  1488.                 }
  1489.               });
  1490.                             
  1491.                        
  1492.         },
  1493.                 error: function(xhr, status, error) {
  1494.                     // Gérez les erreurs ici
  1495.                     console.error(error);
  1496.                 }
  1497.             });
  1498.          
  1499.   
  1500.           
  1501.     
  1502.         
  1503.     });
  1504.         
  1505.           
  1506.     var idProduct = \$(this).attr(\"data-id\");
  1507.     var price = \$(this).attr(\"data-price\");
  1508.     var name = \$(this).attr(\"data-name\");
  1509.     var actionType = \"add\";
  1510.     \$.ajax({
  1511.       url:\"{{path('ajax_cart')}}\",
  1512.       data:{
  1513.         idProduct:idProduct,
  1514.         price:price,
  1515.         name:name,
  1516.         actionType:actionType
  1517.       },
  1518.       success:function(result){
  1519.         console.log(result);
  1520.           \$(\".reservation-steeps-panier\").html(result);
  1521.       }
  1522.     });
  1523.     });
  1524.     
  1525.              \$('body').on(\"change\",\"select.option\",function() {
  1526.  var selectedServiceIds = [];
  1527.                  if(\$(\"#serviceFormule\").val() != \"\" || \$(\"#radio3\").val() != \"\"){
  1528.          if(\$(\"#serviceFormule\").val() != \"\" ){
  1529.                  formule =\$(\"#serviceFormule\").val();
  1530.                 }else{
  1531.                  formule = \$(\".radio1\").val();
  1532.                 }
  1533.           }
  1534.             // Parcourir toutes les cases cochées avec la classe CK
  1535.     \$('.CK:checked').each(function() {
  1536.         // Ajouter l'ID du service sélectionné à la liste
  1537.        // selectedServiceIds.push(\$(this).data('id'));
  1538.   
  1539.            var currentCheckbox = \$(this);
  1540.           \$.ajax({
  1541.                 url: '/reservation/ajax-service-price',
  1542.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  1543.                 data: { 
  1544.                   serviceId : \$(this).data('id'),
  1545.                   formule : formule
  1546.                  },
  1547.                 success: function(response) {
  1548.                     currentCheckbox.attr('data-price', response);
  1549.                     var idProduct = currentCheckbox.attr(\"data-id\");
  1550.                     var price = currentCheckbox.attr(\"data-price\");
  1551.                     var name = currentCheckbox.attr(\"data-name\");
  1552.                     if(price != 0){
  1553.                     var actionType = \"add\";
  1554.                      currentCheckbox.next('label').css({'color': 'white', 'background': 'rgb(255, 216, 110)'});
  1555.                     }else{
  1556.                       var actionType = \"remove\";
  1557.                       currentCheckbox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  1558.                     }
  1559.                
  1560.              \$.ajax({
  1561.                 url:\"{{path('ajax_cart')}}\",
  1562.                 data:{
  1563.                   idProduct:idProduct,
  1564.                   price:price,
  1565.                   name:name,
  1566.                   actionType:actionType
  1567.                 },
  1568.                 success:function(result){
  1569.                   console.log(result);
  1570.                     \$(\".reservation-steeps-panier\").html(result);
  1571.                 }
  1572.               });
  1573.                             
  1574.                        
  1575.         },
  1576.                 error: function(xhr, status, error) {
  1577.                     // Gérez les erreurs ici
  1578.                     console.error(error);
  1579.                 }
  1580.             });
  1581.          
  1582.   
  1583.           
  1584.     
  1585.         
  1586.     });
  1587.     
  1588.       
  1589.               
  1590.           
  1591.     var idProduct = \$(this).find(\"option:selected\").attr(\"data-id\");
  1592.     var price = \$(this).find(\"option:selected\").attr(\"data-price\");
  1593.     var name = \$(this).find(\"option:selected\").attr(\"data-name\");
  1594.     var actionType = \"add\";
  1595.   
  1596.    
  1597.     \$.ajax({
  1598.       url:\"{{path('ajax_cart')}}\",
  1599.       data:{
  1600.         idProduct:idProduct,
  1601.         price:price,
  1602.         name:name,
  1603.         actionType:actionType
  1604.       },
  1605.       success:function(result){
  1606.         console.log(result);
  1607.           \$(\".reservation-steeps-panier\").html(result);
  1608.       }
  1609.     });
  1610.     });
  1611.           \$('body').on(\"click\",\".delete-cart-item\",function() {
  1612.           
  1613.     var idProduct = \$(this).attr(\"data-id\");
  1614.     var price = \$(this).attr(\"data-price\");
  1615.     var name = \$(this).attr(\"data-name\");
  1616.     var actionType = \"remove\";
  1617.     \$.ajax({
  1618.       url:\"{{path('ajax_cart')}}\",
  1619.       data:{
  1620.         idProduct:idProduct,
  1621.         price:price,
  1622.         name:name,
  1623.         actionType:actionType
  1624.       },
  1625.       success:function(result){
  1626.         console.log(result);
  1627.           \$(\".reservation-steeps-panier\").html(result);
  1628.       }
  1629.     });
  1630.         
  1631.         
  1632.     
  1633.     });
  1634.       \$('body').on(\"click\",\".delete-cart-item\",function() {
  1635.                 
  1636.           var idProduct = \$(this).attr(\"data-id\");
  1637.           var price = \$(this).attr(\"data-price\");
  1638.           var name = \$(this).attr(\"data-name\");
  1639.           var actionType = \"remove\";
  1640.           \$.ajax({
  1641.             url:\"{{path('ajax_cart')}}\",
  1642.             data:{
  1643.               idProduct:idProduct,
  1644.               price:price,
  1645.               name:name,
  1646.               actionType:actionType
  1647.             },
  1648.             success:function(result){
  1649.               console.log(result);
  1650.                 \$(\".reservation-steeps-panier\").html(result);
  1651.             }
  1652.           });
  1653.           });
  1654.         // Ajouter la délégation d'événements pour le clic sur le label 'service'
  1655.    \$('label[for=\"service\"]').click(function(){ 
  1656.  
  1657.     var checkBox = \$(this).prev();
  1658.     var value = checkBox.val();
  1659.     if (checkBox.is(\":checked\")) {
  1660.         checkBox.prop('checked', false);
  1661.         console.log(\"Case à cocher décochée : \" + value);
  1662.          checkBox.next('label').css({ 'color': '#626262' ,'background': 'none'});
  1663.   var idProduct = checkBox.attr(\"data-id\");
  1664.     var price = checkBox.attr(\"data-price\");
  1665.     var name = checkBox.attr(\"data-name\");
  1666.     var actionType = \"remove\";
  1667.       \$.ajax({
  1668.       url:\"{{path('ajax_cart')}}\",
  1669.       data:{
  1670.         idProduct:idProduct,
  1671.         price:price,
  1672.         name:name,
  1673.         actionType:actionType
  1674.       },
  1675.       success:function(result){
  1676.         console.log(result);
  1677.           \$(\".reservation-steeps-panier\").html(result);
  1678.       }
  1679.     });
  1680.     } else {
  1681.         checkBox.prop('checked', true);
  1682.         console.log(\"Case à cocher cochée : \" + value);
  1683.         var formule = \"\";
  1684.  
  1685.        
  1686.               if(\$(\"#serviceFormule\").val() != \"\" || \$(\"#radio3\").val() != \"\"){
  1687.                 if(\$(\"#serviceFormule\").val() != \"\" ){
  1688.                  formule =\$(\"#serviceFormule\").val();
  1689.                 }
  1690.                   else if (\$('#radio1').is(':checked')) {
  1691.                   formule = \$(\".radio1\").val();
  1692.                  }
  1693.                  else if (\$('#radio1').is(':checked')) {
  1694.                   formule = \$(\"#radio1\").val();
  1695.                  }
  1696.                   else if (\$('#radioMois').is(':checked')) {
  1697.                   formule = \$(\"#radioMois\").val();
  1698.                  }
  1699.               
  1700.                  
  1701.               var serviceId = \$(this).prev().data('id');
  1702.               var dataElement = \$(this).prev();
  1703.       
  1704.              \$.ajax({
  1705.                 url: '/reservation/ajax-service-price',
  1706.                 type: 'GET', // ou 'GET' en fonction de votre besoin
  1707.                 data: { 
  1708.                   serviceId : value,
  1709.                   formule : formule
  1710.                  },
  1711.                 success: function(response) {
  1712.                     
  1713.                      dataElement.attr(\"data-price\", response);
  1714.                      var idProduct = dataElement.attr(\"data-id\");
  1715.                     var price = dataElement.attr(\"data-price\");
  1716.                     var name = dataElement.attr(\"data-name\");
  1717.                     var actionType = \"add\";
  1718.             if(price != 0 ){
  1719.                 \$.ajax({
  1720.                 url:\"{{path('ajax_cart')}}\",
  1721.                 data:{
  1722.                   idProduct:idProduct,
  1723.                   price:price,
  1724.                   name:name,
  1725.                   actionType:actionType
  1726.                 },
  1727.                 success:function(result){
  1728.                   console.log(result);
  1729.                     \$(\".reservation-steeps-panier\").html(result);
  1730.                 }
  1731.               });
  1732.                checkBox.next('label').css({ 'color': 'white' ,'background': '#FFD86E'});
  1733.                  
  1734.                    }else {
  1735.                 // Si le prix est égal à zéro, changer le fond du checkbox en gris
  1736.                 checkBox.next('label').css({'color': 'white', 'background': '#C7C8CC'});
  1737.             }    
  1738.                  
  1739.    
  1740.                 },
  1741.                 error: function(xhr, status, error) {
  1742.                     // Gérez les erreurs ici
  1743.                     console.error(error);
  1744.                 }
  1745.             });
  1746.             }
  1747.     }
  1748. });
  1749.  
  1750.  var radioButtons = document.getElementsByName('radioGroup');
  1751. for (var i = 0; i < radioButtons.length; i++) {
  1752.     if (radioButtons[i].checked) {
  1753.         var selectedValue = radioButtons[i].value;
  1754.         break;
  1755.     }
  1756. }
  1757. console.log(selectedValue); // Vous pouvez utiliser la valeur comme vous le souhaitez ici
  1758.     });
  1759.    
  1760.  
  1761.  
  1762. </script>
  1763.  
  1764. {% endblock %}
  1765. ""@Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig""/home/gebcloud/public_html/cowork.gebanalysis.cloud/src/Flexy/FrontBundle/Themes/CoWorking/templates/reservation/reservation-freework-step.html.twig");
  1766.     }
  1767. }