templates/FrontBundle/Page/shop-product.html.twig line 1

Open in your IDE?
  1. {% extends 'FrontBundle/layout_shop.html.twig' %}
  2. {% block title %}{{ app_sitename }} - {{ product.nameLocale(app.request.locale) }}{% endblock %}
  3. {% block description %}{{ product.descriptionLocale(app.request.locale)|replace({'\r\n': ' '})|raw }}{% endblock %}
  4. {% block google %}
  5.     <!-- Google tag (gtag.js) -->
  6.     <script async src="https://www.googletagmanager.com/gtag/js?id=AW-11336737773">
  7.     </script>
  8.     <script>
  9.         window.dataLayer = window.dataLayer || [];
  10.         function gtag(){dataLayer.push(arguments);}
  11.         gtag('js', new Date());
  12.         gtag('config', 'AW-11336737773');
  13.     </script>
  14. {% endblock %}
  15. {% block extra_class %}stack{% endblock %}
  16. {# {% block menu_min %}200{% endblock %} #}
  17. {# {% block menu_max %}2636{% endblock %} #}
  18. {% block stylesheets %}
  19.   <link href="/front/css/owl.carousel.min.css" rel="stylesheet">
  20.   <link href="/front/css/owl.theme.default.min.css" rel="stylesheet">
  21.   <link href="/front/css/nouislider.css" rel="stylesheet">
  22.     <style>
  23.         .option-content{
  24.             border-radius: 14px;
  25.             background: #931517;
  26.             display: flex;
  27.             justify-content: center;
  28.             align-items: center;
  29.             width: 119px;
  30.             height: 19px;
  31.             flex-shrink: 0;
  32.             margin: 1.5rem auto 0.5rem auto;
  33.             color: #fff;
  34.             padding: 0.5rem 1rem;
  35.             font-size: 13px;
  36.             font-weight: 600;
  37.         }
  38.         .page_boutique-produit #product .options .col-md-6  li
  39.         {
  40.             background-color: #FFFFFF;
  41.             border-radius: 15px;
  42.             padding: 5px;
  43.             margin: 12px;
  44.             width: calc(25% - -59px);
  45.             float: left;
  46.             position: relative;
  47.             height: 74px;
  48.             border: 1px solid #FFFFFF;
  49.         }
  50.         .page_boutique-produit #product .options ul{
  51.             padding: 0;
  52.         }
  53.         .page_boutique-produit #product .options .title span.sub {
  54.             width: 100%;
  55.             display: inline-block;
  56.             font-size: 11px;
  57.         }
  58.         .page_boutique-produit #product .options .price{
  59.             margin: 3px 0 0 0 ;
  60.         }
  61.         .bon-cadeau-17 .bon-cadeau-option-block1,
  62.         .bon-cadeau-18 .bon-cadeau-option-block1,
  63.         .bon-cadeau-19 .bon-cadeau-option-block1,
  64.         .bon-cadeau-20 .bon-cadeau-option-block1,
  65.         .bon-cadeau-6 .bon-cadeau-option-block1,
  66.         .bon-cadeau-7 .bon-cadeau-option-block1,
  67.         .bon-cadeau-8 .bon-cadeau-option-block1,
  68.         .bon-cadeau-9 .bon-cadeau-option-block1 {
  69.           display: none;
  70.         }
  71.         .btn-primary.active,
  72.         .btn-primary:hover {
  73.             color: #ffffff;
  74.             text-decoration: none;
  75.             border: 1px solid var(--red);
  76.             background-color: var(--red);
  77.         }
  78.     </style>
  79. {% endblock %}
  80. {% block body %}
  81.     <section id="product" class="espace-content full mb-5 pb-5" style="margin-top: 60px;" data-id="{{ product.id }}">
  82.       <div class="content pt-5 pb-5 mt-5" style="padding: 0 150px">
  83.         <div class="row">
  84.           <a href="{{ path('framework_front_shop_cat', {'category_slug': product.category.slug, 'locale': app.request.locale}) }}" class="link-back mb-4"><img src="/front/img/button-arrow-r-l.svg" alt="back" width="25px" class="me-2" />{{ 'shop_product_back'|tr(tr)|raw }} {{ product.category.nameLocale(app.request.locale)|lower }}</a>
  85.           <div class="col-md-12">
  86.                 <ul class="breadcrumb">
  87.                   <li><a href="/{{app.request.locale }}/{{ 'boutique'|getUrl(app.request.locale) }}">{{ 'shop_title'|tr(tr)|raw }}</a></li>
  88.                   <li><a href="/{{app.request.locale }}/{{ 'boutique'|getUrl(app.request.locale) }}/articles/{{ product.category.slug }}">{{ product.category.nameLocale(app.request.locale) }}</a></li>
  89.                   <li><span>{{ product.nameLocale(app.request.locale) }}</span></li>
  90.                 </ul>
  91.               <a href="#" class="favoris trigger-modal {{ (is_granted('IS_AUTHENTICATED_REMEMBERED')) ? 'bookmark' : 'not-logged-in' }} {{ (saved) ? 'saved' : '' }}" data-id="{{ product.id }}"><i></i></a>
  92.               </div>
  93.           <div class="col-md-5">
  94.             <div class="owl-carousel product mt-5">
  95.               {% for image in product.allImages %}
  96.               <div class="item"><img src="/uploads/products/{{product.id}}/{{image}}" alt="product" /></div>
  97.               {% endfor %}
  98.             </div>
  99.               <div class="row ">
  100.                   <div class="col-9 mx-auto">
  101.                     {% if product.published %}
  102.                       <a href="#" class="btn-sm btn-primary active add-cart mb-3" data-type="bons" data-id="{{ product.id }}"><img src="/front/img/cart.svg" alt="cart" class="me-2" /> {{ 'shop_product_cart_add'|tr(tr)|raw }}</a>
  103.                       <a href="/{{app.request.locale}}/boutique/panier" class="btn-sm btn-primary text w-100 text-center">{{ 'shop_product_cart_view'|tr(tr)|raw }}</a>
  104.                     {% else %}
  105.                       <h6 class="text-center">{{ 'shop_nostock'|tr(tr)|raw }}</h6>
  106.                     {% endif %}
  107.                   </div>
  108.               </div>
  109.           </div>
  110.           <div class="col-md-7 description mt-5 pt-0">
  111.             <div class="row">
  112.               <div class="col-12"><h1 class="title" style="letter-spacing: initial;">{{ product.nameLocale(app.request.locale) }}</h1></div>
  113.               <div class="col-12 to-cart mt-3 mb-3">
  114.                 <p class="price mt-2 me-4" data-price="{{ product.price }}"><i>{{ product.priceFr }}</i> €</p>
  115.                 <p class="qty me-4"><i class="qty-bons-before">{{ 'shop_product_for'|tr(tr)|raw }}</i><a href="#" data-action="minus">-</a><span>1</span><a href="#" data-action="plus">+</a><i class="qty-bons-after">{{ 'shop_product_for1'|tr(tr)|raw }}</i></p>
  116.                 <p class="per-person p-0">{% if product.category.slug == 'bon-cadeau' %}<span>{{ 'shop_product_price'|tr(tr)|raw }}</span>{% endif %}</p>
  117.               </div>
  118.             </div>
  119.             <div class="row">
  120.               <div class="col-12">
  121.                 <div class="desc mb-3">
  122. {#                  <label>Description :</label> #}
  123.                   <p>{{ product.descriptionLocale(app.request.locale)|replace({'\r\n': '<br>'})|raw }}</p>
  124.                 </div>
  125.                 <div class="additional mb-3">
  126.                   {{ product.additionalLocale(app.request.locale)|raw }}
  127.                 </div>
  128.                 <div class="usecase">
  129.                   <p class="mb-2">{{ (product.slug == 'bon-cadeau-34') ? '' : 'shop_product_use'|tr(tr)|raw }} {{ product.usecaseLocale(app.request.locale) }}</p>
  130.                   <p class="mb-5 text-xs">{{ 'shop_product_use2'|tr(tr)|raw }}</p>
  131.                 </div>
  132. {#                <div class="info mt-5 mb-5">
  133.                   <label>Informations complémentaires :</label>
  134.                   <p>{{ product.additionalLocale(app.request.locale)|replace({'\r\n': '<br>'})|raw }}</p>
  135.                 </div> #}
  136.                 <div id="bloc2" class="row mb-5"></div>
  137.                 {% if product.category.slug == 'bon-cadeau' %}
  138.                 <div class="options {{ product.slug }}">
  139.                   <label>{{ 'shop_product_options_title'|tr(tr)|raw }}</label>
  140.                     <div class="row">
  141.                         <div class="col-md-6 bon-cadeau-option-block1">
  142.                               <span class="option-content">
  143.                                 Restaurant
  144.                             </span>
  145.                             <ul class="mt-3">
  146.                                 {% for option in options %}
  147.                                     {% if option.restaurant  == true %}
  148.                                         <li class="option-{{option.id}}" style="height: 85px">
  149.                                             {% if option.desc != '' %}<span class="infos" data-desc="{{ option.desc }}" title="{{ option.desc }}">i</span>{% endif %}
  150.                                             <p class="title">{{ option.name }}<br>{% if option.sub != '' %} <span class="sub">{{ option.sub }}</span> {% endif %}</p>
  151.                                             <p class="price" {% if not option.lounge and option.id < 3 %}style="margin: 5px 0 5px 0 !important;"{% endif %} {% if option.price == 64 %} style="margin: 13px 0 5px 0 !important;"{% endif %}>(+ {{ option.price }} €)</p>
  152.                                             <p class="qty" data-price="{{ option.price }}" data-id="{{ option.id }}"><a href="#" data-action="minus">-</a><span>0</span><a href="#" data-action="plus">+</a></p>
  153.                                         </li>
  154.                                     {% endif %}
  155.                                 {% endfor %}
  156.                             </ul>
  157.                         </div>
  158.                         <div class="col-md-6 bon-cadeau-option-block3">
  159.                             <span class="option-content">
  160.                               {{ 'cadeau_title'|tr(tr)|raw }}
  161.                             </span>
  162.                             <ul class="mt-3">
  163.                                 {% for option in options %}
  164.                                     {% if option.boutique  == true %}
  165.                                         <li class="option-{{option.id}}">
  166.                                             {% if option.desc != '' %}<span class="infos" data-desc="{{ option.desc }}" title="{{ option.desc }}">i</span>{% endif %}
  167.                                             <p class="title">{{ option.name }}<br>{% if option.lounge %}<span>Lounge Club</span>{% endif %}</p>
  168.                                             <p class="price" {% if not option.lounge and option.id < 3 %}style="margin-top: 10px;"{% endif %}>(+ {{ option.price }} €)</p>
  169.                                             <p class="qty" data-price="{{ option.price }}" data-id="{{ option.id }}"><a href="#" data-action="minus">-</a><span>0</span><a href="#" data-action="plus">+</a></p>
  170.                                         </li>
  171.                                     {% endif %}
  172.                                 {% endfor %}
  173.                             </ul>
  174.                         </div>
  175.                     </div>
  176.                     <div class="row">
  177.                         <div class="col-md-6 bon-cadeau-option-block2">
  178.                             <span class="option-content">
  179.                                 Lounge Club
  180.                             </span>
  181.                             <ul class="mt-3">
  182.                                 {% for option in options %}
  183.                                     {% if option.lounge  == true %}
  184.                                         <li class="option-{{option.id}}">
  185.                                             {% if option.desc != '' %}<span class="infos" data-desc="{{ option.desc }}" title="{{ option.desc }}">i</span>{% endif %}
  186.                                             <p class="title">{{ option.name }}<br>{% if option.lounge %}<span>Lounge Club</span>{% endif %}</p>
  187.                                             <p class="price" {% if not option.lounge and option.id < 3 %}style="margin-top: 10px;"{% endif %}>(+ {{ option.price }} €)</p>
  188.                                             <p class="qty" data-price="{{ option.price }}" data-id="{{ option.id }}"><a href="#" data-action="minus">-</a><span>0</span><a href="#" data-action="plus">+</a></p>
  189.                                         </li>
  190.                                     {% endif %}
  191.                                 {% endfor %}
  192.                             </ul>
  193.                         </div>
  194.                     </div>
  195.                 </div>
  196.                 {% endif %}
  197.               </div>
  198.             </div>
  199.             <div class="floating-cart"><img src="/front/img/cart.svg" alt="cart" /></div>
  200.           </div>
  201.         </div>
  202.       </div>
  203.     </section>
  204.     <section id="similar" class="espace-content full mb-5 pb-5" style="margin-top: 40px;">
  205.       <div class="content">
  206.         <h2 class="pt-5 mb-3 no-bar">{{ 'shop_product_similar_title'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
  207.       </div>
  208.     </section>
  209.     <section class="items-slider espace-content p-0 mt-5 mb-5">
  210.         <div class="content pt-5 pb-5 mt-5">
  211.           <div class="owl-carousel related p-0">
  212.             {% for item in similar %}
  213.                 {% if item.id > 31 and item.published %}
  214.               <div class="item row">
  215.                 <div class="col-12 ">
  216.                   <a href="/{{app.request.locale}}/{{ 'boutique'|getUrl(app.request.locale) }}/produit/{{ item.slug }}">
  217.                     <img alt="slug" class="cover" src="/uploads/products/{{item.id}}/{{ item.mainImage }}" />
  218.                   </a>
  219.                   <a href="/{{app.request.locale}}/{{ 'boutique'|getUrl(app.request.locale) }}/produit/{{ item.slug }}">
  220.                     <span class="name">{{ item.nameLocale(app.request.locale) }}</span>
  221.                     <span class="price">{{ item.priceFr }} €</span>
  222.                   </a>
  223.                   <a href="/{{app.request.locale}}/{{ 'boutique'|getUrl(app.request.locale) }}/produit/{{ item.slug }}">
  224.                     <span class="category">{{ item.category.nameLocale(app.request.locale) }}</span>
  225.                   </a>
  226.                 </div>
  227.               </div>
  228.             {% endif %}
  229.             {% endfor %}
  230.           </div>
  231.           <div class="horizontal-bar-container">
  232.             <div class="horizontal-bar"></div>
  233.             <div class="horizontal-bar-ctrl"></div>
  234.           </div>
  235.         </div>
  236.     </section>
  237.     <section class="actu-content newsletter" style="margin-bottom: 180px;">
  238.       <div class="content mt-5 pt-5">
  239.         <h2 class="mb-5 no-bar">{{ 'newsletter_title'|tr(tr)|upper|raw }}<span class="full-bar"></span></h2>
  240.         <div class="pt-5">
  241.           <form>
  242.             <p class="title">{{ 'newsletter_subtitle'|tr(tr)|raw }}</p>
  243.             <p class="desc">{{ 'newsletter_desc'|tr(tr)|raw }}</p>
  244.             <div class="email-input">
  245.               <input type="text" value="" placeholder="{{ 'newsletter_email'|tr(tr)|raw }}" class="email mt-3" />
  246.               <a href="#" class="register">&nbsp;</a>
  247.             </div>
  248.             <div class="row">
  249.               <div class="col-12 mt-4">
  250.                 <input type="checkbox" id="confirm" class="apple-switch" checked="checked" />
  251.                 <label for="confirm">{{ 'newsletter_agree'|tr(tr)|raw }}</label>
  252.                 <p class="text-center mt-4" id="message_newsletter"></p>
  253.               </div>
  254.             </div>
  255.           </form>
  256.         </div>
  257.       </div>
  258.     </section>
  259.     {% include ('FrontBundle/Partial/modal.html.twig') %}
  260.     {% include 'FrontBundle/Partial/footer.html.twig' %}
  261. {% endblock %}
  262. {% block javascripts %}
  263.   <script src="/front/js/owl.carousel.min.js"></script>
  264.   <script type="text/javascript">
  265.     function updatePrice(){
  266.       console.log('updateprice')
  267.       var product_price = parseFloat($('#product .price').data('price'));
  268.       var qty = parseInt($('.to-cart span').text());
  269.       var options_prices = 0;
  270.       var option_qty_save = 0;
  271.       var price = 0;
  272.       $('#product .options li .qty').each(function(index, value) {
  273.         var option_price = parseFloat($(this).data('price'));
  274.         var option_qty = parseInt($(this).find('span').text());
  275.         if(option_qty > 0){
  276.           options_prices = options_prices + (option_price * option_qty);
  277.           option_qty_save = option_qty
  278.         }
  279.       }).promise().done( function(){ 
  280.         // price = (product_price + options_prices) * qty;
  281.         price = (product_price * qty) + options_prices; //NOUVEAU CALCUL
  282.         $('#product .price i').text(price.toFixed(2).replace( '.', ',' ));
  283.         if(option_qty_save == 0 && qty == 1){
  284.           $('.per-person').fadeIn();
  285.         } else {
  286.           $('.per-person').fadeOut();
  287.         }
  288.       });
  289.     }
  290.     $( document ).ready(function() {
  291.       if( window.innerWidth <= 1024 ){
  292.         $('#product .col-md-5').addClass('col-md-4');
  293.         $('#product .col-md-5').removeClass('col-md-5');
  294.         $('#product .col-md-7').addClass('col-md-8');
  295.         $('#product .col-md-7').removeClass('col-md-7');
  296.         $('#bloc2').append($('.to-cart'));
  297.       }
  298.       // HIDE FORFAITS DUO
  299.       var product_slug = '{{product.slug}}';
  300.       var slugs = ['bon-cadeau-6', 'bon-cadeau-7', 'bon-cadeau-8', 'bon-cadeau-9'];
  301.       if(jQuery.inArray(product_slug, slugs) != -1) {
  302.         $('.options .option-1').hide();
  303.         $('.options .option-2').hide();
  304.       } 
  305.       // END HIDE FORFAITS DUO
  306.       $('.additional li').each(function(index, value) {
  307.         if($(this).data('info')){
  308.           var add_desc = '';
  309.           if( $(this).data('info') == 'sp-ga' ){
  310.             /*add_desc = "{{ 'shop_bons_desc1'|tr(tr)|raw }}".replace(/'/g, "\\'");*/
  311.             add_desc = "{{ 'shop_bons_desc1'|tr(tr)|raw }}";
  312.           } else if( $(this).data('info') == 'mj-m1' ){
  313.             /*add_desc = "{{ 'shop_bons_desc2'|tr(tr)|raw }}".replace(/'/g, "\\'");*/
  314.             add_desc = "{{ 'shop_bons_desc2'|tr(tr)|raw }}";
  315.           } else if( $(this).data('info') == 'mj-m2' ){
  316.             /*add_desc = "{{ 'shop_bons_desc3'|tr(tr)|raw }}".replace(/'/g, "\\'");*/
  317.             add_desc = "{{ 'shop_bons_desc3'|tr(tr)|raw }}";
  318.           } else if( $(this).data('info') == 've-m1' ){
  319.             /*add_desc = "{{ 'shop_bons_desc4'|tr(tr)|raw }}".replace(/'/g, "\\'");*/
  320.             add_desc = "{{ 'shop_bons_desc4'|tr(tr)|raw }}";
  321.           } else if( $(this).data('info') == 've-m2' ){
  322.             /*add_desc = "{{ 'shop_bons_desc5'|tr(tr)|raw }}".replace(/'/g, "\\'");*/
  323.             add_desc = "{{ 'shop_bons_desc5'|tr(tr)|raw }}";
  324.           }
  325.           $(this).append('<span class="infos" data-desc="'+add_desc+'">i</span>')
  326.         }
  327.       });
  328.       $('.infos').each(function(index, value) {
  329.         $(this).tooltipster({
  330.             content: $(this).data('desc'),
  331.             delay: 200,
  332.             contentAsHTML: true,
  333.             trigger: 'click'
  334.         });
  335.       });
  336.       $('#product .bookmark').click(function(e){
  337.         e.preventDefault();
  338.         if( $(this).hasClass('saved') ){
  339.           var action = 'unsave';
  340.         } else {
  341.           var action = 'save';
  342.         }
  343.         
  344.         $.ajax({
  345.           type: "POST",
  346.           url: "/shop/product/"+action+"/{{ product.id }}",
  347.           data: null,
  348.           dataType: "json",
  349.           success: function(response) {
  350.             if( action == 'save' ){
  351.               $('#product .bookmark').addClass('saved');
  352.               $('#product .bookmark span').text('Produit sauvegardé');
  353.             } else {
  354.               $('#product .bookmark').removeClass('saved');
  355.               $('#product .bookmark span').text('Ajouter aux favoris');
  356.             }
  357.           }
  358.         });
  359.       });
  360.     
  361.       $('.options .qty a').click(function(e){
  362.         e.preventDefault();
  363.         var element = $(this).parents('.qty');
  364.         var count = parseInt(element.find('span').text());
  365.         if( $(this).data('action') == 'plus' ){
  366. // BLOCK FORFAITS DUO EN FONCTION DU NOMBRE DE PARTICIPANTS
  367. console.log('check forfait duo');
  368. var qtyPres = parseInt($('.to-cart span').text());
  369. var maxDuo = parseInt((qtyPres / 2)+(qtyPres % 2));
  370. var currentDuo = parseInt($('.qty[data-id="1"] span').text()) + parseInt($('.qty[data-id="2"] span').text()) + 1;
  371. var refFix = parseInt(element.data('id'));
  372. // console.log('max forfait duo : '+maxDuo);
  373. // console.log('currentDuo : '+currentDuo);
  374. // console.log('ref : '+refFix);
  375. if(refFix == 1 || refFix == 2){
  376.   if(currentDuo > maxDuo){
  377.     // console.log('ok block');
  378.     return 0;
  379.   }
  380. }
  381. // FIN BLOCK FORFAITS DUO EN FONCTION DU NOMBRE DE PARTICIPANTS
  382.           count++;
  383.         } else {
  384.           count--;
  385.           if(count < 0){
  386.             count = 0;
  387.           }
  388.         }
  389.         if(count > 0){
  390.           $(this).parents('li').addClass('active');
  391.         } else {
  392.           $(this).parents('li').removeClass('active');
  393.         }
  394.         element.find('span').text(count);
  395.         updatePrice();      
  396.       });
  397.       
  398.       $('.to-cart .qty a').click(function(e){
  399.         e.preventDefault();
  400.         var element = $(this).parents('.qty');
  401.         var count = parseInt(element.find('span').text());
  402.         if( $(this).data('action') == 'plus' ){
  403.           count++;
  404.         } else {
  405.           count--;
  406.           if(count < 1){
  407.             count = 1;
  408.           }
  409.         }
  410.         element.find('span').text(count);
  411.         updatePrice();
  412.         
  413.       });
  414.     $('.owl-carousel.product').owlCarousel({
  415.       loop:false,
  416.       margin:34,
  417.       nav:false,
  418.       dots:false,
  419.       responsive:{
  420.           0:{
  421.               items:1
  422.           },
  423.           600:{
  424.               items:1
  425.           },
  426.           1920:{
  427.               items:1
  428.           }
  429.       }
  430.     });
  431.     var owl = $('.owl-carousel.related');
  432.     owl.owlCarousel({
  433.       loop:false,
  434.       margin:110,
  435.       nav:true,
  436.       responsive:{
  437.           0:{
  438.               items:1
  439.           },
  440.           768:{
  441.               items:2
  442.           },
  443.           1024:{
  444.               items:3
  445.           },
  446.           1920:{
  447.               items:4
  448.           }
  449.       }
  450.     });
  451.     owl.on('changed.owl.carousel', function(event) {
  452.       var itemsNbr = owl.data()['owl.carousel'].settings.items;
  453.       var itemsTotal = event.item.count;
  454.       var itemsIndex = event.item.index;
  455.       var pagesNbr = itemsTotal - itemsNbr;
  456.       var horizontalBar = $('.horizontal-bar').outerWidth();
  457.       var horizontalBarCtrl = $('.horizontal-bar-ctrl').outerWidth();
  458.       var courseLength = $('.horizontal-bar').outerWidth() - $('.horizontal-bar-ctrl').outerWidth();
  459.       var left = itemsIndex * 100 / pagesNbr; // percent
  460.       left = left * courseLength / 100;
  461.       $('.horizontal-bar-ctrl').css('left', left+'px');
  462.       
  463.     });
  464.   });
  465.   </script>
  466.     <!-- script pour gérer la connexion lors de la demande d'ajout de favoris --->
  467.     <script>
  468.         $(document).ready(function() {
  469.             $('.trigger-modal').on('click', function(e) {
  470.                 e.preventDefault(); // Empêche le comportement par défaut du lien
  471.                 const url = "/" + $("html").attr("lang") + "/user/connected";
  472.                 $.ajax({
  473.                     url: url,
  474.                     success: function(data) {
  475.                         if (!data.isLoggedIn) {
  476.                             const locale = data.locale;
  477.                             let modalTitle, modalContent, modalButtonText;
  478.                             if(locale === "fr") {
  479.                                 modalTitle = "Connexion nécessaire";
  480.                                 modalContent = "Pour réaliser cette action vous devez être connecté. Si vous n'avez pas encore de compte, vous pouvez en créer un.";
  481.                                 modalButtonText = "Se connecter";
  482.                             } else if(locale === "en") {
  483.                                 modalTitle = "Connection required";
  484.                                 modalContent = "You must be logged in to perform this action. If you don't have an account yet, you can create one.";
  485.                                 modalButtonText = "Sign in";
  486.                             } else if (locale === "de") {
  487.                                 modalTitle = "Verbindung erforderlich";
  488.                                 modalContent = "Um diese Aktion durchzuführen, müssen Sie angemeldet sein. Wenn Sie noch kein Konto haben, können Sie eines erstellen.";
  489.                                 modalButtonText = "Sich anmelden";
  490.                             }
  491.                             // Mise à jour du texte du bouton
  492.                             $(".modalbutton").text(modalButtonText);
  493.                             // Mise à jour du titre et du contenu de la modale
  494.                             $("#modalLoginReminderLabel").text(modalTitle);
  495.                             $("#modalLoginReminder .modal-body").text(modalContent);
  496.                             // Affichage de la modale
  497.                             $("#modalLoginReminder").modal('show');
  498.                         }
  499.                     }
  500.                 });
  501.             });
  502.         });
  503.     </script>
  504. {% endblock %}