src/DcSiteBundle/Resources/views/Peugeot/Service/body-repair.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Peugeot/base.html.twig' %}
  2. {% block seo %}
  3.     <title>{{ 'seo.body_repair.title'|trans({}, 'dc_peugeot') }}</title>
  4.     <meta name="description" content="{{ 'seo.body_repair.desc'|trans({}, 'dc_peugeot') }}" />
  5.     <meta name="keywords" content="" />
  6. {% endblock seo %}
  7. {% block ogtagDynamic %}
  8.     <meta property="og:title" content="{{ 'seo.body_repair.title'|trans({}, 'dc_peugeot') }}"/>
  9.     <meta property="og:description" content="{{ 'seo.body_repair.desc'|trans({}, 'dc_peugeot') }}"/>
  10. {% endblock ogtagDynamic %}
  11. {% block css %}
  12.     <link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/peugeot/services/style.css') }}">
  13.     <link rel="stylesheet" href="{{ asset('/bundles/dcsite/css/peugeot/services/body-repair.css') }}">
  14. {% endblock %}
  15. {% block content %}
  16.     <section class="breadcrumbs__new">
  17.         <div class="container">
  18.             <ol class="global_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  19.                 <li class="marker__none" itemprop="itemListElement" itemscope
  20.                     itemtype="https://schema.org/ListItem">
  21.                     <a itemprop="item" href="{{ path('peugeot_homepage') }}">
  22.                         <span class="breadcrumbs__link" itemprop="name">Peugeot</span></a>
  23.                     <meta itemprop="position" content="1"/>
  24.                 </li>
  25.                 <div class="arrow-bcs"> ❯ </div>
  26.                 <li class="marker__none" itemprop="itemListElement" itemscope
  27.                     itemtype="https://schema.org/ListItem">
  28.                     <a itemprop="item" href="{{ path('peugeot_service_online-booking') }}">
  29.                         <span class="breadcrumbs__link" itemprop="name">{{ 'main.service'|trans({}, 'dc_peugeot') }}</span></a>
  30.                     <meta itemprop="position" content="2"/>
  31.                 </li>
  32.                 <div class="arrow-bcs"> ❯ </div>
  33.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  34.                     itemtype="https://schema.org/ListItem">
  35.                     <span style="color: #837F7F;" class="breadcrumbs__link" itemprop="name">{{ 'menu.body_repair'|trans({}, 'dc_peugeot') }}</span>
  36.                     <meta itemprop="position" content="3"/>
  37.                 </li>
  38.             </ol>
  39.         </div>
  40.     </section>
  41.     <section class="body_repair">
  42.         <div class="container">
  43.             <div class="row">
  44.                 <div class="col-sm-12 col-md-12 col-lg-12 col-xl-12 pl-0 pr-0">
  45.                     <div class="row mb-4">
  46.                         <div class="col-md-12 custom-padd pb-0">
  47.                             <h1 class="section-title mb-0">{{ 'menu.body_repair'|trans({}, 'dc_peugeot') }}</h1>
  48.                         </div>
  49.                     </div>
  50.                 </div>
  51.             </div>
  52.         </div>
  53.         
  54.         {% include '@DcSiteBundle/Modules/body-repair/body-repair.html.twig' %}
  55.     </section>
  56. {% endblock %}
  57. {% block pageJS %}
  58.     <script>
  59.         app.onCustomEvent('appInit', function () {
  60.             app.loadJs("{{ asset('bundles/insurance/js/jquery.mCustomScrollbar.concat.min.js') }}");
  61.             app.loadJs("{{ asset('/bundles/core/js/modules/gallery/lightgallery.js') }}", function () {
  62.                 $('.section-padding-page').lightGallery({
  63.                     selector: '.body_repair-image'
  64.                 });
  65.             });
  66.             app.loadJs("{{ asset('bundles/portal/js/body-repair-calc.js') }}", function () {
  67.                 initRepairCalc({
  68.                     initUrl: '{{ path('portal_repair_calc_init') }}',
  69.                     saveUrl: '{{ path('form_repair_calc') }}',
  70.                     privacyUrl: '{{ privacyUrl }}',
  71.                 });
  72.             });
  73.             $('.js-repair-photo').on('submit',function (e) {
  74.                 e.preventDefault();
  75.                 var formData = new FormData(this);
  76.                 var $form = $(this);
  77.                 $('#check_privacy', $(this)).remove('error');
  78.                 if (!$('.js-repair-photo .js-form-privacy input').prop('checked')) {
  79.                     $('#check_privacy', $(this)).addClass('error');
  80.                     return false;
  81.                 }
  82.                 $.ajax({
  83.                     url: $form.attr('action'),
  84.                     type: 'POST',
  85.                     data: formData,
  86.                     success: function (data) {
  87.                         $('#popup-sps').modal('show');
  88.                         try {
  89.                             dataLayer.push({'event' : 'event-to-go', 'eventAction': 'submit', 'eventCategory' : 'sto-all', 'eventLabel' : 'remont-kyzova' });
  90.                         } catch (e) {
  91.                             console.error('dataLayer event error');
  92.                         }
  93.                     },
  94.                     cache: false,
  95.                     contentType: false,
  96.                     processData: false
  97.                 });
  98.             });
  99.             /*PAGES FIXED MENU SCROLL*/
  100.             jQuery(window).scroll(function(){
  101.                 var $sections = $('section');
  102.                 $sections.each(function(i,el){
  103.                     var top  = $(el).offset().top-100;
  104.                     var bottom = top +$(el).height();
  105.                     var scroll = $(window).scrollTop();
  106.                     var id = $(el).attr('id');
  107.                     if( scroll > top && scroll < bottom){
  108.                         $('.pages-menu-fixed a.active').removeClass('active');
  109.                         $('.pages-menu-fixed a[href="#'+id+'"]').addClass('active');
  110.                     }
  111.                 })
  112.             });
  113.             $(".pages-menu-fixed").on("click","a", function (event) {
  114.                 event.preventDefault();
  115.                 var id  = $(this).attr('href');
  116.                 if($(id).length == 0) {
  117.                     return false;
  118.                 }
  119.                 var top = $(id).offset().top-30;
  120.                 $('body,html').animate({scrollTop: top}, 800);
  121.             });
  122.             var button = $("#repair_photo_files");
  123.             function readURL(input) {
  124.                 if (input.files.length == 0) {
  125.                     return;
  126.                 }
  127.                 $.each(input.files, function () {
  128.                     var reader = new FileReader();
  129.                     reader.onload = function(e) {
  130.                         var imgWr = $("<div class='review-foto-wrap'><div class='review-image'><img src=\"#\" alt=\"load image\" /></div></div>");
  131.                         $('.review-image img',imgWr).attr('src', e.target.result);
  132.                         button.after(imgWr);
  133.                     };
  134.                     reader.readAsDataURL(this);
  135.                 });
  136.             }
  137.             $("#repair_photo_files").change(function() {
  138.                 $('.review-foto-wrap').replaceWith('');
  139.                 readURL(this);
  140.             });
  141.         });
  142.     </script>
  143. {% endblock pageJS %}